Forum Replies Created

Viewing 15 posts - 5,626 through 5,640 (of 10,144 total)

  • RE: Need Help In Query .

    abhas (9/18/2012)


    Hi Chris,

    I tried using CTE but not able to do.

    No problem - post what you have, we'll help you make it work.

  • RE: Query plan - largest cost

    rgtft (9/17/2012)


    ChrisM@Work (9/17/2012)


    Grant Fritchey (9/17/2012)


    ISNULL and COALESCE on columns in the where clause are going to hurt performance....

    This should be close to a SARGable version of the query:

    Chris M:

    Your code...

  • RE: Unpivot Help

    roryp 96873 (9/17/2012)


    ChrisM@Work (9/17/2012)


    When you've read through that, read this excellent alternative by Dwain Camps[/url].

    But if you are really using SQL 2005, you're going to have...

  • RE: Unpivot Help

    When you've read through that, read this excellent alternative by Dwain Camps[/url].

  • RE: Find records which are within the depth range of other records

    oliver.morris (9/17/2012)


    I changed the code to this to sort that change. Is there any problem with this?

    -- identify rows with/without overlaps

    ;WITH SplitData AS (

    SELECT a.*,

    Parent = CASE WHEN EXISTS...

  • RE: Find records which are within the depth range of other records

    This yields slightly different results to Mark's solution - I'm assuming that you want the comments from the middlemen in a group:

    -- identify rows with/without overlaps

    ;WITH SplitData AS (

    SELECT a.*,...

  • RE: Query plan - largest cost

    Grant Fritchey (9/17/2012)


    ISNULL and COALESCE on columns in the where clause are going to hurt performance....

    This should be close to a SARGable version of the query:

    SELECT DISTINCT COALESCE(f.FranchiseNumber, di.FranchiseNumber) AS...

  • RE: 'Arithmetic overflow error converting numeric to data type numeric'

    ananda.murugesan (9/17/2012)


    No, there is sql trace running for capture error results. I thought application side might be issue? pl. check error page here.

    I'm unable to reproduce the error with the...

  • RE: 'Arithmetic overflow error converting numeric to data type numeric'

    ananda.murugesan (9/17/2012)


    This data and execute statement working fine in SSMS.

    whenever call application side working fine at first time, calling next time error throwing like "'Arithmetic overflow error converting numeric... "

    Insert...

  • RE: 'Arithmetic overflow error converting numeric to data type numeric'

    Jason-299789 (9/17/2012)


    ChrisM@Work (9/17/2012)


    ananda.murugesan (9/17/2012)


    DDL statements...

    exec ChangeTable 'SIL_TRAN_H','Tran_Code|Ref_No|Modify_By|Modify_Dt','1003|2012083014645|37100666|17 Sep 2012 12:25:45'

    exec ChangeTable 'SIL_TRAN_H','Tran_Code|Ref_No|Modify_By|Modify_Dt','1004|2012083014645|37100666|17 Sep 2012 12:25:45'

    exec ChangeTable 'SIL_TRAN_H','Tran_Code|Ref_No|Modify_By|Modify_Dt','1005|2012083014645|37100666|17 Sep 2012 12:25:45'

    exec ChangeTable 'SIL_TRAN_D','Tran_Code|Ref_No|Rec_no|column_id|column_value','1003|2012083014645|1|1|4DA-TE-304A/B/C'

    exec ChangeTable 'SIL_TRAN_D','Tran_Code|Ref_No|Rec_no|column_id|column_value','1003|2012083014645|1|2|30 Aug 2012-14645'

    exec ChangeTable 'SIL_TRAN_D','Tran_Code|Ref_No|Rec_no|column_id|column_value','1003|2012083014645|1|3|JGDTA'

    exec ChangeTable 'SIL_TRAN_D','Tran_Code|Ref_No|Rec_no|column_id|column_value','1003|2012083014645|1|4|FCC/PRU'

    exec...

  • RE: 'Arithmetic overflow error converting numeric to data type numeric'

    ananda.murugesan (9/17/2012)


    DDL statements...

    exec ChangeTable 'SIL_TRAN_H','Tran_Code|Ref_No|Modify_By|Modify_Dt','1003|2012083014645|37100666|17 Sep 2012 12:25:45'

    exec ChangeTable 'SIL_TRAN_H','Tran_Code|Ref_No|Modify_By|Modify_Dt','1004|2012083014645|37100666|17 Sep 2012 12:25:45'

    exec ChangeTable 'SIL_TRAN_H','Tran_Code|Ref_No|Modify_By|Modify_Dt','1005|2012083014645|37100666|17 Sep 2012 12:25:45'

    exec ChangeTable 'SIL_TRAN_D','Tran_Code|Ref_No|Rec_no|column_id|column_value','1003|2012083014645|1|1|4DA-TE-304A/B/C'

    exec ChangeTable 'SIL_TRAN_D','Tran_Code|Ref_No|Rec_no|column_id|column_value','1003|2012083014645|1|2|30 Aug 2012-14645'

    exec ChangeTable 'SIL_TRAN_D','Tran_Code|Ref_No|Rec_no|column_id|column_value','1003|2012083014645|1|3|JGDTA'

    exec ChangeTable 'SIL_TRAN_D','Tran_Code|Ref_No|Rec_no|column_id|column_value','1003|2012083014645|1|4|FCC/PRU'

    exec ChangeTable 'SIL_TRAN_D','Tran_Code|Ref_No|Rec_no|column_id|column_value','1003|2012083014645|1|5|553'

    This...

  • RE: 'Arithmetic overflow error converting numeric to data type numeric'

    ananda.murugesan (9/17/2012)


    please find the attached sample data for header and detail table

    ...

    I don't want to open an attachment, which isn't the best way to provide the information I asked for:...

  • RE: Need Help In Query .

    abhas (9/17/2012)


    Still not tried anything as busy on other task.

    If u have any idea in the mind then pls share.

    It's a simple assignment. What have you tried so far?

  • RE: 'Arithmetic overflow error converting numeric to data type numeric'

    Please post the following:

    1. Code for function dbo.GetDataType

    2. Values for;

    @Table varchar(50),

    @FldNames varchar(8000),

    @FldValues varchar(8000)

    which cause the stored procedure to fail.

    3. DDL...

  • RE: T-SQL Help Needed

    ScottPletcher (9/14/2012)


    ChrisM@Work (9/14/2012)

    It's quite common for a product to "evolve" over time without its' stock code changing - it's rampant in the fashion world. Clients, agents, reps all know an...

Viewing 15 posts - 5,626 through 5,640 (of 10,144 total)