Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2004
    Location
    Las Vegas, NV USA
    Posts
    38

    Unanswered: "LITERAL" commands in ORACLE

    I wanted to know, does anyone know ahything about how to generate LITERAL text? Otherwise, can ORACLE produce 5 lines of text, and then have those five lines routed to a printer on the network. Doing all that without the user seeing.
    Thanks
    TOdd
    Todd Farino
    Timet Corporation
    todd.farino@timet.com

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >can ORACLE produce 5 lines of text...
    NO, becuase Oracle is simply an RDBMS; a repository of data.
    Oracle, on it own, knows NOTHING about printers.
    1) What version(s) of Oracle products(s) do you have?
    2) With what tools/IDE/application was your application developed?
    3) What OS & version?
    I'm confident that I could solve your problem & my consulting rate is $150/hour (USD).
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi,

    This certainly works on 2K (and should be good for most windows versions)...

    SQL> spool lpt1
    SQL> select 'line of text' from dual;
    SQL> select 'something else'; from dual;
    SQL> spool off

    I get a page of stuff from the printer.

    You should also be able to say

    spool "printername" (ie \\Accounts Printer) or what have you.

    Maybe someone with *nix kicking about would try the equivalent.

    Hth
    Bill
    Please don't email me directly with questions. I've probably just got home from the pub and cannot guarantee the sanity of my answers. In fact, I can't believe I actually made it home.

  4. #4
    Join Date
    Jan 2004
    Location
    Las Vegas, NV USA
    Posts
    38
    Thank you Bill I will give that a try. When I call a printer on the network, I should just say spool //Printername? This printer is setup on my computer.
    Thank you for your help.
    Todd
    Todd Farino
    Timet Corporation
    todd.farino@timet.com

  5. #5
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi,

    AFAIK Spool \\printername should work - but note backslash (\) not forward slash (/).

    Spool is a SqlPlus command, but there is no reason not to do a UTL_FILE.OPEN( 'lpt1' ) or UTL_FILE.OPEN( '\\printername' ) from within PL/SQL if you so wished. I haven't tried it myself though.

    Hth
    Bill
    Please don't email me directly with questions. I've probably just got home from the pub and cannot guarantee the sanity of my answers. In fact, I can't believe I actually made it home.

  6. #6
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    spool out will send to default printer.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

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