Tutorial in General

List of all tutorials.

Linux mount iso image.

Below is the example of Linux command to mount the iso image on your hard drive:

[root@fedora ~]# mount -o loop -t iso9660 Your_iso_filename_here_DVD.iso /media/cdrom

change the filename and path to iso image and to the mounted path to fit your system configuration.

 

 


So far

Absolutely right. I think you are several steps ahead of me now. I don't know how you manage to get spare time in your busy day Tongue out

 

But I think that's ok. Probably that's why I'm visiting here every now and then. I like to see your progress. Sorry though I can't contribute any useful article. Don't worry, I'll cheer you up Cool Go Johny...go...

 

Well, that's all for now. I don't know when we can see each other again. Untill that time,  keep in touch yaa...

 

Take care dude! Keep up the good work...cheers!


Customize drupal user login block

Log in to your drupal site as admin and then, go to administer -> block then go to tab add block to create new customize your drupal user login block.

drupal login regester customisedrupal welcome

On the block body paste this php code to create the new customize your drupal user login block:

 

<?php global $user; ?>

<?php if ($user->uid) : ?>

Welcome: <?php print l($user->name,'user/'.$user->uid); ?> |

<?php print l("logout","logout"); ?>

<?php else : ?>

For full access and to post messages and comments please Login/Register: <?php print l("Login/Register","user/login"); ?>

<?php endif; ?>

 


Oh my...yeah whatever!

Should I say, it's creative? Or maybe, deceptive? Or perhaps, you are a genius? Sealed

Huh??? Guess i should shut my mouth up...yeah whatever.

 

You make me grin everytime I visit here, man. What's so funny? You may ask...Well, nothing particular, but your sense of deception seems never end. Maybe not all people can see it but not me...I just can't help myself. So what I can do is laughing like crying Cry

Anyway, I just know you, man. And as a friend, my support for you will never end Innocent


Oracle 9i PL/SQL Language Fundamentals

My First PL/SQL program Smile

 

DECLARATION FOR DATE USING PLSQL

 

SET SERVEROUTPUT ON
DECLARE
MyName VARCHAR2(10);
MyWeight NUMBER;
today DATE DEFAULT SYSDATE;
BEGIN
MyName :='Khairi';
MyWeight :=60;

DBMS_OUTPUT.PUT_LINE('Hello from Oracle.');
DBMS_OUTPUT.PUT_LINE(MyName);

DBMS_OUTPUT.PUT_LINE('Welcome to Oracle,' || MyName);

DBMS_OUTPUT.PUT_LINE('my name is ' || MyName || 'and my weight is ' || MyWeight);
DBMS_OUTPUT.PUT_LINE('Today is ' || today);

END;

 

DECLARATION FOR CHAR AND NUMBER USING PLSQL

 

SET SERVEROUTPUT ON
DECLARE
MyName VARCHAR2(10);
MyWeight NUMBER;
BEGIN
MyName :='Khairi';
MyWeight :=60;

DBMS_OUTPUT.PUT_LINE('Hello from Oracle.');
DBMS_OUTPUT.PUT_LINE(MyName);

DBMS_OUTPUT.PUT_LINE('Welcome to Oracle,' || MyName);

DBMS_OUTPUT.PUT_LINE('my name is ' || MyName || 'and my weight is ' || MyWeight);

END;

 


sql date format

 

 

SQL> select ename, TO_CHAR(hiredate, 'dd-mm-yyyy') from emp
2

* enter key 2 times:

* Then save

SQL> save dateformat
Created file dateformat.sql
SQL> edit dateformat

sql date format
SQL>
SQL>
SQL> start dateformat

ENAME TO_CHAR(HI
---------- ----------
SMITH 17-12-1980
ALLEN 20-02-1981
WARD 22-02-1981
JONES 02-04-1981
MARTIN 28-09-1981
BLAKE 01-05-1981
CLARK 09-06-1981
SCOTT 19-04-1987
KING 17-11-1981
TURNER 08-09-1981
ADAMS 23-05-1987
JAMES 03-12-1981
FORD 03-12-1981
MILLER 23-01-1982

 

GET THE SYSTEM DATE

SQL> select SYSDATE from dual;

SYSDATE
---------
19-DEC-06
SQL>

 

MORE EXAMPLE ON DATE FORMAT:

SQL> edit dateformat

select 'dd-mon-yyyy -> ' || TO_CHAR(SYSDATE, 'dd-mon-yyyy') AS "Title Header 1" from dual;
select 'dd-Mon-yyyy -> ' || TO_CHAR(SYSDATE, 'dd-Mon-yyyy') AS "Title Header 2" from dual;
select 'DD-MON-YY -> ' || TO_CHAR(SYSDATE, 'DD-MON-YY') AS "Title Header 3" from dual;
select 'DDspth-MONTH-YEAR -> ' || TO_CHAR(SYSDATE, 'DDspth-MONTH-YEAR') AS "Title Header 4" from dual;
-- =============================================


select ename, TO_CHAR(hiredate, 'dd-mm-yyyy') from emp
/

oracle sql date format

SQL> start dateformat

Title Header 1
--------------------------
dd-mon-yyyy -> 19-dec-2006

Title Header 2
--------------------------
dd-Mon-yyyy -> 19-Dec-2006

Title Header 3
----------------------
DD-MON-YY -> 19-DEC-06

Title Header 4
------------------------------------------------------------
DDspth-MONTH-YEAR -> NINETEENTH-DECEMBER -TWO THOUSAND SIX

ENAME TO_CHAR(HI
---------- ----------
SMITH 17-12-1980
ALLEN 20-02-1981
WARD 22-02-1981
JONES 02-04-1981
MARTIN 28-09-1981
BLAKE 01-05-1981
CLARK 09-06-1981
SCOTT 19-04-1987
KING 17-11-1981
TURNER 08-09-1981
ADAMS 23-05-1987
JAMES 03-12-1981
FORD 03-12-1981
MILLER 23-01-1982
SQL>


Adding parameters to SQL query



SQL> edit mynameis

/*
File            :mynameis.sql
Purpose         : Display information from the emp table in the following format:
                "My name is INITCAP(ename), I started work on hiredate."
Params          : &dept (integer) - Department number
*/


select
    (
    'my name is ' || INITCAP(ename) ||
    ', I started work on ' || hiredate
    )
    as "Below is a list of Employees"
from
    emp
where
    deptno = &dept
/
 

sql parameter

SQL> start mynameis
DOC>File            :mynameis.sql
DOC>Purpose         : Display information from the emp table in the following format:
DOC>                "My name is INITCAP(ename), I started work on hiredate."
DOC>Params          : &dept (integer) - Department number
DOC>*/
Enter value for dept:

THE PROGRAM ASKING FOR VALUE:

ENTER NUMBER 30:

 

Enter value for dept: 30
old  10:        deptno = &dept
new  10:        deptno = 30


Below is a list of Employees
--------------------------------------------------
my name is Allen, I started work on 20-FEB-81
my name is Ward, I started work on 22-FEB-81
my name is Martin, I started work on 28-SEP-81
my name is Blake, I started work on 01-MAY-81
my name is Turner, I started work on 08-SEP-81
my name is James, I started work on 03-DEC-81
SQL> 


Adding report title to sql output

SQL> start mynameis
DOC>File :mynameis.sql
DOC>Purpose: Display information from the emp table in the following format:
DOC>"My name is INITCAP(ename), I started work on hiredate."
DOC>*/

'MYNAMEIS'||INITCAP(ENAME)||',ISTARTEDWORKON'||HIR
--------------------------------------------------
my name is Smith, I started work on 17-DEC-80
my name is Allen, I started work on 20-FEB-81
my name is Ward, I started work on 22-FEB-81
my name is Jones, I started work on 02-APR-81
my name is Martin, I started work on 28-SEP-81
my name is Blake, I started work on 01-MAY-81
my name is Clark, I started work on 09-JUN-81
my name is Scott, I started work on 19-APR-87
my name is King, I started work on 17-NOV-81
my name is Turner, I started work on 08-SEP-81
my name is Adams, I started work on 23-MAY-87
my name is James, I started work on 03-DEC-81
my name is Ford, I started work on 03-DEC-81
my name is Miller, I started work on 23-JAN-82
SQL>
SQL> ttitle "REPORT : Employee List."
SQL> run mynameis
1 select
2 'my name is ' || INITCAP(ename) ||
3 ', I started work on ' || hiredate
4* from emp

Tue Dec 19 page 1
REPORT : Employee List.

'MYNAMEIS'||INITCAP(ENAME)||',ISTARTEDWORKON'||HIR
--------------------------------------------------
my name is Smith, I started work on 17-DEC-80
my name is Allen, I started work on 20-FEB-81
my name is Ward, I started work on 22-FEB-81
my name is Jones, I started work on 02-APR-81
my name is Martin, I started work on 28-SEP-81
my name is Blake, I started work on 01-MAY-81
my name is Clark, I started work on 09-JUN-81
my name is Scott, I started work on 19-APR-87
my name is King, I started work on 17-NOV-81
my name is Turner, I started work on 08-SEP-81
my name is Adams, I started work on 23-MAY-87
my name is James, I started work on 03-DEC-81
my name is Ford, I started work on 03-DEC-81
my name is Miller, I started work on 23-JAN-82
SQL>
SQL>
SQL> edit mynameis


Output feedback on sql output

To set the feedback environment on Oracle SQL Plus

SQL> set feedback on
SQL> show feedback
FEEDBACK ON for 1 or more rows
SQL> start mynameis
DOC>File :mynameis.sql
DOC>Purpose: Display information from the emp table in the following format:
DOC>"My name is INITCAP(ename), I started work on hiredate."
DOC>*/

'MYNAMEIS'||INITCAP(ENAME)||',ISTARTEDWORKON'||HIR
--------------------------------------------------
my name is Smith, I started work on 17-DEC-80
my name is Allen, I started work on 20-FEB-81
my name is Ward, I started work on 22-FEB-81
my name is Jones, I started work on 02-APR-81
my name is Martin, I started work on 28-SEP-81
my name is Blake, I started work on 01-MAY-81
my name is Clark, I started work on 09-JUN-81
my name is Scott, I started work on 19-APR-87
my name is King, I started work on 17-NOV-81
my name is Turner, I started work on 08-SEP-81
my name is Adams, I started work on 23-MAY-87
my name is James, I started work on 03-DEC-81
my name is Ford, I started work on 03-DEC-81
my name is Miller, I started work on 23-JAN-82

14 rows selected.

SQL> set feedback off
SQL> show feedback
feedback OFF
SQL> start mynameis
DOC>File :mynameis.sql
DOC>Purpose: Display information from the emp table in the following format:
DOC>"My name is INITCAP(ename), I started work on hiredate."
DOC>*/

'MYNAMEIS'||INITCAP(ENAME)||',ISTARTEDWORKON'||HIR
--------------------------------------------------
my name is Smith, I started work on 17-DEC-80
my name is Allen, I started work on 20-FEB-81
my name is Ward, I started work on 22-FEB-81
my name is Jones, I started work on 02-APR-81
my name is Martin, I started work on 28-SEP-81
my name is Blake, I started work on 01-MAY-81
my name is Clark, I started work on 09-JUN-81
my name is Scott, I started work on 19-APR-87
my name is King, I started work on 17-NOV-81
my name is Turner, I started work on 08-SEP-81
my name is Adams, I started work on 23-MAY-87
my name is James, I started work on 03-DEC-81
my name is Ford, I started work on 03-DEC-81
my name is Miller, I started work on 23-JAN-82
SQL>


SQL concatenation operator

using the || operator (two vertical bar) some databese use + operator

 

SQL> select 'my name is '||ename||', I started work on ' || hiredate from emp ;

'MYNAMEIS'||ENAME||',ISTARTEDWORKON'||HIREDATE
--------------------------------------------------
my name is SMITH, I started work on 17-DEC-80
my name is ALLEN, I started work on 20-FEB-81
my name is WARD, I started work on 22-FEB-81
my name is JONES, I started work on 02-APR-81
my name is MARTIN, I started work on 28-SEP-81
my name is BLAKE, I started work on 01-MAY-81
my name is CLARK, I started work on 09-JUN-81
my name is SCOTT, I started work on 19-APR-87
my name is KING, I started work on 17-NOV-81
my name is TURNER, I started work on 08-SEP-81
my name is ADAMS, I started work on 23-MAY-87

'MYNAMEIS'||ENAME||',ISTARTEDWORKON'||HIREDATE
--------------------------------------------------
my name is JAMES, I started work on 03-DEC-81
my name is FORD, I started work on 03-DEC-81
my name is MILLER, I started work on 23-JAN-82

14 rows selected.

 



SQL> select 'my name is '||ename||', I started work on ' || hiredate from emp
2


SQL> list
1* select 'my name is '||ename||', I started work on ' || hiredate from emp


Syndicate content