Maiia S. Maiia S. - 6 months ago 37
SQL Question

Add a Number in Front of the String - PROC SQL

The question is very basic, but your input is greatly appreciated.

I basically need to add '1' in front of the existing value of the variable (no space as delimiter). Here is my best attempt so far:

proc sql;
create table as select * from connection to oracle
select catx('','1',A.Var_Name) AS "#New_Var" from table_name;

Answer Source

I don't quite get what you want. If you have a column in Oracle and want to concatenate a value, you can use:

proc sql;
    select '1' || a.Var_Name
    from table_name;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download