home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / database / oracle / 2724 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  2.4 KB

  1. Path: sparky!uunet!hayes!fgreene
  2. From: fgreene@hayes.com
  3. Newsgroups: comp.databases.oracle
  4. Subject: Re: SQL Forms Question
  5. Message-ID: <6633.2b4d33b9@hayes.com>
  6. Date: 8 Jan 93 07:56:41 EDT
  7. References: <C0Hz12.GG@nocusuhs.nnmc.navy.mil>
  8. Organization: Hayes Microcomputer Products, Norcross, GA
  9. Lines: 49
  10.  
  11. In article <C0Hz12.GG@nocusuhs.nnmc.navy.mil>, maria@mgr.hjf.org (Maria Capule) writes:
  12. > I am a novice Oracle person, so please forgive my ignorance. I was
  13. > wondering if there is a way to split a character field in a SQL Form.
  14. > I am currently using Oracle 6.0A for DOS and am creating forms using
  15. > the SQL Forms Designer. I am used to using Informix and can easily
  16. > write within the .per file.
  17. >        d1 = table.field[1,20];
  18. >        d2 = table.field[21,40];
  19. > to accomplish this. Can somone also tell me if the SQL Forms designer
  20. > is the only method by which to create forms? Thanks. 
  21. > Please e-mail all replies. Thanks again...
  22. > Maria Capule
  23.  
  24. As I understand your question, you want to display less than the entire
  25. length of a character field in the form.  Two options:
  26.  
  27.          a. In the field definition, define the field length and query 
  28.        length to be the same size as the size as the data base
  29.        definition and the DISPLAY length to whatever shorter field
  30.        length you desire.  Forms will retrieve the entire field but
  31.        only display the subset you specified.  Within the field, you
  32.        use the right arrow key to scroll to the hidden portion of
  33.        the field.
  34.  
  35.     b. Use a SUBSTR function to select only that portion of the data
  36.        field in which you are interested.  For example
  37.  
  38.         SELECT SUBSTR(data_base_field, 1, 10)
  39.         INTO   :local_form_field
  40.         FROM   the_table
  41.         WHERE  etc
  42.  
  43.  ----------------------------------------------------------------------------
  44.  |      Frank Greene                  |          //////  //////             |
  45.  |      DELPHI SYSTEMS, Inc.          |           ////    ////              |
  46.  |      Telephone [615] 458-6032      |          ////    ////  //////       |
  47.  |      Compuserve 74200,427          |         ////    ////    ////        |
  48.  |      324 Ootsima Way               |        ////    ////    ////         |
  49.  |      Loudon, TN 37774              |       //////  //////  //////        |
  50.  ----------------------------------------------------------------------------
  51.  |         Of course, any opinions or suggestions are strictly my own       |
  52.  ----------------------------------------------------------------------------
  53.  
  54.