07-18-2012 07:02 PM
following code is working with SAS 4.1 but now with SAS 4.3
(SCANQ(CALCULATED BID1, 1,"-")) AS ID
getting the following error message
ERROR: The following columns were not found as CALCULATED references in the immediate query: ID
07-19-2012 12:38 AM
''n is the sas way of reading the column names with spaces in between,if you dont specify this then sas will treat as two different variables.
you should also use
Hope this helps.
07-19-2012 03:50 AM
If I understand correctly, this statement is part of SQL, not a variable name with space, therefore I'd suggest to check if BID1 is derived in the same SQL step.
My test on SAS 9.1.3 works fine:
allnames='Eleanor "Billie Holiday" Fagan';
array new(*) $16 name1 name2 name3;
do i=1 to dim(new);
select catx("-", name1, name2, name3) as bid1
,SCANQ(CALCULATED BID1, 1,"-") as id
It would be more helpful if you pasted all SQL statement.