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

Hello experts/guru's,

I am a newbie in SAS and as part of my job have to learn it in a months time. I was initially panicked but now I see that SAS EG has the query builder and other neat tools that can be used without using SAS code. Is this a fair statement?

FYI, I am expert in MS Access and Excel. The query builder intuitively feels like MS Access ("if you will"). Are there any constraints using query builder or other user friendly tools in SAS EG?

Question pertaining to a query - I want to filter the product listing based on the beginning word of the product, example "A". I do not explicitly see any in the query builder filter options?

I would greatly appreciate your inputs.

Thanks in advance.

Raj

1 ACCEPTED SOLUTION

Accepted Solutions
TomKari
Onyx | Level 15

Hi, Raj

I have fairly extensive experience with Enterprise Guide. You are definitely on a good track; the Query Builder is very powerful, and under the covers it uses a SAS facility called "PROC SQL", so your SQL knowledge from Access will be quite transferable.

PROC SQL is a pretty good implementation of SQL, with a lot of SAS extensions. In particular, SAS has a very rich set of functions, many of which can be used in the usual way in PROC SQL, and therefore in the Query Builder. All of the SAS documentation is available online. If you need advice on how to traverse the documentation, send me a Direct Message, and we can take it offline.

Another piece of advice for beginners is to use the Query Builder to transform your data into a form suitable for analysis, but to then use the analytical tasks in Enterprise Guide to do the analysis. They are very powerful, and not too hard to use.

In terms of using the Query Builder, I suggest that you follow this path:

1. Try to accomplish your results using the point and click facilities in Query Builder;

2. If you need to do something that you can't this way, try using the Expression Builder. It needs a little more knowledge, but it's somewhat guided;

3. Again, if you need more, to as much as you can in Query Builder. You can then save the SAS code that is generated, extend it, and submit it to SAS through a code window.

If you haven't taken the Enterprise Guide tutorial, give it a try. I hear it's pretty good.

And of course, keep posting your questions to this forum!

  Tom

View solution in original post

11 REPLIES 11
art297
Opal | Level 21

I am not an EG expert, but I can answer your last question.

You have at least two options:

1 use between A and Azzzzzzzzzzzzzzz

2 if you are familiar with pattern matching you can create a pattern that specifies starts with A

SASKiwi
PROC Star

As with most end-user automation tools you will probably find they do the job 80% of the time, but for the 20% remaining you can resort to coding the answer.

BTW I think you will find the answer to your question if you look at the advanced filter option of the Query Builder and then select pattern matching

Patrick
Opal | Level 21

As SASKiwi suggests go to the advanced filter, select the column you want to filter on and then type LIKE 'A%'

Rish
Calcite | Level 5

Arthur/SASkiwi/Patrick -

I appreciate your inputs.

Patrick
Opal | Level 21

Could you then please mark this question as answered so that I and others don't look at it again.

Rish
Calcite | Level 5

Sorry. I was not aware. I could not find "answered" - clicked on "assumed answer". Is that you close out?

art297
Opal | Level 21

Raj,

Yes, that will keep others from addressing an already answered question.  However, you would have found the correct and helpful icons if you clicked on the post(s) that you found either helpful or correct.

Marking specific posts that way serves at least two purposes in addition to letting others know that a question has already been answered.  First, it lets people quickly filter through responses to find those which others found to be either the correct answer or at least helpful.

Second, you'll notice that everyone has a point value after their name.  People get points when they post, more points when someone marks one of their posts as being helpful, and even more points when a post is selected as representing a "correct" answer.

The point system is the only way that forum members get "paid".  The points aren't exchangeable for anything, but are valued by the forum's members.

Art

TomKari
Onyx | Level 15

Hi, Raj

I have fairly extensive experience with Enterprise Guide. You are definitely on a good track; the Query Builder is very powerful, and under the covers it uses a SAS facility called "PROC SQL", so your SQL knowledge from Access will be quite transferable.

PROC SQL is a pretty good implementation of SQL, with a lot of SAS extensions. In particular, SAS has a very rich set of functions, many of which can be used in the usual way in PROC SQL, and therefore in the Query Builder. All of the SAS documentation is available online. If you need advice on how to traverse the documentation, send me a Direct Message, and we can take it offline.

Another piece of advice for beginners is to use the Query Builder to transform your data into a form suitable for analysis, but to then use the analytical tasks in Enterprise Guide to do the analysis. They are very powerful, and not too hard to use.

In terms of using the Query Builder, I suggest that you follow this path:

1. Try to accomplish your results using the point and click facilities in Query Builder;

2. If you need to do something that you can't this way, try using the Expression Builder. It needs a little more knowledge, but it's somewhat guided;

3. Again, if you need more, to as much as you can in Query Builder. You can then save the SAS code that is generated, extend it, and submit it to SAS through a code window.

If you haven't taken the Enterprise Guide tutorial, give it a try. I hear it's pretty good.

And of course, keep posting your questions to this forum!

  Tom

Rish
Calcite | Level 5

Hi Tom,

I greatly appreciate your inputs.

I agree EG tutorial is real good and actually it gave the confidence that i can do it.

Where do you find Expression builder (while creating a query)?

How do i send a direct message? It will be very helpful if you can point me to the SAS documentation.

Thanks again

Raj

TomKari
Onyx | Level 15

We'll take the conversation off-line. I think I've set things up for the two of us to get a direct connection...you should be getting a notice to accept my connection request.

  Tom

TomKari
Onyx | Level 15

Hi, Raj

Looks like my attempt to connect through the forums didn't work.

Send me an email at

gishpuppy.x0k@gishpuppy.com

and we'll keep the conversation going.

  Best,

  Tom

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 11 replies
  • 1155 views
  • 6 likes
  • 5 in conversation