Search found 8 matches

by bolastuff1975
Fri Oct 26, 2007 5:06 pm
Forum: DB2 SQL - DB2 PROGRAMMING
Topic: CAST function
Replies: 2
Views: 14434

CAST Function - done thanks

Hi Dave,

thanks very much for the reply. yes, it is working fine and also the below format is doing fine.

SUBSTR(ORE_RECORD_DATA,1390,5) = X'000005000C'

Thanks
Bola
by bolastuff1975
Tue Oct 23, 2007 9:14 pm
Forum: DB2 SQL - DB2 PROGRAMMING
Topic: CAST function
Replies: 2
Views: 14434

CAST function

Hi, I have a table with one of the varaibles declared as VARCHAR(4000). at position 50 for that variable, i have a packed value of s9(9) comp-3 i need to query this table to pick records that have a value of 5000 @ 5. Sample data in hex format 0004400000 00C000050C when i use the cast funciton to ju...
by bolastuff1975
Thu Oct 04, 2007 1:49 pm
Forum: DB2 SQL - DB2 PROGRAMMING
Topic: query on sql
Replies: 4
Views: 11175

Hi Dave,

Thanks for the SQL.

Yes,it is running correctly on a sample but when i try to run with about 200000 records it bumps up that the datetime value is not correct.

I am not 100% sure of this bit is causing the problem or its due to some other case statements.

Thanks
by bolastuff1975
Thu Sep 27, 2007 11:20 pm
Forum: DB2 SQL - DB2 PROGRAMMING
Topic: Query on SQL
Replies: 6
Views: 15255

Further, to the given query. i am intrested in findign the records that have timestamp < ts3.
Assuming t5>t4>t31>t3>t2>t1.
i odnt want to update 103, 104 of KEY1.
by bolastuff1975
Wed Sep 26, 2007 6:21 pm
Forum: DB2 SQL - DB2 PROGRAMMING
Topic: Query on SQL
Replies: 6
Views: 15255

Dave & Veera,

Thanks, very much for u r help. It was not a problem with u r query. it was due to the data in the table.

Cheers
by bolastuff1975
Mon Sep 24, 2007 7:27 pm
Forum: DB2 SQL - DB2 PROGRAMMING
Topic: Query on SQL
Replies: 6
Views: 15255

Dave,
when i try it here, i get a message taht the inner query is listing more than 1 row.

I beleive 'where exists' condition checks if KEY2 is satisfying our update criteria and results more than 1 key1 but I need to pick single row(KEY1) for updates.

Thanks
by bolastuff1975
Mon Sep 24, 2007 7:23 pm
Forum: DB2 SQL - DB2 PROGRAMMING
Topic: query on sql
Replies: 4
Views: 11175

query on sql

hi,

i have a char variable with length 6 bytes that contains time in the below format

1014AM
1014PM
..
..

i need to convert into the below foramt
10:14:00 if AM
20:14:00 if PM

Please, let me know if I can use any funtion here. i tried with SUM(INTEGER(SUBSTR(......) but not working.

Thanks
by bolastuff1975
Sat Sep 22, 2007 12:04 am
Forum: DB2 SQL - DB2 PROGRAMMING
Topic: Query on SQL
Replies: 6
Views: 15255

Query on SQL

bolastuff1975@yahoo.co.uk Hi Please, help me out in solving this issue. i need to update field2 & field3 of table-1 when there are more than 2 rows with same key-2 and field1. field2 & field3 are picked from table2 based on key-1 and max time stamp for t1. Table structre and data is shown below. i h...