Forum Replies Created

Viewing 15 posts - 12,646 through 12,660 (of 26,486 total)

  • RE: Are the posted questions getting worse?

    The Dixie Flatline (4/19/2012)


    Lynn Pettis (4/19/2012)


    And just when I thought we might be seeing light at the end of the tunnel, nope. Just another train heading our way.

    Hi, my...

  • RE: if------then ----else in select statement

    In addition you declare the following, but never populate them unitl after you use them inside your loop as part of an IF condition:

    declare @mtd2 float

    DECLARE @qtd float

    declare @ytd float

  • RE: if------then ----else in select statement

    Reformatted your code (see how much easier it is to read?):

    declare @Portfolio nvarchar(32)

    declare @mtd2 float

    DECLARE @qtd float

    declare @maxdate datetime

    select @maxdate = MAX(PeriodThrudate) from fPerformanceHistoryDetail(@i1)

    declare @ytd float

    declare c1 CURSOR FOR...

  • RE: Are the posted questions getting worse?

    And just when I thought we might be seeing light at the end of the tunnel, nope. Just another train heading our way.

    Hi, my name is Lynn and I...

  • RE: if------then ----else in select statement

    riya_dave (4/19/2012)


    this is my ddl

    create table #temp2(account nvarchar(32),

    MTDTWR float,

    QTDTWR FLOAT,

    YTDTWR FLOAT)

    this is data i am getting

    accountMTDTWRQTDTWRYTDTWR

    case-0.8755148870.5430860920.784486036

    circle-0.8755148870.5430860920.784486036

    hargrov-0.8755148870.5430860920.784486036

    hurwitz-0.8755148870.5430860920.784486036

    usbal1-0.8755148870.5430860920.784486036

    the data should be unique in each field,what else u...

  • RE: if------then ----else in select statement

    riya_dave (4/19/2012)


    this code should work ,but its not ,

    its getting me same row in all the rows and repeating last row 2 times.

    ...

    We understand that your code isn't doing what...

  • RE: if------then ----else in select statement

    Sean Lange (4/19/2012)


    Really? That won't work? No kidding?

    There are more lines with syntax errors in there than there are lines that will actually work. That can't possibly come close to...

  • RE: if------then ----else in select statement

    riya_dave (4/19/2012)


    ok.

    i change my fetch statement in this code.

    still not working

    ...

    Also, none of us knows what "still not working" means as you don't tell us if it errors out (and...

  • RE: if------then ----else in select statement

    I see you made the change needed while I was writing my response.

    However, everything else stands. If you want better answers, you have to give us more, and that...

  • RE: if------then ----else in select statement

    Actually, you have the first (initial) fetch right after you open the cursor. Your next FETCH (which is commented out) does not appear to be in the correct position....

  • RE: Return items not modified in "X" days?

    Please read the first article I reference below in my signature block, it will walk you through what you need to post and how to do it in order to...

  • RE: Mirroring --port number

    sunny.tjk (4/19/2012)


    I was going through an article on database mirroring. The author says "Select the default port and the endpoint name chosen by the SQL server management studio and click...

  • RE: Want to create a Log Shipping

    dsohal (4/19/2012)


    My Qusetion:

    All our databases are in Simple Mode, we do not use transaction logs for recovery purposes, there is one database we have created the log shipping for, secondary...

  • RE: BCP In Issue

    Without seeing the DDL for the table(s) and sample data including some which errors out, not much we can do from here.

  • RE: Which way is better for script execution...

    SQLKnowItAll (4/19/2012)


    Lynn Pettis (4/19/2012)


    I do have to say I liked Oracle's CREATE OR REPLACE. If the database object (view, stored procedure, function) already existed, it replaced it and if...

Viewing 15 posts - 12,646 through 12,660 (of 26,486 total)