Hi all,
I have variable that gets Numeric value most of the time but in certain conditions it can have character value. So I assigned Character to the variable while reading in the data from input file.
I used put function to this variable before I load data into Teradata table it works perfectly if I don't have any character value....if I have any character value that it gives me error.
Let say variable called Customer_name
Customer_name
3456
5678
9800
New
while mapping data in before step of teradata loader I used Put function as follows
put(Customer_name, 12.) This put function works perfectly if I don't have New in column. If I have New the following error occurs.
ERROR: Numeric format F in PUT function requires a numeric argument.... ERROR: Numeric format F in PUT function requires a numeric argument.... ERROR: Numeric format F in PUT function requires a numeric argument.
If change put function to
put(Customer_name, $12.)it works perfect for along with New in column Customer_name but doesn't work without New in column.
Can some one help me with this
Try this:
cat(Customer_name)
Don't forget to set the length.
Try this:
cat(Customer_name)
Don't forget to set the length.
I tried to implement your suggestion,
case when anyalpha(customer_acct) then "." else customer_acct endIt works perfectly if I have New as value in customer_acct variable.
But if I don't have New as value in customer_acct variable it gives me following error
ERROR: Function ANYALPHA requires a character expression as argument 1.... ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.
How to e-solve this?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.