Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 dynamic openquery building

Author  Topic 

jtwork
Yak Posting Veteran

82 Posts

Posted - 2008-10-23 : 04:53:32


I am able to write dynamic open querys but i remember ready somewhere of an easier way than having to use loads of '''''

It explained how to write the query into a variable and then using some absolute function join the query together but i cant for the life of me remember how or where this example went/is. Does anyone know what i might be after??

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-23 : 05:09:43
http://www.sommarskog.se/dynamic_sql.html#OPENQUERY
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-10-23 : 05:50:38
Refer this to know why there are loads of ''''
http://sqlblogcasts.com/blogs/madhivanan/archive/2008/02/19/understanding-single-quotes.aspx


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2008-10-23 : 07:30:58
I think you are talking about QUOTENAME() -- look it up in books online.

Also, follow the links posted. They are very good articles.

-------------
Charlie
Go to Top of Page
   

- Advertisement -