FAQ
I'm searching my many SQL books, but this eludes me, and I was sure
there was a syntax for it. I want to send out a select statement that
finds every string in a field that is essentially larger than (or
smaller than) a globbed string.

This "... where version_label >= BLD_1*" would return:

BLD_1.0
BLD_1.1
BLD_1.2
BLD_1.4

But not:


BLD_0.9

For some reason the keyword "LIKE" is rattling around in my head, but I
can't find any support for this. Do I have to do this programatically?

--
Lan Barnes lan@falleagle.net
Linux Guy, SCM Specialist 858-354-0616
Tcl/Tk Enthusiast

Search Discussions

  • Lan Barnes at Apr 11, 2006 at 5:56 pm

    On Tue, Apr 11, 2006 at 09:51:03AM -0700, Lan Barnes wrote:
    I'm searching my many SQL books, but this eludes me, and I was sure
    there was a syntax for it. I want to send out a select statement that
    finds every string in a field that is essentially larger than (or
    smaller than) a globbed string.

    This "... where version_label >= BLD_1*" would return:

    BLD_1.0
    BLD_1.1
    BLD_1.2
    BLD_1.4

    But not:


    BLD_0.9

    For some reason the keyword "LIKE" is rattling around in my head, but I
    can't find any support for this. Do I have to do this programatically?
    Answering my own question -- I found it:

    SELECT * FROM table WHERE version_label LIKE 'BLD_1%';

    The single quotes were the hold up.

    Thanks to anyone about to help me ;-)

    --
    Lan Barnes lan@falleagle.net
    Linux Guy, SCM Specialist 858-354-0616
    Tcl/Tk Enthusiast

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedApr 11, '06 at 4:46p
activeApr 11, '06 at 5:56p
posts2
users1
websitepostgresql.org
irc#postgresql

1 user in discussion

Lan Barnes: 2 posts

People

Translate

site design / logo © 2022 Grokbase