Correct me if I am wrong, but isn't COALESCE standard in this way?
Best Wishes,
Chris Travers
Metatron Technology Consulting
Michael Glaesemann wrote:
[Please do not email me directly. Please post to the list so others
may help and benefit from the discussion.]
On Oct 19, 2005, at 14:30 , V
Ya, I didn't test it.
The error message was expecting an integer not an
array, so coverting it to a list crossed my mind
'assuming' the subselect 'could' return a string of
integers for the IN clause.
Oh well. I'm glad there's people like you test it.
--- Michael Fuhr <[EMAIL PROTECTED]> wrote:
Judith Altamirano Figueroa wrote:
Excuse me, how can I send a query to a file?, for example the result of
this query:
select id_articulo, articulo, color_code from articulos;
if you mean psql
\o filename
and try to read output of a command \?
---(end of broadcast)---
[Please do not email me directly. Please post to the list so others
may help and benefit from the discussion.]
On Oct 19, 2005, at 14:30 , Vikas J wrote:
IsNull in sql server has syntax like isnull(column,substitute)
if "column" is null it shows value of "substitute". That can be
achieved
On Tue, Oct 18, 2005 at 08:09:48PM -0700, Matthew Peter wrote:
> Not sure if you got this figured out but I think
>
> SELECT * from tb_cat WHERE id IN (SELECT
> array_to_string(cat,',') as cat FROM tb_array WHERE
> id=1);
>
> is what your looking for?
I doubt it, considering that it doesn't work
Not sure if you got this figured out but I think
SELECT * from tb_cat WHERE id IN (SELECT
array_to_string(cat,',') as cat FROM tb_array WHERE
id=1);
is what your looking for?
--- paperinik 100 <[EMAIL PROTECTED]> wrote:
> PostgreSQL is 7.4.7.
>
> My first table
> CREATE TABLE tb_cat (
> id I
On Thu, 2005-10-13 at 10:31, Shavonne Marietta Wijesinghe wrote:
> how can i do a query with 2 databases??
This is only supported by an add on called dblink, and it's a little bit
klunky.
Could schemas solve your problem?
---(end of broadcast)---
T
On Tue, Oct 11, 2005 at 12:50:49PM +0530, Vikas J wrote:
> I want to know substitute function for sql server ISNULL() function in postgre
If you look in the index of the PostgreSQL documentation you'll
find an entry for ISNULL:
http://www.postgresql.org/docs/8.0/interactive/bookindex.html
If Pos
On Oct 19, 2005, at 8:03 , Judith Altamirano Figueroa wrote:
Excuse me, how can I send a query to a file?, for example the
result of
this query:
select id_articulo, articulo, color_code from articulos;
You don't mention what client you're using. In psql, you can use
\o path/to/file.txt
F
On Tue, Oct 18, 2005 at 06:03:59PM -0500, Judith Altamirano Figueroa wrote:
> Excuse me, how can I send a query to a file?, for example the result of
> this query:
>
> select id_articulo, articulo, color_code from articulos;
If you have a shell on a platform that supports input/output
redirection
Excuse me, how can I send a query to a file?, for example the result of
this query:
select id_articulo, articulo, color_code from articulos;
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
choos
On Tue, Oct 18, 2005 at 03:38:54PM -0400, Lane Van Ingen wrote:
> select EXTRACT(EPOCH from TIMESTAMP current_timestamp) - EXTRACT(EPOCH from
> TIMESTAMP updated_time) ::integer
>
> ERROR: syntax error at or near "current_timestamp" at character 37
What are you intending "TIMESTAMP" to do? If y
[It's PostgreSQL, Postgres, or pgsql. It's never "postgre"]
On Oct 11, 2005, at 16:20 , Vikas J wrote:
Hi
I want to know substitute function for sql server ISNULL() function
in postgre
I'm not quite sure what the ISNULL() function does in SQL Server, but
it sounds like it might be similar
On Oct 13, 2005, at 21:50 , [EMAIL PROTECTED] wrote:
Dear all,
I have a table created with this specifications:
CREATE TABLE cdr (
calldate timestamp with time zone NOT NULL default now(),
clid varchar(80) NOT NULL default '',
src varchar(80) NOT NULL default '',
dst varchar(80) NOT N
Sri,
> I have a small problem in using nested transactions while
> working on Postgres 8.0.
This is a known problem with Postgres 8.0 - there is no support for
nested transactions (which occurs when calling functions). Your best bet
would be to raise an exception within B or C - this will cause
List,
I'm using the OFFSET / LIMIT combo in order to split up my query, so it
only parses 20 rows at a time (for my php-scripted webpage).
I'm using two queries; the first basically doing a select count(*) from
[bla bla]; the second grabbing the actual data while setting LIMIT and
OFFSET.
In a
Hi All,
We are having an opening for SQL-DBS for my CMM Level 5 Client in
Chennai
Skills : SQL-DBS
Exp : 1+yrs
Location : Chennai
Kindly send us your updated resume [EMAIL PROTECTED]
farzana@(at)shubhaminfo.(dot)com
In case you are interested, kindly send us the
following i
Hi
I want to know substitute function for sql server
ISNULL() function in postgre
Regards,Vikas Jadhav Codec
Communication Pvt. Ltd.Swargate, Pune.Ph: 020-2422 1460/70 (Ext
37)Email: [EMAIL PROTECTED]
Andrew Hammond <[EMAIL PROTECTED]> wrote:
> So I need an end result that has entries for all days, even when
> there's nothing happening on those days, generate from a timestamped
> event table. I've already got the interesting entries. Now I need to
> fill the holes.
>
> To do this, I'm thinking
Dear all,
I have a table created with this specifications:
CREATE TABLE cdr (
calldate timestamp with time zone NOT NULL default now(),
clid varchar(80) NOT NULL default '',
src varchar(80) NOT NULL default '',
dst varchar(80) NOT NULL default '',
dcontext varchar(80) NOT NULL default '
I believe int8(n.udf4) will do the trick for you.
- Original Message -
From: "Judith Altamirano Figueroa" <[EMAIL PROTECTED]>
To:
Sent: Friday, October 14, 2005 12:08 PM
Subject: [SQL] cast
> Hello I have a query that ran in 7.0.2, but in 8.0.1 does not, the query
> is the next:
>
>
how
can i do a query with 2 databases??
PostgreSQL is 7.4.7.
My first table
CREATE TABLE tb_cat (
id INTEGER,
desc text
);
INSERT INTO tb_cat VALUES (10, 'cat10');
INSERT INTO tb_cat VALUES (20, 'cat20');
INSERT INTO tb_cat VALUES (30, 'cat30');
My second table
CREATE TABLE tb_array(
id INTEGER,
cat INTEGER[]
);
INSERT INTO tb_array V
Hi All,
I have a small problem in using nested
transactions while working on Postgres 8.0.
Ex: I have a function A() which in turn
calls functions b() and c() , if i want commit something in b or c. i have to
use
start transaction read write;
-- set of sql statements and then say
com
I have been trying to subtract two timestamps from each other to determine
the difference between the two timestamps (current time and a past timestamp
called 'updated_time') IN SECONDS, but no luck.
The trouble I am having is getting the first timestamp, representing the
current time, to translat
Ignore my request. The solution is:
---
computeIfUptime() -
select (EXTRACT(EPOCH from TIMESTAMP 'now') - EXTRACT(EPOCH from TIMESTAMP
'2005-10-18 17:00:00'))::integer
-Original Message-
From: Lane Van Ingen [mailto:[EMAIL P
On Tue, 2005-10-18 at 14:26 +, Adriana Marcela Aguirre wrote:
> Hola a todos!!...
Hi! :) That's a known postges 'problem', one which, I guess, every
pg-newbie encounters, especialy if he/she came from other RDBMSes. (I
personaly came from MSSQL).
> CREATE OR REPLACE FUNCTION "public"."f_test
Hola a todos!!...
El día 22-07-2004 Gerardo Castillo escribió lo siguiente:
/
Hello,
I'm using PostgreSQL 7.4
I have a function wich use temporary tables. I read about temporary tables and they exists during the session.
But i have to call this f
28 matches
Mail list logo