BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Jaheuk
Obsidian | Level 7

dear all,

I am doing a proc transpose. the number of columns is based on the data.

If I put a query afterwards I would fetch all transposed columns:   select *.T1 from . . . .

 

HOW do I do this with query builder ??

 

Kr,

Herman

1 ACCEPTED SOLUTION

Accepted Solutions
CaseySmith
SAS Employee

EG's point-and-click Query Builder does not currently support generating "SELECT *" syntax.  It currently explicitly lists each column that you select in the Query Builder GUI.  So, you can select all the columns in the Query Builder GUI, but the generated SELECT statement will look like "SELECT col1, col2, ..., coln", rather than "SELECT *".

 

Adding explicit support for "SELECT *" to the Query Builder is on our roadmap.  It is a reasonable thing to want to do.

 

Thanks for the feedback.

 

Casey


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

View solution in original post

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

You are facing the (well one of the several) reason why not to transpose data.  SQL is built to work with few columns (i.e. small structure, lots of records), in fact SAS also works that way with by groups, although its a lot more flexible.  So unless you want that data that way for a report and no furter processing, then just don't transpose it.  It is far simpler to code with a normalised data structure, than to mess around trying to work out what columns are present etc.

CaseySmith
SAS Employee

EG's point-and-click Query Builder does not currently support generating "SELECT *" syntax.  It currently explicitly lists each column that you select in the Query Builder GUI.  So, you can select all the columns in the Query Builder GUI, but the generated SELECT statement will look like "SELECT col1, col2, ..., coln", rather than "SELECT *".

 

Adding explicit support for "SELECT *" to the Query Builder is on our roadmap.  It is a reasonable thing to want to do.

 

Thanks for the feedback.

 

Casey


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

PhilC
Rhodochrosite | Level 12
Casey,
why doesn't query builder support "select * "? Is there a reason? I want to request the incorporation of this but is there an obvious reason known amongst experts why it isn't that way?

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 3770 views
  • 0 likes
  • 4 in conversation