Reply to Re: Input Paramter as part of OPENDATASOURCE

Your name:

Reply:


Posted by Erland Sommarskog on 01/26/07 22:57

paddy_nyr (mpprpp@yahoo.com) writes:
> I want to use an input parameter as my filename, but I get a synatax
> error message. Howerve, when I hard code the filename the proc compiles
> successfully.

Dynamic SQL is the only way out. See
http://www.sommarskog.se/dynamic_sql.html#OPENQUERY
for an example with OPENQUERY that you can use as starter.

If you've never seen dynamic SQL before, I recommend that you read the
entire article, before you start using it all over town.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация