Title: Message
A database I
maintain has a central transaction table ( FTRANS)
I would like an
second table FTRANS_IMAGE to maintain a historical view of ftrans. So if records
in FTRANS are altered we can trace the effect of those changes in
FTRANS_IMAGE.
I expect this has
been done MANY
Keith,
> Can triggers and functions have the same name?
Yes.
> Is this a good practice?
It can be. If the function does nothing but power the trigger, sure. Or
you can use prefixes or suffixes to distinguish them. For example, if you
had an audit trigger on the companies table, you might
Oops! [EMAIL PROTECTED] ("Yudie") was seen spray-painting on a wall:
> How in plpgsql use LIKE with a variable?
>
> let say I want to do this query:
> SELECT INTO RS id FROM customer WHERE firstname LIKE keyword% LIMIT 1;
>
> keyword is a variable, in this case I want to find name like 'Jo%'
>
Try:
SELECT INTO RS ID FROM CUSTOMER WHERE FIRSTNAME LIKE KEYWORD || ''%'' LIMIT
1;
You append KEYWORD and a '%' together using ||. You need to use
doubled quotes inside the quoted environment; one gets stripped off so
that the stored procedure will contain the query
SELECT INTO RS ID FRO
On Thu, Dec 16, 2004 at 05:53:43PM -0600, Yudie wrote:
> How in plpgsql use LIKE with a variable?
>
> let say I want to do this query:
>
> SELECT INTO RS id FROM customer WHERE firstname LIKE keyword% LIMIT 1;
>
> keyword is a variable, in this case I want to find name like 'Jo%'
Use the
How in plpgsql use LIKE with a
variable?
let say I want to do this query:
SELECT
INTO RS id FROM customer WHERE firstname LIKE keyword% LIMIT
1;
keyword is a variable, in this case I want to find
name like 'Jo%'
Full functio
am 16.12.2004, um 8:10:25 -0600 mailte Bruno Wolff III folgendes:
> On Thu, Dec 16, 2004 at 12:01:39 +0100,
> Andreas Kretschmer <[EMAIL PROTECTED]> wrote:
> > >
> > > considering that almost 70% of the rows will be with 'VALUE1', 20%
> > > will be with 'VALUE2' and 10% will be with 'VALUE3' o
On Thu, Dec 16, 2004 at 12:01:39 +0100,
Andreas Kretschmer <[EMAIL PROTECTED]> wrote:
> >
> > considering that almost 70% of the rows will be with 'VALUE1', 20%
> > will be with 'VALUE2' and 10% will be with 'VALUE3' on the average.
> >
> > should I create an index to speedup the counts or not
At 12.21 16/12/2004, you wrote:
Am Donnerstag, 16. Dezember 2004 11:34 schrieb Roberto Fichera:
> Hi all,
>
> I have a table acct as (username, terminatedate, terminatecause)
> I would like to build a query which returns three columns orderd by data
> like:
>
> date_trunc( 'day', terminatedate ) |
On Thu, 16 Dec 2004 11:41:54 +0100
Jerome Alet <[EMAIL PROTECTED]> wrote:
> For a future databas, I plan to have got a table with a text field
> which can contain only three different values, say "VALUE1",
> "VALUE2", and "VALUE3"
Can it increase? That is, can a "VALUE4" be added half way thro
Am Donnerstag, 16. Dezember 2004 11:34 schrieb Roberto Fichera:
> Hi all,
>
> I have a table acct as (username, terminatedate, terminatecause)
> I would like to build a query which returns three columns orderd by data
> like:
>
> date_trunc( 'day', terminatedate ) | count(cause1) | count(cause2)
>
am 16.12.2004, um 11:41:54 +0100 mailte Jerome Alet folgendes:
> Hi,
>
> For a future databas, I plan to have got a table with a text field
> which can contain only three different values, say "VALUE1",
> "VALUE2", and "VALUE3"
Why text-fields for this task? I would prefer a smallint for this
Hi,
For a future databas, I plan to have got a table with a text field
which can contain only three different values, say "VALUE1",
"VALUE2", and "VALUE3"
this table may have, over the course of one year, several million
rows for a size around 2 Gb or more.
I'd be interested in having :
Hi all,
I have a table acct as (username, terminatedate, terminatecause)
I would like to build a query which returns three columns orderd by data like:
date_trunc( 'day', terminatedate ) | count(cause1) | count(cause2)
where cause1/2 are two type of termination cause from the field
terminatecause.
14 matches
Mail list logo