#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    1
    Rep Power
    0

    Connect to oracle db & write SQL results into excel file


    hi friends,
    good evening.

    i would like to connect to oracle database and would like to execute series of SQLs and write those SQL results into Excel file (sheet1).

    could some one help with the perl script please.
    i am very new to perl.

    my requirement is simple :
    ------------------------
    db_user_id scott
    db_user_pwd tiger
    db_sid orcl

    select count(*) from emp;
    select count(*) from dept;


    print the same SQLs in A column and result should be in B column in excel file.

    column A column B
    select count(*) from emp; 14
    select count(*) from dept; 4

    thats it.

    could someone help with the perl script please.

    thanks in advance,
    vamsi
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2006
    Posts
    834
    Rep Power
    387

    Cool


    Originally Posted by vamsik366
    hi friends,
    good evening.

    i would like to connect to oracle database and would like to execute series of SQLs and write those SQL results into Excel file (sheet1).

    could some one help with the perl script please.
    i am very new to perl.

    my requirement is simple :
    ------------------------
    db_user_id scott
    db_user_pwd tiger
    db_sid orcl

    select count(*) from emp;
    select count(*) from dept;


    print the same SQLs in A column and result should be in B column in excel file.

    column A column B
    select count(*) from emp; 14
    select count(*) from dept; 4

    thats it.

    could someone help with the perl script please.

    thanks in advance,
    vamsi
    SQL*PLUS -> SET MARKUP HTML ON

IMN logo majestic logo threadwatch logo seochat tools logo