• I'm not sure what's the problem as I get those results immediately in my laptop. A different option that we use here is using OPENXML which requires sp_xml_preparedocument and sp_xml_removedocument.


    DECLARE @iDoc int;
    --Create an internal representation of the XML document.
    EXEC sp_xml_preparedocument @iDoc OUTPUT, @p2;

    SELECT *
    FROM OPENXML (@iDoc, '/ROOT/R', 1)
      WITH (
          ID     BIGINT,
          PrimID    INT,
          AuthID    INT,
          ProgID    INT,
          ServiceCodeID INT,
          WorkerID   INT,
          Date    DATETIME,
          StartTime   DATETIME,
          EndTime   DATETIME,
          RequestID   INT,
          GPermID   INT,
          PayRateOverride VARCHAR(30),
          AutoScheduled BIT);

    --Release XML document
    EXEC sp_xml_removedocument @iDoc;

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2