03-05-2015 06:47 AM
Hey guys hope you can help me out on this one.
I have a database of 13 ships with alot of other variables.
I am trying to delete one of these ships from my database.
i have a variable collum called: VESSEL
I am using the following code:
if vessel= 'urkkotter' then delete;
Sas runs the code and does create a new table however, it does not delete the vessel 'urkkotter'
resulting in the new table being exactly the same as the Remco.tuna table.
I get no errors or notes in the log file.
Hope you can help out.
03-05-2015 08:27 AM
Most likely the value in the variable is different than what you used in the IF statement.
Case differences. Try lowcase(vessel) = 'urkkotter'
Leading spaces in the variable. Try strip(vessel)='urkkotter'
Other hidden characters such as tab or non-breaking space. Use PUT VESSEL= $HEX. ; To see in the log the actual values.
The variable is formatted and you are trying to select on the formatted value instead of the actual value. Try Vvalue(vessel) = 'urkkotter'