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

dinamic sql problem

Status
Not open for further replies.

victorashi

IS-IT--Management
Jul 22, 2006
32
0
0
RO
i want to make a query in VS2005 wich allows me to dinamicaly imput a table and a column , something like :

select * from @a where @b='something'

can someone pls help me with the sintax?
thank you
 
Code:
EXEC 'select * from '+@a+' where '+@b+'=''something'''

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top