K Feening
asked on
VB.net SQL
I have 3 Tables - Accounts, Stock, Customers
Accounts - Fields
Invoice,Name,Edited
Stock - fields
Stocknumber, name, edited
Customers - fields
Customerno, name, edited
I want to run a sql to create a table all String fields to have
Field1,field2,field3,Field 4
accounts then
field1 = ‘A’,field2 = Invoice, Field3 = Name, Field4 = edited
Stock then
field1 = ‘S’,field2 = Stockno, Field3 = Name, Field4 = edited
Customers then
field1 = ‘C’,field2 = CustomerNo, Field3 = Name, Field4 = edited
something like
Select
‘A’ as Field1 (if stock then Field1 = 'S')
,a.Invoice as Field1
,a.Name as Field2
a.Edited as Field3
from Accounts as a
then how do you add the other table data without losing the accounts data
Accounts - Fields
Invoice,Name,Edited
Stock - fields
Stocknumber, name, edited
Customers - fields
Customerno, name, edited
I want to run a sql to create a table all String fields to have
Field1,field2,field3,Field
accounts then
field1 = ‘A’,field2 = Invoice, Field3 = Name, Field4 = edited
Stock then
field1 = ‘S’,field2 = Stockno, Field3 = Name, Field4 = edited
Customers then
field1 = ‘C’,field2 = CustomerNo, Field3 = Name, Field4 = edited
something like
Select
‘A’ as Field1 (if stock then Field1 = 'S')
,a.Invoice as Field1
,a.Name as Field2
a.Edited as Field3
from Accounts as a
then how do you add the other table data without losing the accounts data
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
excellent