ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Transposing data as it is being returned from an query (https://www.excelbanter.com/excel-programming/395088-transposing-data-being-returned-query.html)

hll

Transposing data as it is being returned from an query
 
Hi..

I am quering an oracle table which returns 1 row of 5 data elements. I want
to display it horizontally (say in cells A1:A5). I know I can transpose it
but I was wondering if there was a way I could do the conversion to a
vertical list without having to first put it somewhere on the worksheet and
then doing the transpose operation?

I apologize for being such a rookie but your help would greatly be
appreciated.

RB Smissaert

Transposing data as it is being returned from an query
 
You could transpose an array that you got from the recordset with GetRows.
Or you could transpose the recordset itself, although that might be a bit
more tricky then transposing the array.
Principle will be the same for both, just loop through the array or
recordset, swapping elements.
Note that an array produced by GetRows is already transposed compared to the
database source data.

RBS


"hll" wrote in message
...
Hi..

I am quering an oracle table which returns 1 row of 5 data elements. I
want
to display it horizontally (say in cells A1:A5). I know I can transpose it
but I was wondering if there was a way I could do the conversion to a
vertical list without having to first put it somewhere on the worksheet
and
then doing the transpose operation?

I apologize for being such a rookie but your help would greatly be
appreciated.




All times are GMT +1. The time now is 02:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com