[SQL] postgresql.largeobject package

2001-01-23 Thread Ramesh H R
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

[SQL] grouping by date increments

2001-01-23 Thread Graham Vickrage
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

[SQL] select returns no line

2001-01-23 Thread Attila Kevei
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

Re: [SQL] select returns no line

2001-01-23 Thread patrick . jacquot
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

Re: [SQL] select returns no line

2001-01-23 Thread Attila Kevei
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';

Re: [SQL] select returns no line

2001-01-23 Thread Volker Paul
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

[SQL] monster query, how to make it smaller

2001-01-23 Thread juerg . rietmann
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

[SQL] [notion]: a possible language addition: XQL

2001-01-23 Thread clayton cottingham
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

Re: [SQL] select returns no line

2001-01-23 Thread Richard Huxton
- Original Message - From: "Attila Kevei" [EMAIL PROTECTED] goodwill=\d users Table= users +--+--+- --+ | Field | Type| Length|

Re: [SQL] monster query, how to make it smaller

2001-01-23 Thread Richard Huxton
- 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

Re: [SQL] select returns no line

2001-01-23 Thread Peter Eisentraut
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

Re: [SQL] grouping by date increments

2001-01-23 Thread Tom Lane
"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().

Re: [SQL] monster query, how to make it smaller

2001-01-23 Thread Tom Lane
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) /

Re: [SQL] select returns no line

2001-01-23 Thread Tom Lane
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. Is

[SQL] finding foreign keys

2001-01-23 Thread Ron Peterson
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

[SQL] Rules and transactions

2001-01-23 Thread Brett Schwarz
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

[SQL] DATE

2001-01-23 Thread john whale
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

Re: [SQL] unreferenced primary keys: garbage collection

2001-01-23 Thread Forest Wilkinson
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

[SQL] plpgsql language

2001-01-23 Thread chard
hello, i got this error when i tried to create a function "unrecognized language specified in CREATE FUNCTION: 'plpgsql'" why is that?

[SQL] RE: DATE

2001-01-23 Thread Michael Davis
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

[SQL] Order By Question

2001-01-23 Thread Tristan Colson
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,

[SQL] RE: plpgsql language

2001-01-23 Thread Michael Davis
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

[SQL] Re: [INTERFACES] pl/pgSQL transaction

2001-01-23 Thread Cedar Cox
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; ' LANGUAGE

Re: [SQL] Order By Question

2001-01-23 Thread Prasanth Kumar
snip 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