Cav IT
asked on
Combine Two Fields
Hi
How can I combine the bcClass.Description and bcBrands.Description fields into one field. There will only be a value in on of the two fields.
Here is an example of the data that is returned with the query
Qty sClass MassGrp Mass Product Salesbrand Description Expr1
1 M 2 14 SA1 M Group 1 NULL
1 M 1 8,5 SA1 M Group 1 NULL
1 M 1 11,5 SA0 M Group 2 NULL
1 M 4 22 SC2 M Group 2 NULL
1 D 3 16,5 SA2 N NULL Class 1
1 D 3 16,8 SA2 N NULL Class 2
How can I combine the bcClass.Description and bcBrands.Description fields into one field. There will only be a value in on of the two fields.
SELECT bcGraderings.Aantal AS Qty, bcGraderings.Class AS sClass, bcGraderings.MG AS MassGrp, bcGraderings.Mass, bcGraderings.Product, bcGraderings.ISO AS Salesbrand, bcClass.Description,
bcBrands.Description AS Expr1
FROM bcGraderings LEFT OUTER JOIN
bcBrands ON bcGraderings.ISO = bcBrands.Code LEFT OUTER JOIN
bcClass ON bcGraderings.ISO = bcClass.Code
WHERE (bcGraderings.gDate > '2014-09-01 00:00:00.000')
Here is an example of the data that is returned with the query
Qty sClass MassGrp Mass Product Salesbrand Description Expr1
1 M 2 14 SA1 M Group 1 NULL
1 M 1 8,5 SA1 M Group 1 NULL
1 M 1 11,5 SA0 M Group 2 NULL
1 M 4 22 SC2 M Group 2 NULL
1 D 3 16,5 SA2 N NULL Class 1
1 D 3 16,8 SA2 N NULL Class 2
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Again, Thanks Vitor.
select isnull(bcClass.Description