@Boswser wrote:
I have a run I inherited that transposes data. For some reason, this transpose sticks 30+ empty spaces in front of the NOV2018 values, so the requester has to trim it and has asked if I can prevent that issue.
I inserted a Query Builder step to trim, but noticed that the number of columns generated by the run depends on the data. So the columns I grab with the query builder are not always there, causing the run to fail.
I’m looking into using PROC SQL language to achieve this instead of QB, but I am running into a similar issue. I need to use SELECT * to make sure I grab each column that’s created, but I can’t trim down the date column without naming it in the SELECT statement. If I name the columns, I run into the same problem as QB.
Is there a way to SELECT * in QB or PROC SQL and still be able to trim a named column?
Perhaps time to look at the code doing the TRANSPOSE of the data and address the issue at the start instead of fixing later.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.