BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
james_whanger
Calcite | Level 5

Hello All,

I am having the following problem to which I found a simple solution, but am interested in understanding why it occurs in the first place.  Here is the issue:

1. Pull in a table from a shared server.

2. Select all variables.

3. Filter on a Numeric variable (0,1)

4. Receive this error: ERROR: CLI prepare error: ERROR:  Cannot convert 'INT4' to 'BOOL'

5. Solution: First run a query in which I  select all variables without filtering. Then run the original query and filter on the numeric variable. No error returned and the new table is properly filtered.

Why does this occur?

Thanks in advance,

James

1 ACCEPTED SOLUTION

Accepted Solutions
Doc_Duke
Rhodochrosite | Level 12

this is probably a server side error.  It could be that SAS is not generating proper code for SQL to transfer.  You need to turn on the SQL options that show the code actually generated and maybe post that.  It would also be helpful to know the SQL engine being used.  You might get the quickest solution by calling tech support.

Doc Muhlbaier

Duke

View solution in original post

2 REPLIES 2
Doc_Duke
Rhodochrosite | Level 12

this is probably a server side error.  It could be that SAS is not generating proper code for SQL to transfer.  You need to turn on the SQL options that show the code actually generated and maybe post that.  It would also be helpful to know the SQL engine being used.  You might get the quickest solution by calling tech support.

Doc Muhlbaier

Duke

james_whanger
Calcite | Level 5

Doc,

You were right. It turns out it has to do with variable encoding on the server side. Pulling the data into project results in an automatric transformation that allows the subsququent query to work. Another solution is to use "NOT IS NULL" rather than "=1" when filtering directly from the server.

Thanks for your help,

James

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 2970 views
  • 0 likes
  • 2 in conversation