home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.ingres
- Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!moose.cccs.umn.edu!mcj
- From: mcj@moose.cccs.umn.edu (Mark C. Jones)
- Subject: Dynamic variable evaluation in 4GL?
- Message-ID: <5JAN199310092457@moose.cccs.umn.edu>
- News-Software: VAX/VMS VNEWS 1.41
- Sender: news@news2.cis.umn.edu (Usenet News Administration)
- Nntp-Posting-Host: moose.cccs.umn.edu
- Reply-To: mcj@moose.cccs.umn.edu
- Organization: Colon Cancer Control Study, University of Minnesota, Minneapolis
- Date: Tue, 5 Jan 1993 16:09:00 GMT
- Lines: 35
-
-
- Well, I have scanned the Ingres 6.4 manual and I do not believe it
- is possible to take the name of a variable stored in another varchar
- variable and extract its value.
- i.e.
- xyz=1;
- myvar='xyz';
- abc=value of variable named in myvar which in this case is 1.
-
- Using a select statement like the following does not work:
- select varchar(:myvar) as abc;
- This gives the result abc='xyz'. This is not suprising since the
- variable is only evaluated once.
-
-
- Some other languages provided dereferencing functions to handle this
- situation. Obviously I can use dynamic coding in 3GL but does anyone know
- of any tricks to do this while remaining in 4GL. I think its impossible
- but I would be happy to be proven wrong, maybe there is some new undocumented
- 6.4 function that I am unaware of.
-
-
- ------------------------------------------------------------------
- Mark C. Jones (mcj@moose.cccs.umn.edu)
- CSC Partners
- 5500 Wayzata Blvd, Suite 1100
- Minneapolis MN 55416 USA
- +1 612 593 1122
- ------------------------------------------------------------------
-
-
-
-
-
-
-