Re: [SQL] day difference

2001-06-29 Thread Christopher Sawtell
Jackie Siu wrote: > > Hi, > > Is there exist a function to calculate day difference between two date. For > example: select functionx('1JAN2001','5FEB2001') from abc where Then it > returns 36 (days). Thanks for your help. chris=# select ('5feb2001'::date - '1jan2001'::date) as "Days Diffe

[SQL] creating variable views

2001-06-29 Thread Dado Feigenblatt
Hi. New to the list. I'm building a database that will hold data for many different projects. Some people, or groups of people, will have access to just the rows of data of their projects. Some are very granular. Let's use for this example the data about the people itself. Other than the administ

Re: [SQL] NOTIFY "string" from rule

2001-06-29 Thread Tom Lane
"Jeff Boes" <[EMAIL PROTECTED]> writes: > CREATE FUNCTION bar(foo) RETURNS TEXT AS > 'SELECT $1.status || ''_'' || $1.name;' > LANGUAGE 'sql'; > and then change the last line of the rule to > NOTIFY bar(new); > but no luck. AFAIK the only way to do NOTIFY with a computed name is to write a functi