Forum Replies Created

Viewing 15 posts - 166 through 180 (of 287 total)

  • RE: what is the De-Normalization process?

    Michael Valentine Jones (11/6/2009)


    The typical de-normalization process is this:

    1. Create database design without knowing or attempting to follow normalization rules.

    2. Claim that you de-normalized the design for performance.

    3. Profit! 🙂

  • RE: Converting DateTimes

    Michael Valentine Jones has the correct solution so I'd suggest you change your view accordingly. But, since you already have the view you can change your select from the view...

  • RE: Sum(A) by B but use the first row for C?

    sol-356065 (10/12/2009)


    @Mark-101232:

    The "first row" means the row which come first in a group.

    In my sample, that is the first row of "A" group.

    SQL does not have a "first" row. Sets...

  • RE: Help needed with left outer join

    You could try with and with out a derived table and see if you get a different query plan or execution time. But, it shouldn't make any difference to SQL.

  • RE: Dates Issues

    maybe:

    SET DATEFORMAT DMY

  • RE: Weird Conversion Problem

    iruagawal (9/3/2009)


    Hey guys, I have a question about money data types, if his "shippingcost" is to large to be held by the "money" data type what is a better (bigger)...

  • RE: Another trigger problem!

    Is thr FROM clause ommited or missing?

    igngua (9/2/2009)


    Hi!

    I dont know why this trigger aint working.

    Scenario:

    Data gets inserted, trigger gets fired, i take all the data from INSERTED...

  • RE: CASE statement for column substitution

    I see what you want to do now.. Try something like this:INSERT INTO _tbl_Target (account_name,Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)

    SELECT

    ACCOUNT_NAME,

    SUM(CASE WHEN Period_name = 'Jan' then AMOUNT else 0 END) AS JAN,

    SUM(CASE WHEN Period_name =...

  • RE: Update a column of a table row by row in a Stored Procedure ? How To Do ?

    As montioned there is no order in a set, so I added an IDENTITY column to mainatain that order. In the real world you would have some sort of order...

  • RE: CASE statement for column substitution

    If you wanna post some sample data and expected output, I'm sure we can help you come to a reasonable solution:

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • RE: CASE statement for column substitution

    As far as I know you'd have to return N number of separate columns or use dynamic sql. But, if you are trying to do a pivot you might be...

  • RE: Weird Conversion Problem

    Lynn Pettis (9/2/2009)


    I know what the problem is. Here is your code:

    select top 1000

    convert(varchar(30), convert(money, isnull(sum(shippingcost),0))) as "Total Navigation"

    from

    dbo.NavAttempts

    The problem is...

  • RE: Weird Conversion Problem

    I don't think it helps your particular issue, but you could change the order of COALESE and SUM to get rid of that warning message:select top 1000 convert(varchar(30), sum(coalesce(shippingcost,$0.0)))...

  • RE: Statement return NULL

    kabaari (9/2/2009)


    Good morning All,

    Is there a reason this statement is returning NULL?

    WHERE tbl_Assembly_Holds.WorkOrder = LEFT(tbl_Assembly_Production.WorkOrder, 5) AND tbl_Assembly_Production.dateProd Between '8/3/2009' AND '8/31/2009' AND tlkp_Defects.Defect_Title = 'Jar To Cover Leak' AND...

  • RE: Weird Conversion Problem

    Strange. any chance the SUM is larger than a MONEY datatype can hold?

    Why convert money to money?

    select top 1000 convert(varchar(30), coalesce(sum(shippingcost),$0.0)) as "Total Navigation"

    from dbo.NavAttemptsAlso, why convert...

Viewing 15 posts - 166 through 180 (of 287 total)