Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2007
    Posts
    4

    Red face Unanswered: sqlplus column name, column value

    Hi all

    I'm trying to use sqlplus to list :

    columnname : colvalue
    columnname : colvalue
    columnname : colvalue
    columnname : colvalue
    .

    of a table with dozens of cols. I get all the headings (col names) then a bit of data. Impossible to read. Any clues as to how I can print it in a useful format. I only want to hunt certain column values and identify the relevant colname. I tried using describe but this gave me the colnames in alpha order grrrrrr

    Many thanks

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

  3. #3
    Join Date
    Sep 2007
    Posts
    4
    Tony many thanks for that. Sadly it appears not to be available on my client's Oracle 9 on windows system but will hopefully be useful in the future. Pity it was perfect for what I want.

    Any other ideas anyone?

  4. #4
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by flyeogh
    Tony many thanks for that. Sadly it appears not to be available on my client's Oracle 9 on windows system but will hopefully be useful in the future.
    You did read the note at the bottom?

    in sqlplus -- how can you do that? well -- click here ... and grab the code for print_table...
    Simple create the print_table procedure with the code supplied in the link

  5. #5
    Join Date
    Sep 2007
    Posts
    4
    Shammat I only have sqlplus access. Presumably I cannot just type in?

  6. #6
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Copy the code into the windows clip board and then paste it into sqlplus.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  7. #7
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by flyeogh
    Shammat I only have sqlplus access. Presumably I cannot just type in?
    Of course you can.
    Either copy & paste as beilstwh has suggested or create script file (.sql) and run that from within SQL*Plus.
    For details check the SQL*Plus manual.

  8. #8
    Join Date
    Sep 2007
    Posts
    4
    Thanks guys.

Posting Permissions

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