I have a Batch Table that has three columns ID, Name, Type and a CustomAttribute table that has three columns ID, ParentID, PropertyName and Value.
The Select query is "Select Batch.ID, Batch.Name, CustomAttribute.PropertyName, CustomAttribute.Value from Batch, CustomAttribute where CustomAttribute.ParentID = Batch.ID
This query will give me two rows for a batch if there were two custom properties for a batch
like :
1, BatchABC, CustomAttrbute1, 123 1, BatchABC, CustomAttrbute2, 456
I would like:
1, BatchABC,123,456 in a single record and the ability to give aliases for the columns in the select such that
ID, BatchName, CustomAttribuite1Name, CustomAttribute2Name 1, BatchABC, 123 , 456
Any help will be greatly appreciated
Itty