Reply to Re: Import flat file into SQL Server 2005 Express

Your name:

Reply:


Posted by cabrenner on 01/10/07 15:50

Thanks for all the info - I figured out how to use the dynamic sql.

Erland Sommarskog wrote:
> (cabrenner@optonline.net) writes:
> > INSERT INTO tbl_ups_eInvoice_tmpData Select GFF.*
> > FROM OPENROWSET(
> > 'Microsoft.Jet.OLEDB.4.0',
> > ' + @strConnect + ';'admin';'',
> > 'Select * FROM tbl_ups_eInvoice_tmpData'
> > ) as GFF
> >
> > Set @btSuccess = 1
> >
> > END
> >
> > Does OPENROWSET not allow a variable to be used?
>
> No. Either you have to use dynamic SQL, or define a linked server on the
> fly. The former is probably simpler. Look at
> http://www.sommarskog.se/dynamic_sql.html#OPENQUERY for a similar example
> on how to deal with the nested strings.
>
>
> --
> 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

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