Forum Replies Created

Viewing 15 posts - 631 through 645 (of 1,347 total)

  • RE: @@Identity - Multiple inserts, multiple tables

    If you are INSERTing 2 or more records, then @@Identity is not a workable solution, and you'll need to use set-based operations.

    This will typically require identifying the natural, unique identifiers...

  • RE: Joins and the view that won''''t work!

    CommerceCenter.dbo.p21_view_oe_hdr_salesrep.rep_id

     QVN='Y',

    Missing a comma ? After CommerceCenter.dbo.p21_view_oe_hdr_salesrep.rep_id ?

  • RE: T-SQL #TempTable headace

    >>I will be dropping my membership to this list now

    Your loss.

    Speaking of "lists", here's another SQL server "list".

    Here's what they have to say about the matter. And look closely at...

  • RE: T-SQL #TempTable headace

    A temp table, like any other SQL table, is an unordered set of rows.

    Putting rows into a temp table with an ORDER BY does not guarantee anything about the physical...

  • RE: T-SQL #TempTable headace

    >>SQL will not compile the script if the select into #temp

    And why should it ?

    SQL is parsed. Then it is executed.

    The parser has no way of knowing what will...

  • RE: Invalid column error

    >>Why does it throw this error, and how can I get around it?

    SQL is parsed, an execution plan is generated, then it is executed.

    The parser is throwing the error because...

  • RE: UDF T-SQL Help?

    I took your code, unmodified & created the function. This SELECT statement worked fine with no errors:

    Select dbo.ReFormatDate('9999 Manual', getdate())

    Are you certain you are executing the correct version of the...

  • RE: Tablename prefix not used

    Select from a derived table, where the derived table contains BOTH columns. In the derived table resultset, name the columns differently.

    Then when you select out of the derived table, select...

  • RE: NewID() vs. Identity field

    The developer doesn't seem to be arguing about IDENTITY datatypes, but instead seems to be arguing based on the notion that s/he has to SELECT MAX(ID) + 1 As NextID.

    Has...

  • RE: Trying to convert Oracle Trigger to MS SQL

    Oh boy. Where to start. That is wrong on so many levels.

    This is essentially the body of your Delete trigger. Just fill in the column names:

      -- Update...

  • RE: Help with Case Statement

    1. Embedding a "Select Count(*) " as a sub-SELECT within a SELECT will yield horrible performance. It's essentially a cursor-like operation.

    2. Overloading the meaning of a data element is always...

  • RE: insert distinct record set

    >> for future reference

    How far in the future ? If you'll have upgraded to SQL 2005 by then, you'll be able to use...

  • RE: insert distinct record set

    >>Yes, I want to update the OrderReceived table from the OrderDetail table.

    Update ?

    Or Insert ?

    Or both, inserting where not already there and updating existing records ?

  • RE: searching a DB for a particular field

    >>I know what field a particular string of data exists in

    So you know the column name ?

    Select object_name(id)

    From syscolumns

    Where name = 'YourColumnNameHere'

     

  • RE: Processes blocking themselves

    It started with SP4 and is due to modified reporting on latch waits:

    http://groups.google.com/group/microsoft.public.sqlserver.server/msg/b86e343e513ab281?hl=en

Viewing 15 posts - 631 through 645 (of 1,347 total)