K
Kim
Hi all
I want to retrieve data from an Oracle database
placing them in a sheet
in different columns
at present I use msquery and the result comes in 3 colums
with many rows, like this
time ID VALUE
2003.10.18 00:00 timeserie1 345
2003.10.18 01:00 timeserie1 567
..
..(24 timestamps for timeserie1)
..
2003.10.18 23:00 timeserie1 123
(new timeserie comes here)
2003.10.18 00:00 timeserie2 234
2003.10.18 01:00 timeserie2 345
..
..(24 timestamps for timeserie2)
a.s.o.
I want to have the result in a matrix
like this
[begin]
timeserie1 timeserie2 timeserie3
2003.10.18 00:00 123 456 999
2003.10.18 01:00 234 345 888
..
..
2003.10.18 23:00 111 763 434
[end]
this is the sql from msquery..
'SELECT VW_EXPORT_VIEW.DATAPOINT_NAME, VW_EXPORT_VIEW.TIMESTAMP,
VW_EXPORT_VIEW.VALUE, VW_EXPORT_VIEW.MESS_ID
'FROM BDATA_SYS.VW_EXPORT_VIEW VW_EXPORT_VIEW
'WHERE (VW_EXPORT_VIEW.TIMESTAMP>{ts '2003-10-12 00:00:00'} And
VW_EXPORT_VIEW.TIMESTAMP<{ts '2003-10-13 00:00:00'}) AND
(VW_EXPORT_VIEW.MESS_ID In (5621,5622,5623,5593))
I do not want to use pivots.
how do I do that i VBA?
Cam one of you freindly poeple in here please help??
Best Regards
Kim
I want to retrieve data from an Oracle database
placing them in a sheet
in different columns
at present I use msquery and the result comes in 3 colums
with many rows, like this
time ID VALUE
2003.10.18 00:00 timeserie1 345
2003.10.18 01:00 timeserie1 567
..
..(24 timestamps for timeserie1)
..
2003.10.18 23:00 timeserie1 123
(new timeserie comes here)
2003.10.18 00:00 timeserie2 234
2003.10.18 01:00 timeserie2 345
..
..(24 timestamps for timeserie2)
a.s.o.
I want to have the result in a matrix
like this
[begin]
timeserie1 timeserie2 timeserie3
2003.10.18 00:00 123 456 999
2003.10.18 01:00 234 345 888
..
..
2003.10.18 23:00 111 763 434
[end]
this is the sql from msquery..
'SELECT VW_EXPORT_VIEW.DATAPOINT_NAME, VW_EXPORT_VIEW.TIMESTAMP,
VW_EXPORT_VIEW.VALUE, VW_EXPORT_VIEW.MESS_ID
'FROM BDATA_SYS.VW_EXPORT_VIEW VW_EXPORT_VIEW
'WHERE (VW_EXPORT_VIEW.TIMESTAMP>{ts '2003-10-12 00:00:00'} And
VW_EXPORT_VIEW.TIMESTAMP<{ts '2003-10-13 00:00:00'}) AND
(VW_EXPORT_VIEW.MESS_ID In (5621,5622,5623,5593))
I do not want to use pivots.
how do I do that i VBA?
Cam one of you freindly poeple in here please help??
Best Regards
Kim