[SQL] substr or char_length problem

2005-06-17 Thread Fatih Cerit
A2 --- 1 1957 2 197 3 19 4 5 NULL 6 1 7 195 Select * from tbl_xxx where tbl_xxx.A2=substr('196895588454554545454',0,char_length(tbl_xxx.A2)+1); Thanks Fatih Cerit ---

[SQL] plpgsql & date-time functions

2005-03-13 Thread Fatih Cerit
I have a function and I want to update a table's two rows but having problem with plpgsql & date-time functions. First field of the table must be now() this is ok.. but the second field must be now() + '60 days' if the query like this : SELECT INTO to_day now() + interval '60 days' ; it works bu

[SQL] interval +variable

2005-03-09 Thread Fatih Cerit
Dear all Is there anyone at there who knows howto use dateadd in pgsql. I have a problem in my function that is like this ; Select into futuredate now() + interval '30 days'; <- this is ok but how can I use a variable intead of '30 days':( Thanks ---(end of broadcas