> This seems like the answer must be pretty easy, but I can't think of it:
>
> In the following statement:
>
> select field1 from my_table where field2 in (3, 1, 2);
>
> How can I modify this statement so that the record are returned in the
> order of first those records having field2 = 3, then f
Did you execute the following after you created your database?
CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS
'/usr/local/pgsql/lib/plpgsql.so' LANGUAGE 'C';
CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql'
HANDLER plpgsql_call_handler
LANCOMPILER 'PL/pgSQL';
These are
This seems like the answer must be pretty easy, but I can't think of it:
In the following statement:
select field1 from my_table where field2 in (3, 1, 2);
How can I modify this statement so that the record are returned in the
order of first those records having field2 = 3, then field2 = 1, the
Tristan Colson wrote:
> This seems like the answer must be pretty easy, but I can't think of it:
>
> In the following statement:
>
> select field1 from my_table where field2 in (3, 1, 2);
>
> How can I modify this statement so that the record are returned in the
> order of first those records hav
This seems like the answer must be pretty easy, but I can't think of it:
In the following statement:
select field1 from my_table where field2 in (3, 1, 2);
How can I modify this statement so that the record are returned in the
order of having field2 = 3, then field2 = 1, then field2 = 2.
As it
Select now() + 7;
-Original Message-
From: john whale [SMTP:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 10:30 AM
To: '[EMAIL PROTECTED]'
Subject:DATE
PLEASE ADVISE HOW I SHOULD ALTER THE COMMAND:
<$NOW;DD;>
TO GIVE ME A DATE THAT IS X DAYS FORWARD
ie: I
hello,
i got this error when i tried to create a function
"unrecognized language specified in CREATE FUNCTION: 'plpgsql'" why is
that?
One other method is to setup up the foreign keys as ON DELETE RESTRICT,
then outside of your transaction block issue a DELETE FROM address WHERE
add_id = 1; If there are still records in the other tables referencing
this record, it will error out and nothing will happen, however if no
related rec
Jan,
Thanks for the reply, but your solution is rather unattractive to me. It
requires that, any time a reference to an address id is changed, five
tables be searched for the address id. This will create unwanted overhead
every time a change is made. In order to make those searches even
remote
Hi,
Our database has a SELECT problem using varchar columns in WHERE clause
(but not in all rows!!!).
We can fix the whole table (or just the row) as shown below but later it
seems wrong again (and after the fix the row isn't UPDATEd).
Idea?
Thanks
Attila
PLEASE ADVISE HOW I SHOULD ALTER THE COMMAND:
<$NOW;DD;>
TO GIVE ME A DATE THAT IS X DAYS FORWARD
ie: I WISH TO REPRESENT A DATE IN FORM WHICH IS A 7 DAYS FORWARD
OF THE DATE NOW.
REGARDS
JOHN WHALE
On Thu, 18 Jan 2001, Zolof wrote:
> This code doesn't work. I use Begin Work to start a transaction but BEGIN is
> a PL/pgSQL command so I have a parse error when executing it.
>
> CREATE FUNCTION a () RETURNS int4 AS '
> BEGIN
>BEGIN WORK;
>COMMIT WORK;
> return 1;
> END;
> '
Hi,
I tried to subscribe to pgsql-interfaces several times and received "user not
found". I also searched the pgsql-interfaces archives, without success. So
here is my problem.
I want to use pg 7.x as a backend for a MS Access application. I linked a
table via ODBC, using the newest ODBC driv
Here's a start:
select g.groname as group, g.grosysid as group_id, u.usename as user,
u.usesysid as user_id from pg_group g, pg_user u
where u.usesysid = g.grolist[1] or u.usesysid = g.grolist[2] or
u.usesysid = g.grolist[3] or u.usesysid = g.grolist[4] or u.usesysid =
g.grolist[5] or
hello,
how will i retrieve group names of a certain user? using sql.
richard
If I have a rule, is the rule inside a tranaction along with the table that
it references. For example, if I have a rule that deletes an entry from
table B, whenever an entry in table A gets deleted, then is the delete for
table A and table B wrapped inside the same transaction?
Same question I g
Can anyone suggest a more elegant way of finding foreign keys than
parsing the tgargs value returned by this query? I'd really rather do
pure SQL, sans string parsing, if possible.
-- Find tables and foreign keys
CREATE VI
Attila Kevei <[EMAIL PROTECTED]> writes:
> Our database has a SELECT problem using varchar columns in WHERE clause
> (but not in all rows!!!).
> We can fix the whole table (or just the row) as shown below but later it
> seems wrong again (and after the fix the row isn't UPDATEd).
Very bizarre.
Can't you skip the UNIONing and do this with something like
where (Z_A_nr is NULL
AND Z_umfang = '900' AND Z_blaenge = '2340' AND
Z_durch_soll IN ('286.1', '286.15', '286.20', ...)
AND Z_status = 'zcu'
AND (((Z_durch_soll+0.25)-Z_durch_ist) / 2) >= 0.085
AND (((Z_durch_soll+0.25)-Z_durch_ist) / 2
"Graham Vickrage" <[EMAIL PROTECTED]> writes:
> I have written this successfully but need to get the count in time
> increments such as per day/week/month.
Perhaps use GROUP BY date_part(...). See
stgresql.org/devel-corner/docs/postgres/functions-datetime.htm
for doco on date_part().
Attila Kevei writes:
> goodwill=>select * from users where user_login='test';
> user_id|user_login|user_passwd|user_exp
> ---+--+---+
> (0 rows)
>
> goodwill=> select * from users where user_id=4;
> user_id|user_login|user_passwd |user_exp
> ---+--+---
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 23, 2001 2:42 PM
Subject: [SQL] monster query, how to make it smaller
> Hello everybody
>
> I need some help on a monster query. Please see the attached file for the
> query itself. The only di
- Original Message -
From: "Attila Kevei" <[EMAIL PROTECTED]>
> goodwill=>\d users
> Table= users
>
+--+--+-
--+
> | Field | Type|
Length|
>
+--
Hi all:
has anyone heard of XQL?
XQL is xml sql
i just was catching up on
some email and noticed this nugget
http://www.ibiblio.org/xql/
anyways there is a xml::xql perl module so
perl could do it
but the ability to spit it right out of pg would be neato
Hello everybody
I need some help on a monster query. Please see the attached file for the
query itself. The only difference is Z_durch_soll and the offset, which is
currently 0.25. The query will run in a loop where I increment this offset
until I find enough records.
Thanks in advance ... jr
(
A space or something like that is also what I was thinking of.
I'd suggest to:
select * from users, length(user_login) where user_id=4;
before and after the update.
V.Paul
No, there's no space.
The query (point 4. below) after the fix (point 3.) is the _same_ as the first
(p.1.).
In the first select there's no result but in the last select we get the right
result.
Attila
Quoting [EMAIL PROTECTED]:
1.
> > goodwill=>select * from users where user_login='test';
> >
Attila Kevei wrote:
> Hi,
>
> Our database has a SELECT problem using varchar columns in WHERE clause
> (but not in all rows!!!).
> We can fix the whole table (or just the row) as shown below but later it
> seems wrong again (and after the fix the row isn't UPDATEd).
>
> Any idea?
>
> Thanks
>
Hi,
Our database has a SELECT problem using varchar columns in WHERE clause
(but not in all rows!!!).
We can fix the whole table (or just the row) as shown below but later it
seems wrong again (and after the fix the row isn't UPDATEd).
Any idea?
Thanks
Attila
I am trying to write a select statement to count the occurences of a
particular string between a set of dates.
I have written this successfully but need to get the count in time
increments such as per day/week/month.
At the moment I am doing a select for each increment seperately but figure
that
Hai,
Anyone has used postgresql.largeobject package in your java program? If
yes please help me
1. In getting the package
2. Use the package
Thanks
--
Ramesh HR
Trainee Engineer
EASi Technologies
213, 3rd Main, 4th Cross
Chamrajpet, Bangalore - 560 018
India
Ph.: 660 1086 / 660 2365 / 667 2984
31 matches
Mail list logo