Forum Replies Created

Viewing 15 posts - 166 through 180 (of 844 total)

  • Reply To: Today's Random Word!

    Sean Lange wrote:

    Ray K wrote:

    Quiet

    Riot

    Bang

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • Reply To: pre-validate csv to SQL load

    If you are using SQL, then when you do an insert into the SQL will fail when it finds a field that doesn't match the data type or the constraints...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • Reply To: pre-validate csv to SQL load

    You could set up something in a data flow in SSIS to redirect the 'bad' rows.  Myself I like to load the CSV data to a 'work' table where all...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • Reply To: Synonyms for Tables

    Stewart "Arturius" Campbell wrote:

    why would anyone need to create a synonym over a temp table?

    Interesting question, thanks Steve

    That's what I was thinking.  Why would you?

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • Reply To: Basics to loading data

    Phil Parkin wrote:

    below86 wrote:

    Since I'm using SSIS to map the data from the flat file to my staging table I prefer to get all the data in the staging table, then...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • Reply To: Basics to loading data

    Jeff Moden wrote:

    below86 wrote:

    IMHO, you are on the right path.  I'm currently doing exactly what you described.  Importing flat, delimited files to a 'staging' table where all fields are defined as...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • Reply To: Basics to loading data

    IMHO, you are on the right path.  I'm currently doing exactly what you described.  Importing flat, delimited files to a 'staging' table where all fields are defined as VARCHAR(500), some...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • Reply To: Understanding the use of a CTE with MERGE

    Jeff Moden wrote:

    DesNorton wrote:

    I haven't used the MERGE statement since I got burned many years ago doing a

    WHEN NOT MATCHED BY SOURCE THEN DELETE

    As it turns out, you...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • Reply To: Understanding the use of a CTE with MERGE

    To me this is what the code is doing, modified just to make it easier to understand:

    /*WITH TRANSDETAIL_CTE (Property  , Account , Book , FinMonth ,...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • Reply To: Understanding the use of a CTE with MERGE

    Don't really need to know how or what built the #TRANSDETAIL_TEMP table.

    The CTE of TRANSDETAIL_CTE is some what like a temp table of the results from that SQL.

    Then you are...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • Reply To: Are Synonyms Useful?

    We (I) use synonyms a lot.  I tend to like to write SQL to do the data manipulations or whatever the task is.  Some of my co workers tend to...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • Reply To: Understanding the use of a CTE with MERGE

    Your code will be inserting, updating and deleting the results from the CTE, but it then doesn't do anything with the results of the CTE, not even selecting from it. ...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • Reply To: SQL Update Statement Awareness

    sequelgarrett wrote:

    I'm surprised more people didn't choose 1,2,3. The update will fail, leaving the 2nd select giving the original values.

    Exactly my thought.  I can't be expected to interpret the intent...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • Reply To: Where Clause in T-SQL

    The way you have it written you don't need the "TYPE <> 35 AND ACCT1 <> 2".  The check where the Type IN (30, 31) will insure you don't get...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • Reply To: What is wrong with my code?

    Jeff Moden wrote:

    michael.leach2015 wrote:

    In the later versions of SSMS, you can actually select a thin vertical line of "no characters".  Then when you type something, it will be typed on all...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

Viewing 15 posts - 166 through 180 (of 844 total)