Forum Replies Created

Viewing 15 posts - 1,306 through 1,320 (of 1,554 total)

  • RE: Returning current table name to a trigger

    All things 'universal' makes me think 'dynamic SQL'.... Before you even think about walking down dynamic boulevard, read this - http://www.sommarskog.se/dynamic_sql.html - and take a good time thinking if this is...

  • RE: Generating INSERT statements in SQL Server

    Why not use good old bcp, or even the DTS wizard can do this kind of stuff with a few clicks?

    /Kenneth

  • RE: What fires the Trigger?

    You don't want to mail from within a trigger.

    It will cause you all sorts of problems, grey hair etc.

    It is much better to have the trigger just notify that a...

  • RE: Using Declare and SET in an INSERT statement using a stored procedure

    Is there any particular reason you bother with an intelligent PK?

    In general, one of the criterias for a 'good' PK - is that it should not mean anything. PK's with...

  • RE: Undocumentated Extended SP

    'Undocumented' in this sense really means 'unsupported' - documentation exists, only not any official documentation from MS.

    Many of the undocumented xp's are documented in books, papers, on the web etc......

  • RE: Multiple Where Clause

    I believe that you could do it with a three-way join...

    SELECT a.col, b.col, c.col, .....

    FROM tableA a

    JOIN tableB b

    ON   a.GroupID = b.GroupID

    AND  a.groupID = @GroupName

    JOIN tableC c

    ON   b.ContactNo...

  • RE: Stored procedure problem please help

    Digging into the data is always a good idea, though the poster explained it as the 'error' occured when running from the app, but when validating the same thing 'directly'...

  • RE: Retruning Clause ?

    If by 'row id' SQL Server's identity is implied, you can use either of SCOPE_IDENTITY, IDENT_CURRENT, or @@IDENTITY.

    They are slightly different in how they work, look up 'SCOPE_IDENTITY' in BOL and...

  • RE: Performanceproblem, but where to look?

    There are some things that will force table scans (thus rendering indices useless)

    Such things as:

    negations, leading wildcards, functions... 

    WHERE myCol <> 1 

    WHERE myCol NOT LIKE 'a%'

    WHERE myCol LIKE '%a'

    WHERE DATEDIFF(day, myDateCol,...

  • RE: Insert/Update Trigger to replace column value

    Well, in such a case 'A' trigger won't cut it - you'd need 50 triggers - one for each table.

    If I understand it correctly, the insert/update code is on SQL...

  • RE: query processor ran

    All sorts of funny things can hapen when you introduce control charachters in the data. imo they don't belong there, tables are for data, not layout.

  • RE: Stored procedure problem please help

    I won't pretend that I understand what the proc is doing, but I would look at two things:

    either the app is sending the wrong parameters?

    or if you have connection pooling...

  • RE: Performanceproblem, but where to look?

    It might. Especially when selecting columns and inserting into another table, a lot of I/O is involved. Diskaccess is the one slowest thing of all in a database perspective.

    In order...

  • RE: T-SQL works in QA but fails when part of a job

    'GO' is actually not a Transact SQL command, it's just a symbol marking 'end of batch'.

    Apparantly it was in the 'wrong' place for you when placed into the job.

  • RE: T-SQL works in QA but fails when part of a job

    Well, if I had a penny every time someone said 'it's definetly not this is that'...

    In any case - when you run it...

Viewing 15 posts - 1,306 through 1,320 (of 1,554 total)