Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Two fields
Message
From
27/04/2005 04:14:20
Maltin Lacsina
Angeles Electric Corporation
Angeles, Philippines
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Two fields
Miscellaneous
Thread ID:
01008746
Message ID:
01008746
Views:
55
The problem is I have a table that need the description of the other table with two fields:

Table 1 with field
Field1
Field2

Table 2 with field
Code
Description


Ex:

The table 1 has a record
Field1 Field2
'001' '004'
'002' '001'

The table 2 has a record
Code Description
'001' 'Sample 1'
'002' 'Sample 2'
'003' 'Sample 3'
'004' 'Sample 4'

I need to get a SQL statement like this:
Field1Code Field1Description Field2Code Field2Description
'001' 'Sample 1' '004' 'Sample 4'
'002' 'Sample 2' '001' 'Sample 1'


I hope someone can help me with this.
Minds are like parachutes. They only function when they are open.
Next
Reply
Map
View

Click here to load this message in the networking platform