Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

append record from the same table , change customer field based on parameter Expand / Collapse
Author
Message
Posted Monday, August 11, 2014 3:02 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, October 7, 2014 10:57 AM
Points: 7, Visits: 32
test
Post #1602078
Posted Monday, August 11, 2014 3:11 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 12:52 PM
Points: 17,807, Visits: 15,724
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
Post #1602080
Posted Monday, August 11, 2014 3:28 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, October 7, 2014 10:57 AM
Points: 7, Visits: 32
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

Customer Name ExemptFinChg Salesperson CustomerClass Branch Area TermsCode
AB11153 anna mira N A02 T3 AB AL G
AB10154 alex johnson N CXM T3 AB AL G
AB11155 South Mall Y A02 T3 AB AL P
Post #1602091
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse