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

declare and set variables in Access SQL

Status
Not open for further replies.
Sep 25, 2002
159
US
hello,

I am trying to create an update sql statement that accepts variables. I know how to do this in SQL Server using DECLARE @myVar Char(10), etc...but it seems like access will not even let me build an SQL statement unless it is a straight INSERT, DELETE or UPDATE statement. Is it possible to declare and set variables in an Access SQL Statement?
 
no

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Sorry, I should have suggested you can use vba code combined with sql but hosted primarily in a module, not sql.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
it is possible to have parameters in a access query, but they are not the same as variables in T-sql...

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top