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
SQL Reporting (Read 1930 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
SQL Reporting
07.04.09 at 21:11:06
 
SQL Reporting
 
Using SQL reports can be created. The SQL is used to retrieve the data and using SQL*XL commands reporting specific functions can be performed such as formatting a column, changing the column headings and skipping rows.
 
SQL:
Write an SQL select statement (a query) to retrieve the information you want to return into your report.  
 
SQL*XL reporting commands:
To change a column heading you can use the column command. For example running the following command will set the column header to "Employee Id" each time a column emp_id is returned:
column emp_id heading "Employee Id";
select emp_id, name from employees;
 
To apply a specific format to the data in a column you can also use the column command. For example if you want to set the number format each time column sal is returned you can use:
column sal format "$ #,##0.00";
select sal, name from employees;
 
To skip lines when a certain column changes value you can use the break command. To skip lines when the deptno is changed use this command:
break on deptno skip 2;
select sal, name, deptno from employees order by deptno;
Back to top
 
 

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