neildodsworth
Programmer
Hiya Guys,
I'm a little new to these forums but I hope you can help..
If I have a very simple table as follows:
ID : Integer
Index1 : Integer
Index2 : Integer
Value : String
The ID is a unique identifier, index1 and index2 fields are used to stipulate a two dimensional array with the value being the contents of aforesaid array.
Is it possible via SQL to create a query (or multiple) that will return the data in the following form.
Index2 val = 1 : Index2 = 2 : Index2 =3 etc....
Index1 Value : Value : Value
Index1 Value : Value : Value
Index1 Value : Value : Value
Index1 Value : Value : Value
Index1 Value : Value : Value
Index1 Value : Value : Value
etc....
I know that the above might be a little odd, but its a simplification of some dynamic data manipulation I'm doing in a softare project.
Unfortunately the table as described is fixed and not under my control.
A real world example could be:
Table Contains:
ID Index1 Index2 Value
1 1 1 A
2 1 2 65
3 2 1 B
4 2 2 66
5 3 1 C
6 3 2 67
I'd like an SQL Statement that returns
1 2 (effectively Index2)
1 A 65
2 B 66
3 C 67
Thanks for any help.
Neil
I'm a little new to these forums but I hope you can help..
If I have a very simple table as follows:
ID : Integer
Index1 : Integer
Index2 : Integer
Value : String
The ID is a unique identifier, index1 and index2 fields are used to stipulate a two dimensional array with the value being the contents of aforesaid array.
Is it possible via SQL to create a query (or multiple) that will return the data in the following form.
Index2 val = 1 : Index2 = 2 : Index2 =3 etc....
Index1 Value : Value : Value
Index1 Value : Value : Value
Index1 Value : Value : Value
Index1 Value : Value : Value
Index1 Value : Value : Value
Index1 Value : Value : Value
etc....
I know that the above might be a little odd, but its a simplification of some dynamic data manipulation I'm doing in a softare project.
Unfortunately the table as described is fixed and not under my control.
A real world example could be:
Table Contains:
ID Index1 Index2 Value
1 1 1 A
2 1 2 65
3 2 1 B
4 2 2 66
5 3 1 C
6 3 2 67
I'd like an SQL Statement that returns
1 2 (effectively Index2)
1 A 65
2 B 66
3 C 67
Thanks for any help.
Neil