Forum Replies Created

Viewing 15 posts - 2,581 through 2,595 (of 13,853 total)

  • Reply To: Running SP Remotely that returns XML Document

    I don't know the answer, but if the problem you are having is specifically because of the XML datatype, have you considered casting the XML to NVARCHAR() and then casting...

  • Reply To: SSIS XML Parsing Error with Parent/Child Elements with Same Name

    Can you take the XSD out of the equation and parse the source XML directly, using T-SQL (after importing the XML into a staging table)?

    Or, as suggested above, a Script...

  • Reply To: Ignoring error and continue

    And the problem with your question is that you did not give me the full picture.

    Now you are drip-feeding clues into the thread as they come up, which is not...

  • Reply To: Ignoring error and continue

    How about this?

    SET @qry
    = 'SET NOCOUNT ON Declare @days INT select @days=LongValue from ' + @db_name
    + '.dbo.Settings

    where...
  • Reply To: Ignoring error and continue

    I don't approve of doing this – it wouldn't get past me in a code review – but you can do something like this:

    BEGIN TRY
    ...
  • Reply To: SSISDB Execution History - Vanished!

    alex.sqldba wrote:

    Sorry for wasting your time all, turns out this package has never been scheduled! There are very similar named packages in the same project, one letter difference! My eyes...

  • Reply To: SSISDB Execution History - Vanished!

    Has the history vanished for all projects, or just this one? Or is it just for this one package?

  • Reply To: Ignoring error and continue

    Rather than ignoring the error, it would be better to avoid it by first checking for the table's existence:

    IF OBJECT_ID('dbo.Test', 'U') IS NOT NULL
    BEGIN
    -- Add code here
    END;
  • Reply To: Are the posted questions getting worse?

    Steve Jones - SSC Editor wrote:

    Wait, dancing? Are we getting a video posted somewhere?

    I'm sure he's on Tik Tok already.

  • Reply To: ? ON Parsing an XML Field

    Another version:

    CREATE TABLE #X
    (
    SomeXML XML
    );

    INSERT #X
    (
    SomeXML
    )
    VALUES
    ('<Parameters xmlns="http://www.www.com/WebFramework/WorkflowParameters.xsd">
    <Parameter Name="ClientID" StringValue="12903166" />
    <Parameter Name="Workflow_ActiveSlide" StringValue="317" />
    <Parameter Name="Document_First_UserID" StringValue="8577430" />
    <Parameter Name="Program" StringValue="120555" />
    <Parameter...
  • Reply To: adding a Select statement to an existing table

    Jeff, to which article are you referring?

  • Reply To: Advice on using OPENJSON to parse a nested object array.

    mmichaels1970 wrote:

    Brilliant.  Absolutely brilliant!  Thank you so much, I'm new to working with JSON in SQL and just couldn't find the right technique.  I was able to write a c#...

  • Reply To: Advice on using OPENJSON to parse a nested object array.

    Does this help?

    DECLARE @json NVARCHAR(MAX);

    SET @json
    = N'[{"id":349978,"resource_uri":"https:\/\/api.myapi.com\/rest\/v1.0\/vehicle\/349978","name":"Test Vehicle",

    "code":"12345","status":1,"taxable":"state","tank_capacity":0,"product_type":"Allow All","product":[],"custom_data_field":[{"id":1,"label":"Company","value":"2"},

    {"id":2,"label":null,"value":null},{"id":3,"label":null,"value":null}],"access_groups":[],"drivers":[]},

    {"id":349979,"resource_uri":"https:\/\/api.myapi.com\/rest\/v1.0\/vehicle\/349979","name":"TestVehicle_ONRD","code":"TES123",

    "status":1,"taxable":"none","tank_capacity":0,"product_type":"Allow All","product":[],

    "custom_data_field":[{"id":1,"label":"Company","value":"70"},{"id":2,"label":null,"value":null},{"id":3,"label":null,"value":null}],"access_groups":[],"drivers":[]}]';

    SELECT d.id, cd.value
    FROM
    OPENJSON(@json)
    WITH
    ...
  • Reply To: Debug SSIS import from Excel to SQL Server

    I decided to check this out by running a package in debug mode in VS2019.

    When I do this, I see two debug processes, one 32-bit and one 64-bit, suggesting both...

  • Reply To: how to rename ssis solutionwith subfolders

    Whenever I need to perform this sort of task, I usually do the work in Notepad++, rather than VS.

    From what you are saying, I think my approach would be something...

Viewing 15 posts - 2,581 through 2,595 (of 13,853 total)