Forum Replies Created

Viewing 15 posts - 14,086 through 14,100 (of 15,381 total)

  • RE: if NULL ? ??

    R.P.Rozema (9/4/2011)


    Sean Lange (9/2/2011)


    ... but I still suggest you look into why you are using the nolock hint. It is ok and useful in some places but not always.

    I would...

  • RE: combine string from multiple records

    Jeff Moden (9/2/2011)


    The XML method won't work on NTEXT, period. Also be advised than NTEXT has been deprecated in favor of NVARCHAR(MAX). Since you're posting in a 2k8...

  • RE: combine string from multiple records

    You should use nvarchar(max) instead of ntext. text and ntext are deprecated and their usage is discouraged. To put in your carriage return just replace the ' ' with char(13)

  • RE: if NULL ? ??

    It can be difficult to ask questions in a way that other people can understand. At this point I think the only way to get you an answer is if...

  • RE: if NULL ? ??

    jbalbo (9/2/2011)


    OK so the SP has this code at the botton

    --DO NOT CHANGE BELOW THIS LINE--

    --Replaces special characters in data to prevent error when reading into HTML Forms

    UPDATE @TEMPTABLE SET...

  • RE: if NULL ? ??

    See if this quick little example will help.

    select top 5 * from sysobjects

    if @@ROWCOUNT > 0

    select 'found some'

    select top 5 * from sysobjects where 1 = 2

    if @@ROWCOUNT = 0

    select...

  • RE: if NULL ? ??

    The value of rowcount will hold the count of rows from the last statement, whatever that may be. Read about it in BOL http://msdn.microsoft.com/en-us/library/ms187316.aspx.

  • RE: if NULL ? ??

    jbalbo (9/2/2011)


    ??

    If there are many Insert into's in the SP

    does the @@rowcount only evaluate on the the just prior Insert statement?

    Thx

    Joe

    Take a look at your code...i added some comments...

  • RE: combine string from multiple records

    I too was guessing the OP wanted to look at cross tabs but since that wasn't a single field i knew it was close but not quite. This is a...

  • RE: if NULL ? ??

    Your code would be something like:

    insert into

    if @@rowcount = 0

    insert into

    Why do you have the nolock hint on all your tables? This looks like a financial application and you are...

  • RE: My script with queries

    That is correct. You would have to use dynamic sql for that. Make sure that your use statement AND the query(ies) you want to run are all in the same...

  • RE: Working with Inserted and Deleted Recordsets

    david.holley (9/1/2011)


    It'll be more along the lines of this...

    INSERT INTO

    ProjectInformationChangeLog

    (Action, Element, WindowsUserId, DateTimeStamp, SQLServerTable, ShowNumber)

    SELECT ShowNumber,'Delete', 'General Information', SYSTEM_USER, SYSDATETIME(), OBJECT_NAME(@@PROCID) From deleted GROUP BY ShowNumber WHERE ProjectNumber In...

  • RE: Working with Inserted and Deleted Recordsets

    You can mix all the logic together in a single trigger and check the existence of records or you can create triggers for each action. Here is an example of...

  • RE: Working with Inserted and Deleted Recordsets

    Take a look at Gail's blog for a great explanation and in depth look at join vs IN.

    http://sqlinthewild.co.za/index.php/2010/01/12/in-vs-inner-join/%5B/url%5D

  • RE: Working with Inserted and Deleted Recordsets

    david.holley (9/1/2011)


    Since the 'inserted' and 'deleted' record sets include all records touched by an INSERT, UPDATE or DELETE, I'm assuming that could determine which actions where performed on which records...

Viewing 15 posts - 14,086 through 14,100 (of 15,381 total)