Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can parameters be used in a query?

Status
Not open for further replies.

dbdinc

MIS
Apr 13, 2007
58
US
Can you use parameters in a query?
Posted: May 16, 2007 11:49 AM
I know parameters can be used in the WHERE and GROUP portions of a query, but am wondering:

Can parameters be used in the "CREATE TABLE..." part of a query, like in the following piece of code:

CREATE TABLE HFA987A AS SELECT
EMPLOYEE.CAMPUS FORMAT=$63.,
&requestingcollege AS REQUESTING_COLLEGE format=$4.,
EMPLOYEE.CAMPUS_DESC FORMAT=$255.,
EMPLOYEE.COLLEGE FORMAT=$63.,

What I am trying to do is to incorporate my parameter data into my table being created. If anyone has an idea or two on how to do this, I would really appreciate hearing from you. Thanks in advance!
 
Yes, you can do this, but add double quotes around the parameter if it is a text field.

Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
 
Thanks, Chris,

I already got that solution from other sources, but do appreciate you replying. I jusdt couldn't wait several days and therefore researched other sources of information.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top