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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter Query....

Status
Not open for further replies.

mikej336

MIS
Feb 10, 2005
164
US
I am trying to create a Access style Parameter Query were the query pops up a window and asks you what to search for.

The online help says that this is an example.

SELECT title_id
FROM titleauthor
WHERE (au_id = ?)

But when I run it, it comes back with

Incorrect syntax near '?'.

Any Ideas.

Thanks
 
the short answer is you can't do that in T-SQl. THat is a problem for your user interface not t-sql.

Write a stopred proc with an input parameter. Then use your user interface to get the user to specify a value and then exec the sp with the value your user gave the interface.

Questions about posting. See faq183-874
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top