Path: utzoo!attcan!uunet!decwrl!wuarchive!cs.utexas.edu!titan!drack From: drack@titan.tsd.arlut.utexas.edu (Dave Rackley) Newsgroups: comp.databases Subject: Re: substrings ??? Message-ID: Date: 26 Oct 90 13:19:16 GMT References: <9@unigold.UUCP> Sender: news@titan.tsd.arlut.utexas.edu Organization: Applied Research Laboratories, University of Texas at Austin. Lines: 34 In-reply-to: lance@unigold.UUCP's message of 25 Oct 90 23:07:08 GMT In article <9@unigold.UUCP> lance@unigold.UUCP (Lance Ellinghouse) writes: > Is there a way to say something like the following in SQL (and in a view > especially)? [NOT Embeded SQL as I want to do this in a VIEW] > select * > from this_table > where this_var=substring(1,4,this_other_string); > this would select only the 1-4 chars of this_other_string and > be used in the test?? The Ingres command for this is: this_var = left(this_other_string,4) Ingres also has: right(that_other_string,n) It returns the right most n characters. Good luck. -- DISCLAIMER? I don't know anything 'bout any ol' disclaimer! +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+ | David Rackley | | | Applied Research Laboratories | Remember, you can tuna fish, | | The University of Texas | But you can't tuna piano! | | Austin, TX. 78758 | | +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+