Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Arrange details on a single line (Read 2077 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Arrange details on a single line
30.11.10 at 14:25:48
 
Arrange details on a single line
 
Quote:
in my table there are for each article (ANr) more than one price (BNr) in different lines. How could I arrange it to get each price in one line to the corresponding article in my Excel workbook.

 
There are a few ways to achieve this by the way so I suggest you google a bit for suggestions. Google for rows to columns.
 
But there is an easier way in SQL*XL to achieve this. Consinder the following SQL:
 
select ANr from MyMasterTable where myindex=1
union
select BNr from MyDetailColumn where mymasterindex=1
 
This will return the master Nr from the master table and all the detail BNr rows from the detail table.
Fetch this from the database and chose to diplay database rows as Excel columns (transpose).
 
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1