CrystalProgDev
Programmer
I need to place the select statement into a variable. I have some thing like this
SELECTSTMT VARCHAR2 (2500)
:= 'TO_CHAR (Date_Col, 'MM/DD/RRRR'),'
+'col_nm1,'
+'" DECODE ('col_nm2,''0', 'Active Part',' DECODE (col_nm2,''1', 'Obsolete Part',DECODE(col_nm2, '2', 'In-Process Release'))) AS col_nm2val,"'
+' col_nm3 ,'
+'col_nm4 ,'
+ 'col_nm5';
It looks like there is some problem with single quotes. I tried with double quotes and single quotes. but no luck. Can any one please provide me the right way to do this?
SELECTSTMT VARCHAR2 (2500)
:= 'TO_CHAR (Date_Col, 'MM/DD/RRRR'),'
+'col_nm1,'
+'" DECODE ('col_nm2,''0', 'Active Part',' DECODE (col_nm2,''1', 'Obsolete Part',DECODE(col_nm2, '2', 'In-Process Release'))) AS col_nm2val,"'
+' col_nm3 ,'
+'col_nm4 ,'
+ 'col_nm5';
It looks like there is some problem with single quotes. I tried with double quotes and single quotes. but no luck. Can any one please provide me the right way to do this?