Hello, I'm trying to convert a variable that is stored as a BIGINT from a Neteeza database to a character data type and have not had much luck in doing so. I'm trying to convert this data type in a join without using a pass-through query and was wondering if this is possible.
Table1 as t1 Inner Join Table2 as t2 on t1.ID = put(t2.ID,20.)
Have to convert to a character with a length of 20. Received errors with this piece of code.
Thanks in advance.
Please post the relevant section from your log or at least the full error message.
If you say pass-through: Implicit or explicit?
If explicit then you need to use Netezza functions - to_char()
If implicit then be aware that the SAS put() function gets eventually not pushed to the data base meaning that SAS will pull all the data first into SAS before applying the join condition.
According to docu SAS can deal with Bigint and the put() function as such should work. So please show us some log so we can better understand what's going wrong.
It is an implicit query. Tried
dbsastype=(IM.Field1='char(20)')
Still receiving same error.
What's the error? Which SAS version are you using? Which library engine are you using?
Could it be related to: http://support.sas.com/kb/38/707.html ?
It is the numeric value out of range error. SAS EG 6.1 on UNIX. I think I may just stick with an explicit query as it works there.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.