Forum Replies Created

Viewing 15 posts - 2,971 through 2,985 (of 3,957 total)

  • RE: calculate trend of a column

    As the OP indicated he already has this in a temp table, why not add a column (status) and do it with a quirky update?

    CREATE TABLE #Temp

    ...

  • RE: String concatenation

    Let's try a small test harness, shall we:

    CREATE TABLE #Test

    (ID int NOT NULL IDENTITY(1,1) Primary key,

    TranID int NOT NULL,

    OriginCode varchar(10) NOT NULL,

    DestinationCode varchar(10) NOT NULL

    ...

  • RE: String concatenation

    I think this is another way not yet suggested.

    SELECT TranID,

    (

    SELECT OriginCode + ''

    ...

  • RE: Problem with query

    Lynn Pettis (8/23/2012)


    sandeep rawat (8/23/2012)


    table def

    table

    (

    price int,

    typeofpen varchar (20)

    )

    query

    -----

    ,WITH Temp AS

    (MAX(price ) OVER(PARTITION BY typeofpen) AS price

    FROM

    table

    )

    SELECT SUM(mx) FROM temp

    Curious, this doesn't even...

  • RE: Are the posted questions getting worse?

    dwain.c (8/22/2012)


    Jeff Moden (8/22/2012)


    dwain.c (8/21/2012)


    I

    If I rewrite this SP to use 1 or 0 CURSORs, will the SQL-verse acknowledge this reduction in my career CURSOR usage and lower my career...

  • RE: Are the posted questions getting worse?

    Jeff Moden (8/22/2012)


    dwain.c (8/21/2012)


    I

    If I rewrite this SP to use 1 or 0 CURSORs, will the SQL-verse acknowledge this reduction in my career CURSOR usage and lower my career total...

  • RE: Are the posted questions getting worse?

    Jeff Moden (8/22/2012)


    dwain.c (8/21/2012)


    I have written some WHILE loops but they don't count.

    Why not? If you're While loops process just one row at a time, they're just as bad...

  • RE: Exception handling when no results are returned

    Can't tell if this is more efficient or not (it may not be according to the execution plan) because there's not enough records in the sample data, but you may...

  • RE: Are the posted questions getting worse?

    ChrisM@Work (8/22/2012)


    Stefan Krzywicki (8/22/2012)


    Brandie Tarvin (8/22/2012)


    Allow me to correct myself.

    ChrisM@Work (8/22/2012)


    Brandie Tarvin (8/22/2012)


    President Bill Clinton once said "Define intercourse" ... or maybe "define sex"... in an interview about a...

  • RE: Are the posted questions getting worse?

    Grant Fritchey (8/22/2012)


    GilaMonster (8/22/2012)


    Grrr. Why do some people want to nitpick holes in things I say and do it in a way that sounds very much like a personal attack?

    Same...

  • RE: Are the posted questions getting worse?

    dwain.c (8/22/2012)


    ChrisM@Work (8/22/2012)


    dwain.c (8/22/2012)


    ChrisM@Work (8/22/2012)


    If this is the same individual as last time

    He who must not be named...

    Between wizards and Jedi, this board is always interesting and fun... 🙂

    Dwain,...

  • RE: Are the posted questions getting worse?

    ChrisM@Work (8/22/2012)


    dwain.c (8/22/2012)


    ChrisM@Work (8/22/2012)


    If this is the same individual as last time

    He who must not be named...

    Between wizards and Jedi, this board is always interesting and fun... 🙂

    Dwain, that...

  • RE: Are the posted questions getting worse?

    ChrisM@Work (8/22/2012)


    If this is the same individual as last time

    He who must not be named...

    Between wizards and Jedi, this board is always interesting and fun... 🙂

  • RE: Extract string between delimiters

    Use Jeff Moden's DelimitedSplit8K FUNCTION WHERE item = 2.

    You can find that by searching on the FUNCTION's name.

  • RE: Exception handling when no results are returned

    I don't see the EStatus column defined in the Enroll table:

    SELECT GETDATE() AS Runtime

    ,Enroll.Prog_Code AS PVCode

    ,COUNT(DISTINCT Enroll.Stud_ID) AS StatCount

    ,Enroll.Campus AS Campus

    ,'Current Entering Class' AS StatCategory

    ,'Today' AS StatPeriod

    ,'AppCycle' AS StatType

    FROM Enroll

    WHERE...

Viewing 15 posts - 2,971 through 2,985 (of 3,957 total)