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

Can we use CAT Function on numeric columns?

 

And what is the difference between CATS, CATX and CATT functions.

I am getting confuse between these function.

 

And what is the data type of the resulted values

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Can we use CAT Function on numeric columns?

Yes, but it applies the BEST function to convert them and that may not be what you want. Especially if you have dollars or comma's in your data.

 

For the other functions, check out this paper, it's 15 page so a bit longer but covers them in detail. In general, if you need information on a  specific topic, search that topic on lexjansen.com and you'll find a ton of resources:

http://support.sas.com/resources/papers/proceedings10/205-2010.pdf

 

 

SAS CATS documentation, specifically see the "comparisons" and "see also" sections which link you to related functions and highlights the differences. 

https://go.documentation.sas.com/?docsetId=ds2ref&docsetTarget=n0neggc3ooichfn17gw7hyal8kin.htm&docs...


@Nidhi_vats wrote:

Can we use CAT Function on numeric columns?

 

And what is the difference between CATS, CATX and CATT functions.

I am getting confuse between these function.

 

And what is the data type of the resulted values

 

 


 

 

View solution in original post

4 REPLIES 4
Cynthia_sas
Diamond | Level 26
Hi:
I suggest reading the documentation about the differences, it is very clear in the doc. The result of concatenation is a character variable.
Cynthia
AndrewHowell
Moderator

(Sounds like a test question)..

 

@Nidhi_vats - do some basic research of your own, maybe even try out some examples. By the time you typed out your question, you probably could have Google'd the answer.

 

If there's something you've found & don't understand, or want to discuss pros & cons of the various functions (and also the concatenation operators (!!, ||, etc), post here and then let's talk..

Reeza
Super User

Can we use CAT Function on numeric columns?

Yes, but it applies the BEST function to convert them and that may not be what you want. Especially if you have dollars or comma's in your data.

 

For the other functions, check out this paper, it's 15 page so a bit longer but covers them in detail. In general, if you need information on a  specific topic, search that topic on lexjansen.com and you'll find a ton of resources:

http://support.sas.com/resources/papers/proceedings10/205-2010.pdf

 

 

SAS CATS documentation, specifically see the "comparisons" and "see also" sections which link you to related functions and highlights the differences. 

https://go.documentation.sas.com/?docsetId=ds2ref&docsetTarget=n0neggc3ooichfn17gw7hyal8kin.htm&docs...


@Nidhi_vats wrote:

Can we use CAT Function on numeric columns?

 

And what is the difference between CATS, CATX and CATT functions.

I am getting confuse between these function.

 

And what is the data type of the resulted values

 

 


 

 

ballardw
Super User

@Nidhi_vats wrote:

Can we use CAT Function on numeric columns?

 

And what is the difference between CATS, CATX and CATT functions.

I am getting confuse between these function.

 

And what is the data type of the resulted values

 

 


Are CAT and CATQ functions included in the confusion? How about the || operator?

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
  • 4 replies
  • 1834 views
  • 2 likes
  • 5 in conversation