Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with condition in Where Clause when using a primary key (Field) subject to an alias

Hi all,

I have to select only employee that have( EmployID >120) , data is loaded from Access database and this is my load :

Load

EmployID as BusEmployID,// alias

Name,

LastName

SQL SELECT *

FROM Employee;Where BusEmployID > 120;

My problem is :           1/ When I use the alias name (BusEmployID) the load didn't take the condition on considiration and return all the employee even those how have a BusEmployID > 120 ?

                                   2/ When I use the 'EmployID' , it didn't work because this fiels has already changed with the alias.

                                   3/when I delete the alias it work well.

This alias is mondatory for the concatination betwwen tables so I have to work with it .

Did you have explanation for that and how can I resolve it !

Thanks a lot

11 Replies
oknotsen
Master III
Master III

I suggest you do some research about that column. I think it contains spaces or other (not visible) symbols. The aligning of the values shows that they are not all considered "numbers".

See if you can load the field like this:

'|' & EmployID & '|' as BusEmployID

Analyze the field after that.

May you live in interesting times!
Not applicable
Author

I notify that and I verify the type in the load and it is an Integer I try even to cast it with Num() function but it didn't return any thing ????