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
SAS Super FREQ
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?

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1084 views
  • 2 likes
  • 5 in conversation