Forum Replies Created

Viewing 15 posts - 16 through 30 (of 57 total)

  • RE: Generate MERGE statements with Table data

    danere (4/17/2012)


    john.moreno (4/16/2012)

    The problem is that PRINT can only print 4000/8000 characters (depending upon whether it is varchar or nvarchar), so the solution depends upon your data.

    If all of the...

  • RE: Generate MERGE statements with Table data

    danere (4/15/2012)


    Regarding the PRINT statement enhancement you suggested, I ran into an issue with truncation of result sets over 4000 characters in length. Any ideas how to get around this?

    The...

  • RE: Generate MERGE statements with Table data

    One final note, you're comparing the columns using <> which fails to produce a match when either column is NULL. I replaced your single SOURCE.Column <> TARGET.Column check with...

  • RE: Generate MERGE statements with Table data

    danere (4/3/2012)


    Thanks for that John, I've revised the script to include the Primary Key check.

    Unfortunately I'm not able to edit the original article, so have zipped the SQL file here:

    You...

  • RE: Generate MERGE statements with Table data

    Needs a check for tables without primary keys.

    IF IsNull(@PK_column_list, '') = ''

    BEGIN

    RAISERROR('Table has no primary keys. There should at least be one column in order to have...

  • RE: Three Attack Vectors in SQL Server 2005

    Hugo Kornelis (3/7/2012)


    The three methods mentioned in the article all require (assuming that the domain and SQL Server have been setup wisely) that the person performing the "attack" has access...

  • RE: Using SP_

    Toreador (12/14/2011)


    Nice question, but not sure about the explanation. Surely the crucial point is that object_id('sp_mytable') is null, even though a select against that table recognises it (and a drop...

  • RE: Output of Query

    jigsm_shah (10/11/2011)


    As the correct output is Null,'Is Zero', 'Is One', 'Is Two'.

    I want to know why NULL is also the part of the output.

    The explanation says that:

    The statement CASE COL1...

  • RE: Output of Query

    I'd like to suggest a modification of the answer. What is happening is that the "CASE COLUMN WHEN" syntax does an equity comparision and then uses the result of...

  • RE: July 4

    Trey Staker (7/5/2011)


    Who guessed Barbados? LOL.

    I did. The category said "humor" not "history"...

  • RE: Arithmetic overflow error converting varchar to data type numeric.

    Nat Na (11/18/2010)


    I'm with a very similiar problem and I tried to test this last code to check if it solves my problem. But it doesn't helped me.

    The difference between...

  • RE: T-SQL

    Hugo Kornelis (1/3/2011)


    After reading your reply, I started to doubt, so I copied the script, pasted it in SSMS, changed it to work for SQL Server 2005

    Which is a bit...

  • RE: LIKE and = Operators

    SanDroid,

    That's it exactly. Setting ansi_padding immediately before the table is created results in repeatable results.

  • RE: LIKE and = Operators

    bitbucket-25253 (12/6/2010)


    john.moreno

    hmm I tested repeatedly on both 5K and 8K before submitting the question .. always produced the identical answers on all servers...

    Are you sure you executed the first 6...

  • RE: LIKE and = Operators

    I'm getting different results depending upon whether I run the script against a SQL 2005 or SQl 2008 server (no trailing spaces on 2008, no results from second select). ...

Viewing 15 posts - 16 through 30 (of 57 total)