home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / database / oracle / 1280 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  2.5 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!paladin.american.edu!news.univie.ac.at!bmwf1f.bmwf.gv.at!hatzinger_m
  2. From: hatzinger_m@bmwf1f.bmwf.gv.at
  3. Newsgroups: comp.databases.oracle
  4. Subject: Re: Forms3 Delete a char of the field data
  5. Message-ID: <1992Aug13.150523.31@bmwf1f.bmwf.gv.at>
  6. Date: 13 Aug 92 14:47:39 GMT
  7. References: <1992Aug12.162132.278@falcon.navsses.navy.mil>
  8. Organization: (Klaus-Michael Hatzinger), BMWF, Vienna
  9. Lines: 41
  10.  
  11. In article <1992Aug12.162132.278@falcon.navsses.navy.mil>, huynh@falcon.navsses.navy.mil writes:
  12. > Greetings,
  13. > I am using sqlforms version 3.0.
  14. > I have a problem which I don't even know where to start.  I want to delete a
  15. > char of the enter data into a field.  
  16. > eg. Let 's say I have a field that requires data
  17. > HULL: _________; where the users will enter something like HULL: LST-1183,
  18. > I want to delete the "-" sign/char.
  19. > I want the data to be in the form of 'LST1183', but because of the way our data
  20. > bases are set up, the users will enter the HULL in the form of 'LST-1183'. I
  21. > want to delete the "-" sign/char, and also at the time somehow join the 
  22. > LST 1183 together so that it is like the user had just entered 'LST1183' and
  23. > not 'LST-1183'.
  24. > I need to convert 'LST-1183' into 'LST1183', so that it corresponds with the
  25. > database HULL to do the query.
  26. > I hope I have made myself clear.  Anyone who is interested, but didn't quite
  27. > undertand me, please feel free to ask.  I will be more than happy to make
  28. > myself clear.  
  29. > Any comments or suggestions will be appreciated.  Thanks in advance.
  30.  
  31. Create a POST-CHANGE trigger on the field HULL:
  32.  
  33. IF :hull != REPLACE(REPLACE(:hull,'-',''),' ','') THEN
  34.    :hull := REPLACE(REPLACE(:hull,'-',''),' ','');
  35. END IF;
  36.  
  37. -- 
  38.  
  39. ================================================================================
  40.                                                                           ^
  41.  Federal Ministry of Science and Research                               B | M
  42. <-------------------------------------------------------------------------+---->
  43.  Computer Center                                                        W | F
  44.                                                                           |
  45.  Klaus-Michael Hatzinger            mail: hatzinger_m@bmwf1f.bmwf.gv.at   |
  46.  Bangkasse 1/209                   phone: 0043-222-53120/5188             |
  47.  1014 Vienna, Austria                fax: 0043-222-53120/5155             V
  48. ================================================================================
  49.