>> Original Message <<
On 2/16/01, 8:24:09 AM, Volker Paul <[EMAIL PROTECTED]> wrote regarding Re:
[SQL] C/C++ interface:
> Tom Lane wrote:
> >
> > Volker Paul <[EMAIL PROTECTED]> writes:
> > > Is someone maintaining the C++ interface and its documentation?
>
Hi,
What's the correct syntax to access rows in a FOR loop? I'm writing
a PL/PgSQL doc and seem to be making a mistake somewhere.
I am referring to this:
[<>]
FOR record | row IN select_clause LOOP
statements
END LOOP;
How do I access the
Actually, a default of now() would be perfectly providing you created a rule to
trap insert's and updates and remove the setting for that time/date from being
inserted so as to have the db use the dfault which I think is far easier that
making a silly trigger for something so simple.
Dan
Dave We
Hello.
I have a table in which I'm trying to store the length of a sound file. I
decided to use the TIME data type. Was this correct? One of the operations I
want to do is sum() all of my files lengths to get the total amount in terms of
time, of sound that I have.
I notice that sum() doesn't ta
In data Wed, 14 Feb 2001 21:10:30 + (UTC), postgresql scrive:
>I have a table that has a 'date' column. In psql I tried to do a
>
>select proofdate::text from openjobs where jobno = '10625';
>
>responce: can not cast type 'date' to 'text'
>
>Did i miss-read this section. I thought I could c
David,
> However this gives me output that I don't know how to read: '7 02:34:27'
> Does that read as 7 Days, 2 Hours, 34 Minutes and 27 seconds?
Yes.
-Josh Berkus
--
__AGLIO DATABASE SOLUTIONS___
Josh Berkus
Complete inf
I would welcome any suggestions for fine-tuning this search to run faster.
Here is the SQL. Basically what we're allowing people to do is to specify
words to search our article index.
THE TABLES:
knowledge = the knowledge base of articles
kb_categories = the category that each article is assign
I need to create a query which will select a request_no between Data1 and
Date2 so...
SELECT request_no FROM request where status_code ='C' and (completed_date
between 01/01/2000 and 01/01/2001);
The problem I have run into is that the completed_date field is a datetime
format (not by my own
Hi, I am not sure if this went through the first time so here it
is again.
Ok what I am trying to do is select out of the database the latest record
meeting a certain criteria.
Example:
Number
| Fruit
| Date
15
Apples July
Ok what I am trying to do is select out of the database the latest record
meeting a certain criteria.
Example:
Number
| Fruit
| Date
15
Apples July 20, 1999
20
Oranges June 7, 2000
13
Get an SQL book.
select * from basket
where date=(select max(date) where fruit='Apples)
and fruit='Apples';
On Thu, 15 Feb 2001, Steve Meynell wrote:
> Ok what I am trying to do is select out of the database the latest
> record meeting a certain criteria.
>
> Example:
>
> Number
It would be something like:
select * from basket where Date=(SELECT max(Date) from basket);
At 09:41 AM 2/16/2001 -0500, Steve Meynell wrote:
>Hi, I am not sure if this went through the first time so here it is again.
>
>
>Ok what I am trying to do is select out of the database the latest rec
On Fri, Feb 16, 2001 at 09:41:09AM -0500, Steve Meynell wrote:
>
> I know this doesn't work but I need something like it.
> or something like
>
> select * from basket where max(date) and fruit='Apples';
> This would yield me:
> 15Apples July 20, 1999
SELECT * FROM basket ORDER BY date desc LIMIT 1;
and
SELECT * FROM basket WHERE fruit = 'apple' ORDER BY date desc LIMIT 1;
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
On Fri, 16 Feb 2001, Steve Meynell wrote:
> Hi, I am not sure if this went through t
How 'bout these:
fgdata=# select * from fruit order by dt desc limit 1;
number | fruit | dt
+-+
20 | Oranges | 2000-06-07 00:00:00-05
(1 row)
fgdata=# select * from fruit where fruit='Apples' order by dt desc limit
1;
number |
Steve Meynell <[EMAIL PROTECTED]> writes:
> select * from basket where max(date) and fruit='Apples';
> I know this doesn't work but I need something like it.
Perhaps
select * from basket where fruit='Apples'
order by date desc
limit 1;
The limit clause is
Try:
SELECT request_no FROM request where status_code ='C' and
(completed_date::date
between '01/01/2000'::date and '01/01/2001'::date)
actually date('01/01/2000') does same thing as '01/01/2000'::date
Jie LIANG
St. Bernard Software
Internet Products Inc.
10350 Science Center Drive
Suite 10
Subquery will do:
select * from basket where Date in (select max(Date) from basket);
Jie LIANG
St. Bernard Software
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
[EMAIL PROTECTED]
www.stbernard.com
www.ipinc.com
On Fri, 16 Feb 2001, St
Yes,
e.g.
declare
r record;
begin
for r in select statement loop
r.fieldname can fetch the result from the select statment row by row
Jie LIANG
St. Bernard Software
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
[EMAIL PROTECTED]
www.
19 matches
Mail list logo