On Tue, 11 Nov 2003 18:49:31 -0500, Chester Kustarz wrote:
[... cut efficient top-3 youngest query wanted ...]
> select *
> from person
> where age <=
> (select age from person order by age limit 1 offset 2);
Thanks - it works; why didn't I think of that?
--
Greetings from Troels Arvin, Copenh
On Tue, 11 Nov 2003 18:49:31 -0500, Chester Kustarz wrote:
> select *
> from person
> where age <=
> (select age from person order by age limit 1 offset 2);
Integrated into http://troels.arvin.dk/db/rdbms/#select-top-n
--
Greetings from Troels Arvin, Copenhagen, Denmark
-
Bartunov, Thanks alot for you reply, please clarify for me something; I have
a database driven website developed using php and postgresql database, can I
use tsearch facility and customize it to search my database driven website
like how postgresql.org is search please do advice thanks again
Ki
... WHERE field1 LIKE '%' || field2 || '%'
or
... WHERE position(field2 in field1)>0
On Wed, 2003-11-12 at 11:07, Guy Korland wrote:
Hi,
How can I compare two fields if one is a substring of the other?
Something like:
... WHERE StringA like '%' + StringB + '%';
Thanks,
Guy Korland
--
On Wed, Nov 12, 2003 at 11:38:31 -0300,
Franco Bruno Borghesi <[EMAIL PROTECTED]> wrote:
> ... WHERE field1 LIKE '%' || field2 || '%'
The first way won't work correctly if field2 has %s in it.
> or
> ... WHERE position(field2 in field1)>0
---(end of broadcast)--
Hi,
How can I compare two fields if one is a substring of the other?
Something like:
... WHERE StringA like '%' + StringB + '%';
Thanks,
Guy Korland
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropri
Thanks alot, you are right with the table and the -E option. It's very useful.
The only issue I find with your SQL is it relies on "(a.attnum = x.conkey[1] or
a.attnum = x.conkey[2])" which assumes there is two columns forming the primary key of
a table. Perhaps, I should explain what I'm tryi
Holger Jakobs wrote:
Calling a procedure is a statement as well, and it includes all other
procedures called from this procedure. So the statement level is always
the statements that were carried out directly in the transaction. If
anything within one statement fails, the statement was not carried
Hi Everyone,
I am trying to concatenate two fields through a
query:
SELECT
RPAD(no,30,' ') || tableb.kind FROM tablea
WHERE
tablea.kind = tableb.kind
The result gives (for
example):
4595448
Green5966
Yellow106-60033
George,
> SELECT RPAD(no,30,' ') || tableb.kind FROM tablea
> WHERE tablea.kind = tableb.kind
Try SELECT RPAD(no, (35 - LENGTH(tableb.kind)), ' ')
--
-Josh Berkus
Aglio Database Solutions
San Francisco
---(end of broadcast)---
TIP 7: don't fo
Title: Message
Try the TRIM function or
the LTRIM function:
SELECT RPAD(no,30,' ') || TRIM(tableb.kind) FROM tablea
WHERE tablea.kind = tableb.kind
Louise
-Original Message-From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of George WeaverSent: Wednesday, Nov
Title: Message
Hi Louise, Josh,
Thanks for the suggestions.
What I'm trying to accomplish is to have a space
between no and kind. Length(no) can vary. I would like all the kinds
to line up evenly when displayed, with a space between no and kind.
But when I RPAD no (to try and get an ev
"George Weaver" <[EMAIL PROTECTED]> writes:
> ... the ' 's are not quite the same width as=
> an ordinary number or letter. Thus the physical display length of "30 cha=
> racters" (padded) can vary from row to row. The result is that the kinds do=
> n't necessary line up neatly. I need to concat
13 matches
Mail list logo