tag:blogger.com,1999:blog-5585680429157536914.post3202599855579529618..comments2023-12-19T01:06:46.450+00:00Comments on QlikView Addict: QlikView Functions: autonumber()Matt Fryerhttp://www.blogger.com/profile/16375702764551893303noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-5585680429157536914.post-47883377533763683342014-06-25T12:36:52.336+01:002014-06-25T12:36:52.336+01:00Matt, I know the pitfalls of a young family when i...Matt, I know the pitfalls of a young family when it comes to getting round to blogging about QV. The fact that the three autonumbers only work within a single execution is a bit of a biggy because the types of app that need the boost of an efficient join are also those that really need incremental loads for performance. Always saddens me that I can't use these functions more often.<br /><br />Keep up the blogs mate, really useful stuff<br />DaveDave Edwardshttps://www.blogger.com/profile/17506838943197496555noreply@blogger.comtag:blogger.com,1999:blog-5585680429157536914.post-33006540983945000392014-04-24T15:00:21.499+01:002014-04-24T15:00:21.499+01:00Hi Mike
First of all, how autonumber() will behave...Hi Mike<br />First of all, how autonumber() will behave depends on if it is a true null or a zero length string. For true nulls, the result of the autonumber() will also be null. You can prove this by running the following script:<br /><br />LOAD autonumber(null()) AS field AUTOGENERATE 1;<br /><br />By adding "field" to a list box you will see no records. Being a true null and the fact that null values don't really exist in QlikView (they are simply the absence of a value) means that when using it for a key field, QlikView will not associate a null in one table to a null in the other. <br /><br />For a zero length string, autonumber() will assign it a value as it would any other passed value. The number assigned to the zero length string will depend on the order it appears in the values that are passed to autonumber(). You can see this by running the following script:<br /><br />LOAD autonumber('') AS field AUTOGENERATE 1;<br /><br />The result will be a single value in "field" of "1". Autonumber() is 1 indexed and so I'm not sure where you are getting your 0 value back.<br /><br />Regards<br />MattMatt Fryerhttps://www.blogger.com/profile/16375702764551893303noreply@blogger.comtag:blogger.com,1999:blog-5585680429157536914.post-50205555657892960712014-03-08T11:13:32.037+00:002014-03-08T11:13:32.037+00:00Nice, simple explanation. Can you clarify how aut...Nice, simple explanation. Can you clarify how autonumber function deal with null values. I had some issues recently and resorted back to using the original values where I had one table with nulls (which were assigned a autonumber of 0) and I was trying to join to another table that had no null values. Anonymoushttps://www.blogger.com/profile/07962375986213587081noreply@blogger.com