Forum Replies Created

Viewing 15 posts - 31 through 45 (of 51 total)

  • RE: Group By with Condition

    Sample Data in the attachment

  • RE: Group By with Condition

    Psp_ps_no psp_item_no psp_item_var psp_qty_prpnl

    6 DRR01DELT0004 ## 10.00000000

    352 ...

  • RE: Group By with Condition

    beacause 352 OPTIONAL AUTO WIRING FOR DRR (ARAI)

    in descriotion field in another table

  • RE: INSERT IF NOT EXISTS

    Gianluca Sartori (6/6/2011)


    INSERT INTO #temp (item_code,variant_code)

    SELECT DISTINCT T2.psp_item_no,T2.psp_item_var

    FROM pmddb..pmd_mpsp_ps_postn T2

    WHERE T2.psp_io_flag = 'i'

    AND NOT EXISTS (

    SELECT 1

    FROM #temp AS...

  • RE: INSERT IF NOT EXISTS

    This cod is working : :w00t::w00t:

    INSERT INTO #temp (item_code,variant_code) ...

  • RE: INSERT IF NOT EXISTS

    This is true but I don't want SELECT only Distinct from the Source Table to insert.

    I want only distinct record will be inserted into the Destination Table.

    How is it possible...

  • RE: Loop Thru a Table

    GilaMonster (6/1/2011)


    You're using a significant number of user defined types. Please post the definitions of all of the ones in that table.

    Still needs some sample data (as insert statements) please

    Plz...

  • RE: Loop Thru a Table

    Dave Ballantyne (6/1/2011)


    Also, please confirm which version of SqlServer you are using.

    This is a SqlServer 7 / 2000 forum, are you using a later release ?

    SQL SERVER 2005

  • RE: Loop Thru a Table

    USE [PMDDB]

    GO

    /****** Object: Table [dbo].[pmd_mpsp_ps_postn] Script Date: 06/01/2011 11:28:29 ******/

    SET ANSI_NULLS OFF

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_PADDING OFF

    GO

    CREATE TABLE [dbo].[pmd_mpsp_ps_postn](

    [psp_company_no] [dbo].[GLCOMPANY] NULL,

    [psp_ps_no] [dbo].[UDD_PSNO] NOT NULL,

    [psp_ps_rev_no] [dbo].[UDD_REVNO] NOT NULL,

    [psp_ps_pos_no]...

  • RE: Loop Thru a Table

    Thanks Wayne !!:-)

    Actual Scenario

    Hope that you are familiar with Production BOM (Manufacturing). Take an Example :

    BPD (Variant 4000) is a Finished Item and it is assembled from the following Items...

  • RE: Loop Thru a Table

    I've done this with the help of CURSORS

    Thanks to all .:-)

  • RE: Loop Thru a Table

    My Code Given below..

    CREATE proc aaa

    (

    @item_no...

  • RE: Loop Thru a Table

    kindly reply

  • RE: Loop Thru a Table

    Suppose in a certain Table I have all the required data. Item Code is a field of this table.

    Item--- BPD (finished Good)has three child Items BPD01, BPD02, BPD03 and

    BPD01 has...

  • RE: Loop Thru a Table

    BPD & BPD001,BPD002,BPD003 has a relation.

    BPD001 has relation with its child(BPDX01) Item but BPD has no direct relation to BPDX01...

    Input parameter id BPD

    Output are BPDX01, etc as shown in picture.

Viewing 15 posts - 31 through 45 (of 51 total)