asterisk as data
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Using Informix SE 7.2. In a perform screen query I can do \\* in a column to determine if any of the rows have an asterisk as the only data in a column. In SQL I can do 'where column_name = *' to determine if any of the rows have an asterisk as the only data in a column. I can't figure out how to do this in 4gl when using the construct statement. Can anyone give me a clue?
Evidently I'm doing something wrong since I don't get any responces to my questions. Am I using bad tone, incomplete information, stupid questions? I would never have put an asterisk in a column as data but my users have and now they want to query on it (they have also used a # and + signs as data but I haven't got to that yet. If I query for a * using \\* in the 4gl data screen the construct statement changes it to matches * which is a wild-card query for records having something in the column whereas I just want the columns that have an * as the data. Thanks, Dick In article <Hassler.1-C3F689.08500815082000@nntp.service.ohio-state.edu>, "Richard E. Hassler" <Hassler.1@osu.edu> wrote: > Using Informix SE 7.2. > > In a perform screen query I can do \\* in a column to determine if any of > the rows have an asterisk as the only data in a column. > > In SQL I can do 'where column_name = *' to determine if any of the rows > have an asterisk as the only data in a column. > > I can't figure out how to do this in 4gl when using the construct > statement. Can anyone give me a clue?
"Richard E. Hassler" wrote: > > Evidently I'm doing something wrong since I don't get any responces to > my questions. Am I using bad tone, incomplete information, stupid > questions? I would never have put an asterisk in a column as data but > my users have and now they want to query on it (they have also used a # > and + signs as data but I haven't got to that yet. > > If I query for a * using \\* in the 4gl data screen the construct > statement changes it to matches * which is a wild-card query for records > having something in the column whereas I just want the columns that have > an * as the data. > Thanks, > Dick > There was nothing wrong with you original post (which I have snipped). But somedays everyone is drunk, or on holiday or tired, or your post doesn't propagate well, or only people who don't know the answer (like me?) read your post, or whatever. This is usenet after all... Anyway, does the string below work? LET lc_some_string = "SELECT * FROM table WHERE column = '*'" (That's a genuine question as I've never had to try it). Knowing users they will want '*' to mean both a literal asterisk AND a wildcard depending on how they feel. You will probably have to program some kind of pop-up window or let them set a flag, which will prompt the 4GL to prepare different queries. It's probably easier to intercept the query and explicitly prepare it than prepare from the form in this case... There was something discussion of matching a literal asterisk a while back - have a look at this thread on deja, where the methods included: < http://x57.deja.com/[ST_rn=ps]/getdoc.xp?AN=598859622&CONTEXT=966885690.1967456312&hitnum=3>. Andrew. -- Usenet, a global collection of flaming opinions and senseless babble, was designed as a way to eat up precious spool space on a system's hard drive. It also is a way for people to distribute pornography. (By Robert A. Hayden <www.geekcode.com>)