Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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


.



Relevant Pages

  • CmdExec job problem
    ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.programming)
  • Re: Error: 16954, Severity: 10, State: 1 and Timeout problem
    ... On this DB are runing lot of threads from different applications. ... Probably, other aplication are locking resources, so the first one need ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: Systematically determine DRI problem(s)
    ... "the original designer probably meant to link them via customer_ID" ... Erland Sommarskog wrote: ... >> of effort to find data problem for the given situation, ... > Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: Grant access to applications only
    ... but to deny a direct user login e.g. via management studio. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.security)
  • Re: Applying tranaction log to old data file
    ... "Erland Sommarskog" wrote in message ... Should I restore old backup, ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)