Forum Replies Created

Viewing 15 posts - 3,136 through 3,150 (of 5,504 total)

  • RE: SQL Subquery Help

    caseyo (7/15/2010)


    @LutzM Thank you so much. I think this will get me where i need to go.

    This was exactly what I was needing. I modified...

  • RE: Query that joins a 1-many table returning multiple results

    Based on your sample data I would use the following concept.

    Unfortunately, I was unable to run your original query since there are tables and functions missing. So I had to...

  • RE: SQL Subquery Help

    @ Joe Celko:

    You've demonstrated to design the view for YTD_Averages.

    What is your recommendation to get MTD, QTD and ALL_avg?

    As far as I can see, one option would be to UNION...

  • RE: Are the posted questions getting worse?

    Steve Jones - Editor (7/15/2010)


    Jeff Moden (7/15/2010)


    ...

    And, no... I'm not trying to be a smart guy here or challenge anyone's answer... I've never run into such a problem and I'd...

  • RE: SQL Subquery Help

    Ok, here's what I came up with:

    DECLARE @overall_avgs TABLE

    (

    [system_id] [TINYINT] NULL,

    [id] [TINYINT] NULL,

    ...

  • RE: Are the posted questions getting worse?

    Tom.Thomson (7/15/2010)


    Paul White NZ (7/14/2010)


    I'd put it a bit stronger than that: there are cases where using a sequence table is appropriate and a column with the IDENTITY property is...

  • RE: Are the posted questions getting worse?

    Jeff Moden (7/14/2010)


    CirquedeSQLeil (7/14/2010)


    LutzM (7/14/2010)


    OUCH!!!!

    I immediately blacklist vendors with such a philosophy as soon as I'm getting aware of it...

    I agree with you on that one.

    What "philosophy" are...

  • RE: Rows to Columns (The simplest way please)

    Did you make your customer aware of the consequence?

    I'm not sure if that's what's intended. I'd recommend asking for clarification.

  • RE: Converting char to decimal?

    You're welcome 😀

  • RE: Getting Data back from a Stored Proc

    @chad-2:

    Since the posted table GPK has no unique constraint for gpk column you might end up with duplicates causing your code to fail.

    Either a unique constraint is required for the...

  • RE: Converting char to decimal?

    I can't confirm what you describe:

    Example:

    DECLARE @tbl TABLE

    (

    field4 CHAR(20)

    )

    INSERT INTO @tbl

    SELECT '1' UNION ALL

    SELECT '700' UNION ALL

    SELECT '23,000.00' UNION ALL

    SELECT '600,000.00' UNION ALL

    SELECT '2,101.50'

    SELECT *,CAST(REPLACE(field4,',','')...

  • RE: user mapping

    Did you consider BOL (BooksOnLine, the SQL Server help system), section "sp_addrolemember" as a resource?

  • RE: Converting char to decimal?

    The problem is the comma.

    You would need to remove the comma in order to be able to convert the value to a decimal format.

    SELECT

    PLANT AS plant,

    ITEM_NUMBER AS item_number,

    ITEM_DESCRIPTION AS...

  • RE: SQL Subquery Help

    Hi caseyo,

    please provide the table definition (CREATE TABLE ...) for the table in question (overall_avgs and tblResults). One way to do it is by Right-clicking at the table in Management...

  • RE: Are the posted questions getting worse?

    OUCH!!!!

    I immediately blacklist vendors with such a philosophy as soon as I'm getting aware of it...

Viewing 15 posts - 3,136 through 3,150 (of 5,504 total)