Skip to main content

Posts

Showing posts from May, 2012

Quick PL/SQL Variables, Cursor ... Loops

1. RUNTIME STRING/NUM PRINTING SET SERVEROUTPUT ON BEGIN DBMS_OUTPUT.PUT_LINE('ORANGE'); END; / 2. TIMESTAMP EXAMPLE SET SERVEROUTPUT ON DECLARE V_DATE TIMESTAMP; BEGIN SELECT SYSTIMESTAMP-1/24 INTO V_DATE FROM DUAL; DBMS_OUTPUT.PUT_LINE('ONE HR. AGO :: ' || V_DATE); END; / 3. TIMESTAMP EXAMPLE WITH EXCEPTION HANDELING SET SERVEROUTPUT ON DECLARE VDATE TIMESTAMP; BEGIN SELECT SYSTIMESTAMP INTO VDATE FROM DUAL; DBMS_OUTPUT.PUT_LINE(VDATE); EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE('ERROR'); END; / 4. LOOP & SERIES PRINTING SET SERVEROUTPUT ON DECLARE X NUMBER:=1; BEGIN LOOP EXIT WHEN X>10; DBMS_OUTPUT.PUT_LINE(X); X:=X+1; END LOOP; END; / 5. TABLE JOINING & CURSORING CREATE TABLE AUTHORS ( ID NUMBER PRIMARY KEY, FIRST_NAME VARCHAR2(50), LAST_NAME VARCHAR2(50) ); CREATE TABLE BOOKS ( ISBN CHAR(10) PRIMARY KEY, CATEGORY VARCHAR2(20), TITLE VARCHAR2(100), NUM_PAGE NUMBER, PRICE NUMB

How to install a .deb package from Ubuntu Command Line (Terminal)

How to install a .deb package from Ubuntu Command Line (Terminal) Debian (.deb) packages are the packages that are used in Ubuntu. You can install any .deb package in your system. .deb files can generally be installed from your file manager (Nautilus) merely by clicking on them, since file associations with the default installer is already set in Ubuntu. These instructions are for those who wish to install packages from the command-line terminal (Terminal). To install a downloaded Debian (Ubuntu) package (.deb): Open Terminal and type sudo dpkg -i packagename.deb To remove a Debian (Ubuntu) package (.deb): sudo dpkg -r packagename To Reconfigure/Repair an installed Debian (Ubuntu) package (.deb): sudo dpkg-reconfigure packagename