• gregg_dn (1/3/2011)


    I'm getting an the following error when I try to run the OPENROWSET function:

    DECLARE @CD TABLE (XMLData XML);

    INSERT INTO @CD

    SELECT *

    FROM OPENROWSET(BULK N'C:\SQL\cd_catalog.xml', SINGLE_BlOB)

    Msg 491, Level 16, State 1, Line 5

    A correlation name must be specified for the bulk rowset in the from clause.

    Is there something in the code beyond SINGLE_BLOB) ?

    Thanks

    G. Daniels

    Yes, as the author noted, you have to provide an alias to the OpenRowset. In his example the author used rs. This will get you past that particular error. Good luck.