BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
kajal_30
Quartz | Level 8

Hi Team ,

In the database table I have a column qr_sac which is defined as Boolean while creation.In sas table I have values for this column like 'N','Y','N','N' ...... I am appending sas table to the database table. I am not seeing any errors while appending but the final database table is showing values like screenshot below.Can anyone please help. I am expecting to see same values like SAS 'Y' or 'N'. 

kajal_30_0-1655902120038.png

Regards

Kajal

 

1 ACCEPTED SOLUTION

Accepted Solutions
kajal_30
Quartz | Level 8

Hi @Tom 

 

I am loading it to Netezza database. I am using base sas to load it. Yeah I also read the same and now I am creating the database table column type as char so that I can store values 'Y' or 'N' . so changed the type from Boolean to char worked fine. 

Thanks

Kajal

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

What do you mean by "database table"?  Do you mean some non SAS database?  What database?  How did you load the values from the SAS dataset into that external database?  Are you using SAS to do the loading?  How?

 

If the field is BOOLEAN there is no way to store character strings like Y or N.  Just boolean TRUE or FALSE values.  It looks like in whatever GUI tool you are using to look at the data they are displaying the boolean value as either a filled or empty box.  I assume the TRUE values are being displayed as filled box. 

 

Perhaps whatever tool you are using to generate the image you posted has an option to display boolean values as Y or N?

kajal_30
Quartz | Level 8

Hi @Tom 

 

I am loading it to Netezza database. I am using base sas to load it. Yeah I also read the same and now I am creating the database table column type as char so that I can store values 'Y' or 'N' . so changed the type from Boolean to char worked fine. 

Thanks

Kajal

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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