append record from the same table , change customer field based on parameter

  • test

  • Can you provide sample data and table structures so we can actually provide a working query for you?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • table design arcustomer

    [Customer] [char](7) NOT NULL,

    [Name] [char](30) NULL,

    [ExemptFinChg] [char](1) NULL,

    [Salesperson] [char](3) NULL,

    [CustomerClass] [char](2) NULL,

    [Salesperson,] [char](2) NULL,

    [TermsCode] [char](2) NULL,

    [Area] [char](2) NULL,

    [Branch] [char](2) NULL

    two parameters would be provided sx_customer_code and parent_customer_code

    data sample

    CustomerName ExemptFinChg Salesperson CustomerClass Branch Area TermsCode

    AB11153 anna mira NA02T3ABALG

    AB10154alex johnson NCXMT3ABALG

    AB11155South Mall YA02T3ABALP

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply