Forum Replies Created

Viewing 15 posts - 14,626 through 14,640 (of 14,953 total)

  • RE: Finding the latest revision in data

    ;with LastRev (SN1, Rev) as

    (select SN, max(RevisionNumber)

    from dbo.table)

    select UniqueID, SN, RevisionNumber

    from dbo.table

    inner join LastRev

    on sn = sn1

    and revisionnumber = rev

    Try that.

  • RE: How to lay out SQL Code

    paulhunter (3/4/2008)[hrThe only place I've found even a small issue is if it's the first column. Then the first style is easier. I rarely have only one column so,...

  • RE: smll issue

    This is a double-post. There's another copy of the exact same question in the T-SQL 2k5 forum. More replies there.

  • RE: How to reuse the code in Stored Procedure?

    I'm not sure from the question, but I think the thing you are probably looking for is user defined functions.

    If you find you are constantly having to do certain calculations...

  • RE: Terribly performing query!

    Try this:

    ;WITH

    Ad_Keys1 (Ad_Key) as

    (SELECT Ad_Key

    FROM TBL_WORK_ORDER_DETAIL AS WODTL

    INNER JOIN TBL_WORK_ORDER_HEADER AS WOHDR

    ON WOHDR.WO_Hdr_Key=WODTL.WO_Hdr_Key

    WHERE WODTL.TASK_SURR_KEY =1

    AND WOHDR.WO_STATUS = 0

    AND WOHDR.DELETED_FLAG =0),

    Ad_Keys2 (Ad_Key) as

    (select Ad_Key

    FROM TBL_LOCATION_MASTER AS LM

    INNER...

  • RE: Query too slow

    Trader Sam (3/4/2008)


    That view DDL does not reference the table DDL that was provided. Is this important?

    I have to admit, I didn't even try to read that view and...

  • RE: small issue

    I don't think this can be done in the Import/Export Wizard. SSIS can do it (of course), but you said you don't want to use that, so the only...

  • RE: CTE "Level" column problem

    You need to replace, "join dbo.CardActivationDetail transfer" in the second part of the CTE, with, "join Transfers transfer".

    That should solve it.

  • RE: Newbie questions

    Take a look at this thread:

    http://www.sqlservercentral.com/Forums/Topic445510-149-1.aspx

    It's in reply to pretty much the same question.

  • RE: Query too slow

    Add a full-text index to the description field, add a regular index to the other two fields in the Where clause, and take all the excess selects out of the...

  • RE: The February Energy Update

    Steve Jones - Editor (3/3/2008)


    I think you need a combination of solutions....

    Amen on that! Definitely agree.

  • RE: Conditional Select

    I'm pretty sure there isn't a way to do that in a single recordset.

    You might need to set up some conditional formatting in the reporting application. I know I...

  • RE: The February Energy Update

    Oh, and as an addition, on the subjects of (bio)-diesel and nuclear power, it is now possible to synthesize diesel fuel out of carbon dioxide and water vapor, using the...

  • RE: The February Energy Update

    tim_brimelow (3/2/2008)


    I haven't had time to read all the posts. But from what I read in the editiorial I say that anyone who advocates nuclear power has rocks in...

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

    Just did some tests.

    The XML version is faster, significantly so, than the Numbers table version, for parsing out a string.

    Has the added advantage of being able to take a multi-character...

Viewing 15 posts - 14,626 through 14,640 (of 14,953 total)