Forum Replies Created

Viewing 15 posts - 11,611 through 11,625 (of 26,486 total)

  • RE: What motivates those of you who answer questions?

    GilaMonster (5/31/2012)


    SQL Kiwi (5/31/2012)


    Greed. Steve pays me $50 per post.

    I clearly need to ask Steve for a raise. About 200% would be nice.

    Wait, you all are getting paid???? ...

  • RE: SProc Structure - Encapsulate into one procedure, or split out into separate sprocs?

    I would go with separate stored procedures. Each one should do a single function, get or insert.

  • RE: correct the code

    Eugene Elutin (5/31/2012)


    You do something very stupid here:

    SELECT

    '12/31/2011' as CloseDate,

    '0' as CostBasis,

    '09/30/2010' as OpenDate,

    '1' as PortfolioBaseIDOrder,

    '0' as Quantity,

    '0' as RealizedGainLoss

    from dbo.fRealizedGainLoss(@ReportData) r

    If the result of dbo.fRealizedGainLoss(@ReportData) is 5 rows, you...

  • RE: Working with dates

    Eugene Elutin (5/31/2012)


    I need 8 weeks * 7 days numbers (56), so I can go back up to 56 days (8 weeks) and find last 8 fridays.

    This one can be...

  • RE: correct the code

    John Mitchell-245523 (5/31/2012)


    Please post the whole of your code, including the parts where @temp1 and @ReportData are declared. Please also post the definition of dbo.fRealizedGainLoss and any table definitions...

  • RE: correct the code

    if(@rowcount = 0)

    SELECT

    '12/31/2011' as CloseDate,

    '0' as CostBasis,

    '09/30/2010' as OpenDate,

    '1' as PortfolioBaseIDOrder,

    ...

  • RE: Working with dates

    Tomorrow is Friday, would you display 6/1/2012 or would you still go back 8 weeks from the previous Friday?

  • RE: syscolumns versus information_schema.columns issue

    Not being ale to look at what is in your system, not sure. One thing I would suggest, however, is to not use sysobjects and syscolumns. These are...

  • RE: Figuring out NSF payments

    Greg Snidow (5/31/2012)


    Lynn Pettis (5/31/2012)


    Doesn't match with this from your original post:

    Also, the NSF transactions are assumed to occur in the same order as the payments. For example, if customer...

  • RE: Figuring out NSF payments

    Greg Snidow (5/31/2012)


    Lynn Pettis (5/31/2012)


    Greg,

    Last night while working n this I did find a problem with your solution. Based on your requirements, one of the records you return is...

  • RE: Date range issue

    Problem is data related:

    SELECT 1, '2012-06-01', 50

    The data above is a future date and was not anticipated when I wrote the code provided. Here is an apportunity for you...

  • RE: Figuring out NSF payments

    Greg,

    Last night while working n this I did find a problem with your solution. Based on your requirements, one of the records you return is incorrect. It happens...

  • RE: Date range issue

    dilipd006 (5/30/2012)


    Thank you very much Lynn Pettis.... it works really fine

    Can u explain the CTE part..Taking 10 rows,100 rows

    or may be some url

    Thanks

    The first part of the CTE...

  • RE: Question on REPLACE function

    Brian Brown-204626 (5/30/2012)


    Thanks for all the advice. I think I have a handle on the problem now.

    Be sure to let us know when you resolve the problem and how...

  • RE: Figuring out NSF payments

    Found my problem, now to solve it.

Viewing 15 posts - 11,611 through 11,625 (of 26,486 total)