Forum Replies Created

Viewing 15 posts - 151 through 165 (of 422 total)

  • RE: variables and Escape quotes

    I would use Jeff Moden's DelimitedSplit8K function to do this:

    First create some sample data:

    IF OBJECT_ID('tempdb..#Cars') IS NOT NULL

    DROP TABLE #Cars

    CREATE TABLE #Cars (

    [ID] INT IDENTITY(1,1) NOT...

  • RE: Find the second comma

    shohelr2003 (5/12/2013)


    Dear,

    I have a String='A,B,C'.

    I want to find A, B, C individually using substing function. There may be 3 select statements. But I can't find the 2nd Comma(',') from that...

  • RE: given a date, tell me how many seconds from 1900

    :laugh: I wish I was still 46!

    When I saw your question last night I remembered a similar scenario concerning UniData date conversions on which I made a post.

    UniData date...

  • RE: given a date, tell me how many seconds from 1900

    Just for fun I took this ball and ran with it...here's a procedure I whipped up that counts the number of periods between any two dates for years, quarters, weeks,...

  • RE: SSIS Data flow failing

    If you haven't already done so and you have access to the SQL Server Agent node I'd take a peek at the job error logs to see if that tells...

  • RE: SSIS Data flow failing

    Yeah, these imports can be a real PITA...especially so when everything's been working fine and then sudden failure. So I must ask: any server updates? patches? permission changes? Or perhaps...

  • RE: SSIS Data flow failing

    Check your settings and create smaller batches if necessary (see screenshot below).

    Also, I would import into non-indexed staging tables. If your staging tables have indexes, add a drop indexes step...

  • RE: LEFT and RIGHT of Delimiter

    IF OBJECT_ID('tempdb..#TempTable') IS NOT NULL

    DROP TABLE #TempTable

    CREATE TABLE #TempTable (

    [ID] INT IDENTITY(1,1) NOT NULL,

    [DString] NVARCHAR(255) NULL,

    PRIMARY KEY (ID))

    INSERT...

  • RE: GROUP BY question

    Sergiy (5/7/2013)


    Abu Dina (5/7/2013)


    Where SiteID = 1 for 'UK' and SiteID = 2 for 'SCOTLAND' come from?

    It's right there in your screenshot. Whenever you ask for help unless you give...

  • RE: GROUP BY question

    IF OBJECT_ID('tempdb..#SiteMatches') IS NOT NULL

    DROP TABLE #SiteMatches

    CREATE TABLE #SiteMatches -- the SOURCE

    (ID BIGINT IDENTITY(1,1) NOT NULL,

    RetainedRID BIGINT NOT NULL,

    ...

  • RE: T-SQL help

    Try this (function posted below) the script:

    DECLARE @people AS TABLE

    (person VARCHAR(20)

    ,dob DATE)

    DECLARE @SDate...

  • RE: Sorting Records Going Into New Table.

    mcertini (5/5/2013)


    I am having problems ordering records to go into another table. The following is my code:

    USE

    EURUSD

    GO

    SELECT *

    INTO NEWTABLE

    FROM OLDTABLE

    ORDER BY RECORD

    After processing into another table I still have...

  • RE: Return Distinct Rows

    Select Distinct

    b.BoatID,

    b.Title,

    b.YearOfRegistration as Registration,

    case b.Condition

    ...

  • RE: HOW TO PASS UPDATE QUERY WITH EXECUTE COMMAND

    I agree with Gail here. Passing TSQL through as input is just asking for trouble.

    Better would be to move the code into a procedure something like this:

    OLD METHOD

    Exec proce_Name 'update...

  • RE: Need help with CASE

    Here's another approach you can try. The procedure depends on a simple iTVF to locate the letter locations which has the advantage of being able to find multiple instances within...

Viewing 15 posts - 151 through 165 (of 422 total)