Forum Replies Created

Viewing 15 posts - 211 through 225 (of 443 total)

  • RE: What is the value of SCOPE_IDENTITY()

    Hugo Kornelis (4/19/2010)


    Tough question. We can't really look in the minds of the developers who originally wrote the feature, so we can only speculate.

    Very true

    And frankly, I see little reason...

  • RE: What is the value of SCOPE_IDENTITY()

    Hugo,

    Thanks for the input.

    Which would you say is correct, the implementation as it stands or BOL?

  • RE: Are the posted questions getting worse?

    Anyone care to lend their opinion to a discussion prompted by todays QOD here, please?

  • RE: What is the value of SCOPE_IDENTITY()

    da-zero (4/19/2010)


    I interprete it as:

    SCOPE_IDENTITY returns the value of the last identity value inserted in the same scope. Since the scope is the whole batch, it doesn't matter if the...

  • RE: What is the value of SCOPE_IDENTITY()

    da-zero (4/19/2010)


    nigel. (4/19/2010)


    In the example, since there are no GO statements to define batch boundaries, aren't all the statements in the same batch?

    They are yes, but I'm not sure how...

  • RE: What is the value of SCOPE_IDENTITY()

    da-zero (4/19/2010)


    nigel. (4/19/2010)


    Andrew Watson-478275 (4/19/2010)


    A more interesting result is from this:

    DECLARE @sid int

    DECLARE @table Table (KeyID int primary key,KeyData varchar(5))

    DECLARE @idtable Table (KeyID int identity primary key,KeyData varchar(5))

    INSERT...

  • RE: What is the value of SCOPE_IDENTITY()

    Andrew Watson-478275 (4/19/2010)


    A more interesting result is from this:

    DECLARE @sid int

    DECLARE @table Table (KeyID int primary key,KeyData varchar(5))

    DECLARE @idtable Table (KeyID int identity primary key,KeyData varchar(5))

    INSERT INTO @idtable...

  • RE: sp_send_dbmail to include hyperlink

    There are several ways you could do this, none of which involve generating the error reports in advance.

    Two possibilities are either use either a report (SSRS) or ASP.net page that...

  • RE: stored procedure with optional parameters

    mtaylor7210 63514 (4/13/2010)


    True but anytime you are taking parameters you open yourself up to injection.

    No, I believe you are mistaken.

    Please explain why you think using parameterized stored procedures opens you...

  • RE: Security on Reports

    See [font="Courier New"]User.UserID[/font] here

  • RE: aUTOMATIC uPDATES

    Try here

  • RE: every day delete yesterday data

    You shouldn't need to do anything as complicated as splitting/dividing your date field, as long as it is of the datetime data type.

    A simple delete staement like the following...

  • RE: Find all objects that use this view?

    Thanks Paul,

    They could come in really handy. Oh, if only I had 2008, 😀 and the time to play.

    I'd not even noticed this was in a 2008 forum :blush:

  • RE: joins

    tabishghazi (3/10/2010)


    can you plz explain cross join

    Try this: CROSS JOIN

  • RE: What's the count?

    Very good question.

    However I think that the explanation is a bit lacking, and could explain in more detail what is happening here and what a 'cross join'/'cartesian product' is.

    Here...

Viewing 15 posts - 211 through 225 (of 443 total)