DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Sending file to Printer

  1. #1
    Join Date
    Mar 2004
    Posts
    14

    Sending file to Printer

    Hi
    Any one help me how to work this

    Declare
    l_seq number;
    begin
    Select .Next_Val
    into l_seq
    from dual;
    Select statement to get data from table
    and write that data into file with extension l_seq
    end;
    /
    Using the following command i need to send that file
    to Printer.

    !lp -d $.l_seq

    Its giving error, like l_seq not found. Can you tell me how
    to get the sequence(l_Seq) and pass that to printer.

    Thanks
    Last edited by marist89; 10-11-2004 at 12:07 PM.

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Can't do that (easily) with PL/SQL. I'd suggest just using a script with sqlplus.
    Jeff Hunter

  3. #3
    Join Date
    Mar 2004
    Posts
    14
    Hi Jeff Hunter

    Thank you for your reply, Can i get any sample, i am using sqlplus only.

    Thanks

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Basically, you have to declare a variable in your sqlplus script and then select the sequence number into it. Maybe some other kind soul will have the time to write the code for you...
    Jeff Hunter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width