Re: [SQL] Fastest way to get max tstamp

2006-08-28 Thread Richard Broersma Jr
> name | program | effective | tstamp | rate > --+-+++-- > jdoe | AAA | 2006-07-01 | 2006-07-16 23:42:13.809214 | 20 > jdoe | BBB | 2006-07-01 | 2006-07-16 23:42:13.809214 | 20 > jdoe | AAA | 2006-08-16

[SQL] Fastest way to get max tstamp

2006-08-28 Thread Henry Ortega
This is my table: name | program | effective  |   tstamp   | rate --+-+++-- jdoe | AAA | 2006-07-01 | 2006-07-16 23:42:13.809214 |   20  jdoe | BBB | 2006-07-01 | 2006-07-16 23:42:13.809214 |   20 jdoe | AAA | 2006-

Re: [SQL] Trigger on Insert to Update only newly inserted fields?

2006-08-28 Thread Henry Ortega
Here's what I am doing:I have this table:employee   payrate     effective     tstamp   end_date (to be updated by trigger)jdoe   1000 04-01-2006    2006-03-10 13:39: 07.614945jdoe   1500 04-01-2006    2006-03-12 15:

Re: [SQL] Trigger on Insert to Update only newly inserted fields?

2006-08-28 Thread Michael Fuhr
On Mon, Aug 28, 2006 at 10:02:32AM -0400, Henry Ortega wrote: > I have a On Insert Trigger that updates one of the columns in that same > table. > > Is there a way for the trigger to run only for the newly inserted records? > Instead of all records in the database? Row-level INSERT and UPDATE trig

[SQL] Temporary Views or tables

2006-08-28 Thread Sumeet
Hi all,I'm trying to use temporary views in my application, before i proceed and go ahead for creating the temorary view i would like more abt it.1) when is the temporary view automatically deleted. Is it after we close the connection or when the session endsfor.e.g  my website doesnt   use a p

Re: [SQL] Create Assertion -- Question from a newbie

2006-08-28 Thread Alvaro Herrera
Andrew Sullivan wrote: > On Sun, Aug 27, 2006 at 07:39:49AM -0700, Richard Broersma Jr wrote: > > > Ah, I see. So the points is that checking the integrity between > > two complete data sets can become a preformace killer. > > Not necessarily. More exactly, building a support system that can >

[SQL] Trigger on Insert to Update only newly inserted fields?

2006-08-28 Thread Henry Ortega
I have a On Insert Trigger that updates one of the columns in that same table.Is there a way for the trigger to run only for the newly inserted records? Instead of all records in the database?E.g.:ID      Start_Date End_Date 001   08-01-2006    002   08-02-2006On Insert/Update, Update End_Date=

Re: [SQL] double precision vs. numeric

2006-08-28 Thread D'Arcy J.M. Cain
On Mon, 28 Aug 2006 16:32:31 +0300 Aarni Ruuhimäki <[EMAIL PROTECTED]> wrote: > > > So this merely means that in future one can not insert empty values into > > > field of type double precision ? > > > > Right. 8.0 issues a warning and 8.1 gives an error: > > But NULLs will go in the future too ?

Re: [SQL] double precision vs. numeric

2006-08-28 Thread Michael Fuhr
On Mon, Aug 28, 2006 at 04:32:31PM +0300, Aarni Ruuhimki wrote: > On Monday 28 August 2006 16:08, you wrote: > > > So this merely means that in future one can not insert empty values into > > > field of type double precision ? > > > > Right. 8.0 issues a warning and 8.1 gives an error: > > Ok, th

Re: [SQL] double precision vs. numeric

2006-08-28 Thread Aarni Ruuhimäki
On Monday 28 August 2006 16:08, you wrote: > > So this merely means that in future one can not insert empty values into > > field of type double precision ? > > Right. 8.0 issues a warning and 8.1 gives an error: > Ok, thanks. But NULLs will go in the future too ? BR, Aarni -- Aarni Ruuhimäk

Re: [SQL] double precision vs. numeric

2006-08-28 Thread Michael Fuhr
On Mon, Aug 28, 2006 at 11:08:50AM +0300, Aarni Ruuhimki wrote: > Now I saw it again. In a terminal window after an insert from an application: > > WARNING: deprecated input syntax for type double precision: "" > DETAIL: This input will be rejected in a future release of PostgreSQL. > > So this

Re: [SQL] Create Assertion -- Question from a newbie

2006-08-28 Thread Andrew Sullivan
On Sun, Aug 27, 2006 at 07:39:49AM -0700, Richard Broersma Jr wrote: > Ah, I see. So the points is that checking the integrity between > two complete data sets can become a preformace killer. Not necessarily. More exactly, building a support system that can check such integrity in a completely

Re: [SQL] hi ........i have a query related to MS reporting services

2006-08-28 Thread Magnus Hagander
> HI to all of you. I am a new member of this group and this is my > first mail in this group.I am working in MS Reporting services.And > i am new in this job. > > I have a problem. > There is a table which has many columns. > and i have to give selection to client that he can select any top > 10,

Re: [SQL] double precision vs. numeric

2006-08-28 Thread Aarni Ruuhimäki
On Friday 25 August 2006 08:12, Aarni Ruuhimäki wrote: > On Thursday 24 August 2006 20:29, Tom Lane wrote: > > Aarni =?iso-8859-1?q?Ruuhim=E4ki?= <[EMAIL PROTECTED]> writes: > > > I vaguely remember having seen a message > > > ' ... type double precision ... will be depreciated / unsupported in > >

[SQL] hi ........i have a query related to MS reporting services

2006-08-28 Thread Dinesh Tiwari
HI to all of you. I am a new member of this group and this is my first mail in this group.I am working in MS Reporting services.And i am new in this job.   I have a problem. There is a table which has many columns. and i have to give selection to client that he can select any top 10,25,500,1000