Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Joel <Joel@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 28 Jul 2009 14:19:02 -0700
Erland,
I removed the leading @ and added [1] - plus had already worked the other
items earlier today -- and . . . . we have SUCCESS!!!
Can you believe it?
Thanks for persevering!
"Erland Sommarskog" wrote:
Joel (Joel@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:.
1) I have doubts about that "Select Into" statement I put in there -
Does it belong?
Not sure what you mean, I couldn't see any SELECT INTO in the procedure...
2) Regarding the particular error currently preventing successful
execution: Incorrect syntax near '='. It is raised on the first line
of the SELECT statement . . . .
SELECT
YEARGL = T.Item.value('../../@YEARGL', 'smallint'),
TCODEGL = T.Item.value('@TCODEGL', 'int'),
SPANGL = T.Item.value('@SPANGL', 'nvarchar(13)',
Now, that's a simple one: look at end of the last line. All lines in
the SELECT list but the first two are like that.
3) And in the FROM statement . . . I have no confidence in the path I have
used:
@xml_doc.nodes('/Temp_GLData') as T(Item)
Should there be more than one node? A "root" node perhaps?
Yes,
@xml_doc.nodes('/dataroot/Temp_GLData') as T(Item)
as "dataroot" is the top-level tag in the document. I think you would
get away wuth "Temp_GLData" without any leading slash, but I've learnt
that can be a performance sinker.
The full stored procedure from today is located at:
http://www.state.vt.us/tax/pdf.word.excel/pvr/txrpdfs/XmlFiles.zip
Thanks, you you're too kind!
Also today I've determined that I can't control element-centered v.
attribute-centered coming out of the Access export. Looks like I have to
use element-based XML.
Too bad. This means that you need to remove the leading @, which specifies
that you are looking for an attribute. Instead you need to add [1] to
specify that it is the first element.
Also, you had:
'../../@YEARGL'
This should be YEARGL[1] just like the rest.
I understand this is more than a mouthful right now, but SQL Server MVP
Michael Coles has a book on APress entitled "SQL Server 2008 XML".
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
- Follow-Ups:
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Erland Sommarskog
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- References:
- Cannot fetch a row from OLE DB provider "BULK" for linked server
- From: Joel
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked server
- From: Erland Sommarskog
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Joel
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Erland Sommarskog
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Joel
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Joel
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Erland Sommarskog
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Joel
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Erland Sommarskog
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Joel
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Erland Sommarskog
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Joel
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Erland Sommarskog
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Joel
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Erland Sommarskog
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Joel
- Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- From: Erland Sommarskog
- Cannot fetch a row from OLE DB provider "BULK" for linked server
- Prev by Date: SELECT that returns a tag based on column value
- Next by Date: Re: SELECT that returns a tag based on column value
- Previous by thread: Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- Next by thread: Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
- Index(es):
Relevant Pages
|