How to use varibles in SQL query

O

OD

I'm tring to upsize my access 2007 database to SQL. In access I created a
function to accept a varible, then I could use the function in the query.

SEE BELOW:

Public Function IDNum() As Integer
IDNum = varID
End Function

Can this be done if I use SQL Tables?

Thanks
OD
 
P

PieterLinden via AccessMonster.com

OD said:
I'm tring to upsize my access 2007 database to SQL. In access I created a
function to accept a varible, then I could use the function in the query.

SEE BELOW:

Public Function IDNum() As Integer
IDNum = varID
End Function

Can this be done if I use SQL Tables?

Thanks
OD

If you are trying to upsize your function, then no. You would have to
rewrite it in T-SQL. Then you could create dynamic SQL or a native SQL
function in your stored procedure
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top