Forum Replies Created

Viewing 15 posts - 916 through 930 (of 1,229 total)

  • RE: Return 0 From Function

    david.holley (4/20/2011)


    So check to see if the returned value is null and if it is return the lower boundary date?

    Exactly. Your app will have to check the value is or...

  • RE: need help getting sum and grouping right...

    You might want to rewrite it to make it more readable and five times faster:

    SELECT

    PATID,

    CARRIER_ID,

    DateRange,

    [BAL] = SUM(BAL)

    FROM (

    SELECT ...

  • RE: need help getting sum and grouping right...

    Let's have a look at a single one of those date-range specific queries:

    SELECT ...

  • RE: need help getting sum and grouping right...

    jrbass81 (4/20/2011)


    Lets try this way...below is my code and a few results....I need to get the results to only list on ins company and there total and not 5 BCBSNC...

  • RE: need help getting sum and grouping right...

    jrbass81 (4/20/2011)


    I need the following listed where ins company carrier ID is only listed once and the total for each is only listed once. I hope that makes sense...

    SEE ATTACHMENTS

    Read...

  • RE: Query for reome Duplcate row

    shubham.saxena67 (4/20/2011)


    ...in this data will be in following form:

    Adm_no FirstName Last_name Session Class

    01/742 NIKHIL SINGH 2010 - 2011 VIII

    01/742 ASHISH SINGH 2011 - 2012 IX

    01/743 ANSHIKA GUPTA 2011 - 2012...

  • RE: Using SUM renders too many records

    Going back to your earlier post,

    sum(bp.gross_quantity / 42.0) as qty_gross,sum(bp.net_quantity / 42.0) as net_qty

    FROM [VEMA-FACS1].FUELFACS.dbo.bulk_movement AS bm

    INNER JOIN...

  • RE: Select Query

    Research PIVOT.

  • RE: Return 0 From Function

    david.holley (4/20/2011)


    I created the following function to pull the min or max date from a table of dates. It does work. However, if it does not find a record, it...

  • RE: Need to insert Reocrds in uniqueidentifier column

    It doesn't work because '00000000-0000-0000-000-0000000000' won't cast to a uniqueidentifier. Try this:

    SELECT CAST('00000000-0000-0000-000-0000000000' AS uniqueidentifier)

    SELECT CAST('00000000-0000-0000-0000-000000000000' AS uniqueidentifier)

    Why do you want to put this value into a uniqueidentifier column? Why...

  • RE: Are the posted questions getting worse?

    Craig Farrell (4/19/2011)


    Brandie Tarvin (4/19/2011)


    I'm going to violate the rule and add a "technical" question to The Thread under the caveat that I don't really need an answer for a...

  • RE: Using SUM renders too many records

    Hi

    Is this issue resolved now?

    If not, there are a couple of lines of enquiry to follow;

    Check if bp.movement_number = 2191 appears in rows other than those where bm.bulk_movement_id IN ('54332','54355','54356')....

  • RE: Using SUM renders too many records

    snufse1 (4/19/2011)


    I commented out all joins except for

    FROM[VEMA-FACS1].FUELFACS.dbo.bulk_movement AS bm

    INNER JOIN[VEMA-FACS1].FUELFACS.dbo.bulk_product AS bp ON bp.bulk_movement_id = bm.bulk_movement_id

    and result is (same as before)

    201103302011 MC 01 497883100 859700...

  • RE: Inserting Incremented Alphabets into a column

    LOL Wayne that was quick!

    ;WITH VendorCodes AS

    (

    SELECT [letter] = CHAR(64 + rn)

    FROM (SELECT rn = ROW_NUMBER() OVER(ORDER BY [Name]) FROM sys.columns

    ) d WHERE rn < 27

    )

    SELECT c1.letter, c2.letter

    FROM VendorCodes...

  • RE: Inserting Incremented Alphabets into a column

    kr.nithin (4/19/2011)


    Yep In spite of the Numeric Primary Key. We need 2 character Vendor Code for each vendor.

    How many vendors do you currently have? What is the rate at which...

Viewing 15 posts - 916 through 930 (of 1,229 total)