Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
joeybird
Creator III
Creator III

auto number qlik sense - with renamed column

Hiya

Qlik Sense...reading from an SQL DB ...in the data load section


i have created an Auto Number field for Customer as CustomerID with no issues


However i have used the following in a context as had issue with null entrys...


if(isnull ([Column two]),[Column one],[Column two]) as [Column Three]

the issue i have is,  i wish to get the Column Three to create its own auto number too

AutoNumber ([Column Three]) as (Column ThreeID),

Is it please possible?

i keep getting OLDB read error.

please help

Kind Regards

Joeybird

1 Solution

Accepted Solutions
Gysbert_Wassenaar

1. Your database will not understand Qlikview functions, so do not use them in SQL SELECT statements that are send to your database.

2. AutoNumber ([Column Three]) as (Column ThreeID) is not correct. Try square brackets: AutoNumber ([Column Three]) as [Column ThreeID]

3. Simply put an AutoNumber() around the if statement: AutoNumber(if(isnull ([Column two]),[Column one],[Column two])) as [Column Three]


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

1. Your database will not understand Qlikview functions, so do not use them in SQL SELECT statements that are send to your database.

2. AutoNumber ([Column Three]) as (Column ThreeID) is not correct. Try square brackets: AutoNumber ([Column Three]) as [Column ThreeID]

3. Simply put an AutoNumber() around the if statement: AutoNumber(if(isnull ([Column two]),[Column one],[Column two])) as [Column Three]


talk is cheap, supply exceeds demand
joeybird
Creator III
Creator III
Author

Hiya

I only put point 2. as a context sorry and did not put it exact correct syntax.

however 3. worked brill thank you

AutoNumber(if(isnull ([Column two]),[Column one],[Column two])) as [Column Three]

but I have found out if you do point 3 first then point 2, you can create the new field required (to help with the null entry's) and auto number field too.

Kind Regards

Joeybird