Re: [SQL] query configuration for validate empty quote to zero

2005-01-17 Thread Yudie
The problem is not stop there, I had a table that can't be updated since then with this simply command: update prdttable set webinclude = '0' where prdtnumber = '6002' Again, the errors (invalid input syntax for integer: "") apears. Then I found this temporary solution to make replica to this rec

[SQL] query configuration for validate empty quote to zero

2005-01-17 Thread Yudie
e the same query it return an error: invalid input syntax for integer: ""   Anyone know what's the problem??   Thanks   Yudie    

[SQL] plpgsql.. SELECT INTO ... WHERE FIELD LIKE

2004-12-16 Thread Yudie
How in plpgsql use LIKE with a variable?   let say I want to do this query:   SELECT INTO RS id FROM customer WHERE firstname LIKE keyword% LIMIT 1;   keyword is a variable, in this case I want to find name like 'Jo%'     Full functio

[SQL] Found Large Files.. what objects are they?

2004-12-01 Thread Yudie
ated? How to find a table by oid?   Thanks   Yudie  

Re: [SQL] How to re-sort a sorted query?

2004-10-27 Thread Yudie
> select * from > (select distinct on (storenumber), itemsku, storenumber,price >from storeproduct where itemsku='10001' >order by storenumber, price) ss > order by price; > > regards, tom lane Thanks tom, this is working. I never thought it

Re: [SQL] How to re-sort a sorted query?

2004-10-26 Thread Yudie
er , Price, Condition == 10001 , 7 , 30.00, Used 10001 , 7 , 35.00, New <-- duplicate store number 10001 , 5 , 45.00, New 10001 , 2 , 50.00, New However, should I use temporary table to make it simple? what about the performance? Yudie - Original Message -

[SQL] How to re-sort a sorted query?

2004-10-26 Thread Yudie
t #1: ItemSku , StoreNumber , Price 10001 , 2 , 50.00 10001 , 5 , 45.00 10001 , 7 , 30.00   The question is how to make the query that returns as above but sorted by price?     Thanks.. Yudie    

Re: [SQL] isnumeric() function?

2004-04-30 Thread Yudie
Great the function works, but what does it means? SELECT $1 ~ ''^[0-9]+$'' Yudie - Original Message - From: "Jeff Eckermann" <[EMAIL PROTECTED]> To: "Yudie" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, Apri

[SQL] isnumeric() function?

2004-04-29 Thread Yudie
What is isnumeric function in postgresql? I'm using psql version 7.2.2 thanks Yudie ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

[SQL] run application from trigger?

2004-04-16 Thread Yudie
Hi guys, I would like to create a trigger that execute some applications, is there a way to create a plpgsql function that execute shell command or any other way to run an application? Thanks for your help. Yudie ---(end of broadcast)--- TIP 8

Re: [SQL] Update is very slow on a bigger table

2004-04-16 Thread Yudie
Hi guys, I would like to create a trigger that execute some programs, is there a way to create a plpgsql function that execute shell command or any other way to run a program? Thanks for your help. Yudie ---(end of broadcast)--- TIP 2: you can

Re: [SQL] Help refining/eliminating recursive selects

2004-02-19 Thread Yudie
What about something like this: select * from test order by tx_date desc limit 1 Yudie - Original Message - From: "Edmund Bacon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 19, 2004 5:09 PM Subject: [SQL] Help refining/eliminating recur

Re: [SQL] cast varchar to numeric/money

2003-11-21 Thread Yudie
I don't have to_numeric function in my 7.2.2 postgre. then it can resolve it with: cast(substr(varcharcolumn,0) as float4) thanks. - Original Message - From: "Bruno Wolff III" <[EMAIL PROTECTED]> To: "Yudie" <[EMAIL PROTECTED]> Cc: <[EMAIL PRO

[SQL] cast varchar to numeric/money

2003-11-21 Thread Yudie
Hi guys, I know it's impossible to just cast varchar to any numeric datatype, but is there another function/ custom function or any way to force to do that convertion. please help Thanks.. Yudie ---(end of broadcast)--- TIP 9: the planner

[SQL] Changing data type must recreate all views?

2003-08-14 Thread Yudie
? Thanks, yudie ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

[SQL] how to copy table to another database?

2003-07-18 Thread Yudie
Hi,Anyone know how the procedure or commands to copy table to another database.or querying from another database if possible?thank youyudie

[SQL] trigger error

2003-06-10 Thread Yudie
CTION TRIGGER_UPDATE_AXPRDT_STATUS()RETURNS OPAQUEAS 'BEGIN  IF NEW. THEN    NEW.STATUS = ''D'';  END IF;  RETURN NEW;END;'LANGUAGE 'plpgsql';   CREATE TRIGGER TRIGGER_AXPRDT_FUTURESTATUSBEFORE UPDATE ON AXPRDTFOR EACH ROWEXECUTE PROCEDURE TRIGGER_UPDATE_AXPRDT_STATUS();     Please Help..   Yudie

Re: [SQL] Format Function

2003-02-17 Thread Yudie
IF; i := i - 1; END LOOP; return strtemp; END ' language 'PLPGSQL' ----- Original Message - From: "Josh Berkus" <[EMAIL PROTECTED]> To: "Yudie" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, February 17, 2003 2:56 PM Subject: R