BookmarkSubscribeRSS Feed
HeatherNewton
Quartz | Level 8

I am loading sas data converted to csv into DB2. one problem is when  I setup tables in DB2, I added keys and the keys are usually the merge by columns. and these keys are not nullable. So if in sas data, key is null then when I load into DB2, the entries with null key would be rejected automatically. And my uat and prod data might not match. how can I overcome this? is it a good way if I transferred null to empty string so it wouldnt be rejected by db2?

 

2 REPLIES 2
Kurt_Bremser
Super User

"Empty" is the same as "missing" for SAS character variables.

Today, most keys are UUIDs, and you can create such with the UUIDGEN function; format them to the readable 36-character notation for the csv file.

LinusH
Tourmaline | Level 20

If we are talking about strings, yes it could be done this way.

Remember that the key still needs to be unique.

I think yuo should take care of your data quality problem first before loading to DB2.

Data never sleeps

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 95 views
  • 0 likes
  • 3 in conversation