Re: LiveWire/Informix - Select question
Posted in 1997
You have got the direct answers on how to do this with Informix. Now you might also want to redesign your database into what it should look like as a relational database. There isn't supposed to be meaning inside a code field. If territory and sales office aren't the same thing (as they clearly aren't in your case) they should be in separate columns. Then you can select on each, index each and so on. kjackson@lerc.nasa.gov (Keith Jackson) wrote: :Within a LiveWire app I have an Infomix table with a field called :territory. The 3 and 4th characters of the territory are the sales :office. I would like to do a select statement that can pull sales :office off the territory field. : :For example: : :database.SQLTable(select * from mytable where :substr(territory,2,2)='98') : :substr is NOT correct. Does anyone know (if it can be done) the :correct syntax? I could use LIKE, but I need to pull out only the 3rd :and 4th characters. : :Thanks in advance, : :Keith Jackson :kjackson@vlib.com Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org