Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2012

    Unanswered: Getting column structure from view

    Hi guys.

    I'm currently working on a delphi application with data on oracle.
    Since the program lets users print a bunch of reports, when I generate one of them I want to know exactly how long is each field going to be.

    The select queries from the application are made exclusively on views.
    What I would like to accomplish at the application's startup is to generate a list of all selected columns from all views with their data type and lenght, that way I can use it in the sw wherever I need to.

    I am currently querying the ALL_VIEWS table an parsing the SQL text with a delphi procedure, but that doesn't seem to be working out as I hoped
    I'm a basic oracle user and I was wondering if there was any other way I could proceed to get the info I want from every view. Any suggestions?


  2. #2
    Join Date
    Jan 2004
    Croatia, Europe
    Provided Answers: 4
    Have a look at USER_TAB_COLUMNS. This view contains both TABLE (in your case - VIEW) and COLUMN names, as well as data length, precision and other information you might be interested in.

Posting Permissions

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