My table basically consists of the following:>
ID,group_id,Description,Var1,Var2,Var3,Vartype
Basically I need a select statement that will gather all the records for a particular parent record via the group_id, which is pretty straightford in itself. Select * where group_id = parentId;
However each record in the child table consists of 3 var columns, which relate to the vartype column.
for example in one rowset>
var1 5
var2 10
var3 null
vartype numeric_min_max
Therefore I want output 5-10, Description
And in another rowset
var1 5
var2 5
var3 10
vartype %_m_s
I want this to be displayed as 5% per metre per second, Description.
Basically I need the select statement to take in to account the vartype, and use only the columns that it needs, and display them in a certain order.
Any help would be great
ID,group_id,Description,Var1,Var2,Var3,Vartype
Basically I need a select statement that will gather all the records for a particular parent record via the group_id, which is pretty straightford in itself. Select * where group_id = parentId;
However each record in the child table consists of 3 var columns, which relate to the vartype column.
for example in one rowset>
var1 5
var2 10
var3 null
vartype numeric_min_max
Therefore I want output 5-10, Description
And in another rowset
var1 5
var2 5
var3 10
vartype %_m_s
I want this to be displayed as 5% per metre per second, Description.
Basically I need the select statement to take in to account the vartype, and use only the columns that it needs, and display them in a certain order.
Any help would be great