home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / database / 5824 < prev    next >
Encoding:
Text File  |  1992-07-29  |  2.1 KB  |  62 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!usenet.ucs.indiana.edu!bronze!gribble
  3. From: gribble@bronze.ucs.indiana.edu (steve gribble)
  4. Subject: Re: ABF/4GL Help 
  5. Message-ID: <1992Jul29.131855.12743@bronze.ucs.indiana.edu>
  6. Organization: Indiana University
  7. References: <1992Jul22.180503.27010@homebase.vistachrome.com> <l6v00iINN8qf@jethro.Corp.Sun.COM> <4352@disuns2.epfl.ch> <1992Jul28.185544.17880@emr1.emr.ca>
  8. Date: Wed, 29 Jul 92 13:18:55 GMT
  9. Lines: 51
  10.  
  11. In <1992Jul28.185544.17880@emr1.emr.ca> kasvand@ccrs.emr.ca (Tony Kasvand) writes:
  12.  
  13.  
  14. >   Hi, 
  15. >        I have a small problem with the ABF/4GL (Ingres 6.4) language.
  16.  
  17. >  In the 'where' clause of a callframe statement, I would like to simulate
  18. >the 'field' condition.
  19.  
  20. > Example - 
  21. >  look_for = 'Joe';     /*  varchar(10) */ 
  22. >  whclause = 'fixer';   /*  varchar(15) */ 
  23. > callframe by_fixed_second(by_fixed_second.programs =
  24. >                        select distinct key_b = unique_bug#,
  25. >                                type_p = product_type,
  26. >                                prior = priority,
  27. >                                cond = condition,
  28. >                                name_p  =  product_name,
  29. >                                usrnm = username,
  30. >                                fix = fixer,
  31. >                                d_of_bug = date_of_bug,
  32. >                                name_sys = system_name,
  33. >                                des =details1
  34. >                                from bug_reports_table
  35. >                /* ****** -->*/ where :whclause = :look_for
  36. >                                order by prior );
  37.  
  38. >      I am assuming from this code, this is what it should look like:
  39. >             where 'fixer' = 'Joe'
  40.  
  41. >**->
  42. >   What I really want is:  where fixer = 'Joe'
  43.  
  44. >                             
  45.  
  46. Yes, make the whclause varchar(25) and concatenate the fields together.
  47. e.g  whclause = 'fixer= ' + '''' + 'Joe' + '''';
  48.      ...
  49.      where :whclause
  50.  
  51. i've done this many times, i must admit the quadruple quotes aren't
  52. very intuitive or clean ... 'fixer= ' + '''Joe''';
  53. should work, too, but i haven't tried it that way.
  54.  
  55.  
  56. hope this helps,
  57. steve
  58. A
  59. A
  60. steve
  61.