Posts

Showing posts from December, 2023

SQL*Plus Report Syntax and Code

SQL*Plus Report Syntax and Code ======================================================== Example-1 SET PAGESIZE 30; SET LINESIZE 256; SET PAUSE ON SET PAUSE ‘Please Enter Any key to Continue..’; TTITLE CENTER ‘Employee detail Report’; BTITLE ‘End Of the Report’; COLUMN JOB FORMAT A3 TRUNC; SELECT EMPNO, ENAME, JOB, HIREDATE FROM SCOTT.EMP; TTITLE OFF; BTITLE OFF; CLEAR COLUMN; SET PAGESIZE 24; SET LINESIZE 80; ========================================================= Example-2 SET PAGESIZE 30; SET LINESIZE 256; SET PAUSE ON SET PAUSE ‘Please Enter Any key to Continue..’; TTITLE CENTER ‘Employee detail Report’ SKIP 1 – RIGHT ‘Page_No’ FORMAT 99 SQL.PNO SKIP 2 ; BTITLE ‘End Of the Report’; COLUMN invoice_date FORMAT A6 TRUNC; COLUMN invoice_num HEADING Invoice_number; COLUMN invoice_amount FORMAT $999999.99; select invoice_num, invoice_date, invoice_amount, amount_paid FROM ap_invoices_all where rownum < 25; TTITLE OFF; BTITLE OFF; CLEAR COLUMN; SET PAGESIZE 24; SET LINESIZE 80; =====

Important Commands for SQL*Plus Reports

Important Commands for SQL*Plus Reports ========================================================= Some Command We have to understand before developing the report by using the command line utility in Oracle database  ========================================================= SET PAGESIZE : – Sets maximum number of line per page and the default value is 24.  SET LINESIZE :-  Sets maximum number of characters allowed per line and the default value is 80.  SET PAUSE ON/OFF:-  Sets system to pause after each page. TTITLE :-  Sets top title for each page of reports.  BTITLE:-  Sets bottom title for each page of reports.  HEADING :-  The HEADING setting controls whether column headings print when you SELECT or PRINT data. The default value for this setting is ON, which allows column headings to print. COLUMN  Command Details:- It is used fo formating of an column in report. CLEAR COLUMN :-  it clear the column command instruction as set previous. BREAK  ON/OFF  :- it tells SQL*Plus where to pu

SQL,PLSQL, TSQL and SQL*Plus

SQL,PLSQL, TSQL and SQL*Plus SQL :-  Structured Query Language (SQL) is the set of statements with which all programs and users access data in an Oracle Database.    SQL is used for adding, retrieving, or updating data stored in a database. It is used across many different types of databases PL-SQL :-  PL/SQL is Oracle’s procedural extension to industry-standard SQL. PL/SQL naturally, efficiently, and safely extends SQL for developers and it is used by Oracle  SQL Example :-  SELECT * FROM users ORDER BY age LIMIT 10; T-SQL :-  T-SQL, which stands for Transact-SQL and is sometimes referred to as TSQL, is an extension of the SQL language           used primarily within Microsoft SQL Server. This means that it provides all the functionality of SQL but with some added extras. T-SQL Example :-  SELECT TOP 10 (*) FROM users ORDER BY age; SQL*Plus :-  it used by oracle database to provide command line utility and by using this SQL Plus we can do some different task.