Forum Replies Created

Viewing 15 posts - 421 through 435 (of 479 total)

  • RE: Best Way to Calculate Age

    Of course, I suppose the real point of the question was to draw attention to the fact that (1) was wrong and (2) was inaccurate. But it would have been...

  • RE: How to lay out SQL Code

    My personal gripe is the way the View Designer in SSMS crams as many fields as possible on one line (with arbitrary breaks) and puts the JOINs at the ends...

  • RE: Please add a custom 404 page in maintenance mode

    Thanks Steve.

    For info, it was down at about 9:30am GMT (UK) Monday morning. Not sure what time this corresponds to wherever the server is (since it could be almost...

  • RE: "Select Where In" using a parameter?

    Adam Haines (2/19/2008)


    DECLARE @IDString VARCHAR(MAX)

    SET @IDString =

    (SELECT (ID) + ','

    FROM MYTABLE

    --WHERE FILTER CAN GO HERE

    FOR XML PATH(''))

    This leaves a trail comma. I usually do something likeDECLARE @IDString VARCHAR(MAX)

    SET @IDString...

  • RE: SQL Server 2005 SP3

    You didn't put a description in so your link wasn't clickable 😉

  • RE: User Defined Function Execution

    I always reckon it's a good QotD if I learn something either from it or from the resulting discussion. In this case, I need to go off and look at...

  • RE: Master Data

    Hi Tom

    I agree and was mainly pointing out that the 'Transaction Data'/'Master Data' distinction is vague and arbitrary in many cases.

    If you need to enter Line Items on a new...

  • RE: User Defined Function Execution

    Hi Christian

    I agree that APPLY must be counted as part of the FROM clause, since it's the only place it can be used.

    So I think the correct answer should have...

  • RE: Master Data

    I think most people would agree that in alomost all systems that use them, 'Purchase Orders' are Transaction data rather than Master data, however, it's not difficult to come up...

  • RE: User Defined Function Execution

    Christian Buettner (2/13/2008)


    Um, question:

    Shouldn't it be executing once per row in the FROM clause too?

    Example:

    SELECT * FROM dbo.MyTable T CROSS APPLY dbo.MyFunction(T.fielda)

    Grazias!

    I think in this context the CROSS APPLY clause...

  • RE: MERGE

    Of course, if "new" data includes the changed data in the UPDATE, then one can doWHEN MATCHED THEN

    UPDATE

    SET address1 = (select...

  • RE: MERGE

    One little wrinkle nobody's mentioned about MERGE that I found when I tried the question statement under CTP4 was the error message...

    Msg 10713, Level 15, State 1, Line 11

    A MERGE...

  • RE: MERGE

    I think this question is very poorly worded. The reference doesn't help as it doesn't use the term "new data".

    The USING clause specifies the source of records to be matched,...

  • RE: Get DATE part of the DATETIME

    jcrawf02 (2/6/2008)


    Chris Morris (2/6/2008)


    jcrawf02 (2/6/2008)


    Because we just have to be different. I'm going to go get my 'twelve barley-corns, round and dried' to measure something now . . .

    Nah,...

  • RE: Get DATE part of the DATETIME

    James A. Lawrence (2/5/2008)


    or...

    Select convert(char(10),getdate(),101)

    Of course I'd use convert(char(10),getdate(),103)...

    Which raises a question I haven't found an answer to:

    Why does America (and nowhere else) write dates in their traditional order, i.e....

Viewing 15 posts - 421 through 435 (of 479 total)