Hello.
I would like to delete the rows where the location is "World". This is my code and it doesn't delete it.
DELETE FROM d1.COVID_DATA
WHERE location="world";
I don't have SAS here (can't test) but try to make comparisons neutral, always. For example:
upcase(strip(location)) = "WORLD"
Lowcase works too.
Is that the full code you ran?
That wouldn't be valid, you ned to wrap your code in a proc or data step for starters.
If it isn't the full code, please post the actual code and indicate what errors you received or why you think it isn't working. As @AlanC indicated the case does need to match as well.
proc sql;
delete from d1.covid_data
where lowcase(location) = 'world';
quit;
@Feksan wrote:
Hello.
I would like to delete the rows where the location is "World". This is my code and it doesn't delete it.
DELETE FROM d1.COVID_DATA
WHERE location="world";
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: