MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Update with Not Null
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
SureshKumar
Intermediate


Joined: 23 Jan 2003
Posts: 211
Topics: 21

PostPosted: Fri Jun 25, 2004 2:03 pm    Post subject: Reply with quote

vipilp,
I agree, there is a down side with using these functions, but its just a technique but I am not sure if its the right one for Sri. many different things need to be taken into consideration. If large amount of updates are going to be made this is a wrong way to do. Locks will be held for a long duration and can csuse issues. Cursor processing with commits will be recomended. We need to know where and how the tables are indexed, if its online or batch, certainly performance needs to analyzed. Thanks
Back to top
View user's profile Send private message
psridhar
Beginner


Joined: 16 May 2004
Posts: 68
Topics: 26

PostPosted: Sat Jun 26, 2004 4:08 am    Post subject: Reply with quote

Hi Kolusu,
I did not get what exactly you mean. Your question is

"How does the the order_no in T1 & T2 look like when you select in spufi?"

Can you eloborate more....?


One more thing is just I tried the following two spufis. One is giving result and another is SQL code 100.

Code:

SQL CODE 100
-----------------
SELECT T2.C2
  FROM T2
 WHERE T2.C2 = (SELECT T1.C2
                             FROM T1
                           WHERE CHAR(T1.C1) = T2.C1)  ;



Code:

GIVING RESULTS
--------------------
SELECT T2.C2
  FROM T1
          ,T2
 WHERE CHAR(T1.C1) = T2.C1  ;
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Jun 28, 2004 5:23 am    Post subject: Reply with quote

Psridhar,

Quote:

How does the the order_no in T1 & T2 look like when you select in spufi?"

Can you eloborate more....?


Since your column definitions are different, I wanted to see the exact values of both columns.

The order_no in T1 is defined as integer, you can use an insert statement as follows.

Code:

INSERT INTO T1 VALUES(1,'XXX');


The order_no in T2 is defined as char, you can use an insert statement as follows.

Code:

INSERT INTO T2 VALUES('1','   ');


Now if you want try to match the order_no from t1 & t2 , you will not find a match. The reason is that the value in T1 is stored as
Code:

0001


where as in T2 it is stored as
Code:

1bbb


where b is a space.


Hope this is clear

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group