> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Bob Pawley
> Sent: 22 juin 2007 14:15
> To: Postgresql
> Subject: [GENERAL] Establishing a primary key
>
>
> I have numerous entries in a column of table 1, some of which are
duplicated.
>
> I need to transfe
l);
select id_test, (case when c1 is null then 0 else 1 end)+(case when c2 is
null then 0 else 1 end)+(case when c3 is null then 0 else 1 end)+(case when
c4 is null then 0 else 1 end) as total from test;
id_test | total
-+---
1 | 2
2 | 3
|>
|> postgres error log:
|> ERROR: operator does not exist: text = integer
|> HINT: No operator matches the given name and argument type(s). You
|> might need to add explicit type casts.
|> STATEMENT: update T_MON_DEVICE_STATUS set device_ip = $1 :: inet
|> , status = $2 :: integer
|> I've tried multiple iterations of how to accomplish this and keep getting
stuck. With the one above, postgres yells and says:
|> ERROR: infinite recursion detected in rules for relation "visit"
|>
|> Any ideas?
Look at http://www.postgresql.org/docs/8.3/interactive/plpgsql-trigger.html
--
; Thanks!
Use string concatenation :
http://www.postgresql.org/docs/8.3/interactive/functions-string.html#FUNCTIO
NS-STRING-SQL
select firstname || ' ' || lastname as name, count(firstname || lastname)
from people
having count(firstname || lastname) > 1;
Regards,
C
o make changes to your subscription:
|> http://www.postgresql.org/mailpref/pgsql-general
|>
SELECT substring(addressline1 from '(^[^0-9]+)') from addresses
Cordialement,
Charles Simard
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
ind 'setof' but have no idea on how to use it
|>
|> Any suggestion everyone?
|>
|> Thank you,
|> Regards,
|> Hendra
I believe you are looking for this:
http://www.postgresql.org/docs/8.3/interactive/xfunc-sql.html#AEN40331
Good day,
Charles Simard
--
Sent via pg