I think you meant min(date)...
Josh Berkus wrote:
>
> Marco,
>
> > Is there a way to obtain this records by performing one
> > single query and not by making for each city something like
> > "SELECT city,date FROM table WHERE city='London' AND date>'2002-07-19
> > 15:39:15+00' ORDER BY date AS
How about:
select city, min(date) from thetable where date > '2002-07-19
15:39:15+00' group by city;
JLL
Marco Muratori wrote:
>
> Hi
> suppose I have the following situation:
>
> citydate
> -+---
> London | 2002-08-08 07:05:16+00
> London | 2002
I have a large table (>2 Mrows) against which my application runs some 1M
queries per day. The queries are almost all of the nature of
select PRIMARY_KEY_FLD from MY_TABLE
where SECONDARY_KEY_FLD = 'something';
I've optimized the table to the limits of what I can think of, now I'm
looking to
Marco,
> Is there a way to obtain this records by performing one
> single query and not by making for each city something like
> "SELECT city,date FROM table WHERE city='London' AND date>'2002-07-19
> 15:39:15+00' ORDER BY date ASC LIMIT 1;"?
Close. Try:
SELECT city, MAX("date") as last_date
F
Hi
suppose I have the following situation:
citydate
-+---
London | 2002-08-08 07:05:16+00
London | 2002-07-30 13:08:22+00
London | 2002-07-30 07:39:15+00
London | 2002-07-29 17:51:47+00
London | 2002-07-29 17:45:49+00
London | 2002-07-29 17:45
Zenith,
> Qry = "Select * from Table Where A1 Like '%' AND A2 Like '%' AND A3 Like '%'
> AND A4 Like '%' AND A5 Like '%'"
>
> But in spite of I need a SQL sentence with four (04) AND's in its Where
> clause, my SQL compiler only allow me using one AND.
>
> So How can I solve such a problem.
Greg,
> This seem rather limiting... Suppose I want a trigger that after insert,
> returns the currval(sequence) of the newly inserted row automatically
> without having to run another query ???
Because you can't capture the return value of a trigger. The trigger is
returning the new/altered/
On Fri, Aug 30, 2002 at 14:07:28 +,
Matthew Price <[EMAIL PROTECTED]> wrote:
> Howdy,
>
> Does anyone know of an SQL function that will check a string for compliance with the
>RFC822 mail address spec? I have a script that sends mail from a db (no, I am not a
>spammer) but I often have m
Howdy,
Does anyone know of an SQL function that will check a string for compliance with the
RFC822 mail address spec? I have a script that sends mail from a db (no, I am not a
spammer) but I often have mails sitting in my queue because the MTA (correctly)
refuses to process some of the bogus
This seem rather limiting... Suppose I want a trigger that after insert,
returns the currval(sequence) of the newly inserted row automatically
without having to run another query ???
GP
---(end of broadcast)---
TIP 3: if posting/reading throug
Dear friends,
I need a SQL sentence like this:
Qry = "Select * from Table Where A1 Like '%' AND A2 Like '%' AND A3 Like '%'
AND A4 Like '%' AND A5 Like '%'"
But in spite of I need a SQL sentence with four (04) AND's in its Where
clause, my SQL compiler only allow me using one AND.
So How can
11 matches
Mail list logo