Forum Replies Created

Viewing 15 posts - 1,471 through 1,485 (of 2,452 total)

  • RE: Unable to sum column values

    I find it far easier to understand if I have something to work with...

    here is a very simple set up....based on these values...what do you expect from your query?

    USE [tempdb]

    GO

    CREATE...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Unable to sum column values

    vigneshkumart50 (5/2/2014)


    Hi,

    I am using this below query to sum my column values.

    Query:

    select

    '$ ' + REPLACE( CONVERT(VARCHAR(32),cast(round(isnull(sum([Share_Invest]),0),0)as MONEY),1), '.00', '') [Investment],

    '$ ' + REPLACE( CONVERT(VARCHAR(32),cast(round(isnull(sum([Profit_Share]),0),0)as...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Select statement - Effective running

    Informer30 (4/28/2014)


    Hi Sean,

    thanks for reply, please let me know what further information is required...

    I have a select statement that I need to run 15 times with a different where clause...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Get original order quantities and dates, and find any changes or additions to quantities in subsequent order version(s)

    itortu (4/28/2014)


    if an order changes multiple times before it is shipped, the original quantity is always going to be the last quantity to what it was changed last.

    example

    --------------

    order quantity

    40000

    --------------

    1st...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Get original order quantities and dates, and find any changes or additions to quantities in subsequent order version(s)

    itortu (4/28/2014)


    Hi.

    The code that you gave me (the link) worked. After that I needed to add one more cte I think.

    And adjustment to catch orders like

    S20026, the order...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Distribution of data, percentile curve.

    ben.brugman (4/28/2014)


    Hello all,

    Thanks for your contributions and sorry for not responding.

    This weekend I had a fall and have a head injuri. In a few days time everything should be...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Get original order quantities and dates, and find any changes or additions to quantities in subsequent order version(s)

    itortu (4/27/2014)


    Hi,

    I know I went back and forth with this question several times, but it would be really great if you would help me a last time because I...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Distribution of data, percentile curve.

    well...I didn't know this was called a Lorenz Curve...and neither have I done this in SQL before.

    but saw this "simple" explanation http://courses.washington.edu/geog326/Lorenz.pdf in how to do it in Excel.

    so...thought I...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to Convert a Varchar value to INT

    is this what you are trying to achieve?

    SELECT dbid

    INTO #dbcheck

    FROM sys.sysdatabases

    WHERE dbid > 4

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Get original order quantities and dates, and find any changes or additions to quantities in subsequent order version(s)

    itortu (4/24/2014)


    Honestly, your last code was awesome, I just replaced the "Sample Orders" part with the sub-query that I use to get the data and it gave me excellent results...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Get original order quantities and dates, and find any changes or additions to quantities in subsequent order version(s)

    itortu (4/24/2014)


    J Livingston SQL, you are a life saver sir.

    I have a question about something I noticed, and this is probably a communication flaw of mine.

    Using the data...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Get original order quantities and dates, and find any changes or additions to quantities in subsequent order version(s)

    itortu (4/23/2014)


    i am getting nowhere :/

    whenever you have time, i would appreciate any help.

    thank you

    here you go...this works for your sample data....probably a more eloquent solution could be written,...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Weekly Best Seller

    probably be easier if you can supply some table create scripts / sample data and the results you would expect based on the sample data provided.

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Get original order quantities and dates, and find any changes or additions to quantities in subsequent order version(s)

    itortu (4/23/2014)


    Hi, I was wondering if the post I made sort of were clear. I have been working on the query myself trying to get to that quantity but still...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Get original order quantities and dates, and find any changes or additions to quantities in subsequent order version(s)

    itortu (4/22/2014)


    Hello and thank you for your help.

    Your query works very well for what I need it to do.

    I am not approaching to our NAV vendor because I...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

Viewing 15 posts - 1,471 through 1,485 (of 2,452 total)