exists data condition [message #622095] |
Thu, 21 August 2014 01:39 |
|
mist598
Messages: 1195 Registered: February 2013 Location: Hyderabad
|
Senior Member |
|
|
Hi all,
Go to xxc_temp and see if you have data with the number
then go to xxc_transaction and see if the data from xxc_temp is already present.
But if i have data in the both tables it shows me exists, but i don't need this.How to resolve this issue?
thanks
|
|
|
|
Re: exists data condition [message #622104 is a reply to message #622098] |
Thu, 21 August 2014 02:21 |
|
mist598
Messages: 1195 Registered: February 2013 Location: Hyderabad
|
Senior Member |
|
|
Hi Littlefoot,
I am getting confusing, how to write condition for below statement?
xxc_transaction and see if the data from xxc_temp is already present.
And if i write Exists condition it shows me already moved data in the xxc_transaction table, that means it struck in the xxc_temp table
[Updated on: Thu, 21 August 2014 02:23] Report message to a moderator
|
|
|
|
Re: exists data condition [message #622113 is a reply to message #622095] |
Thu, 21 August 2014 03:25 |
pablolee
Messages: 2882 Registered: May 2007 Location: Scotland
|
Senior Member |
|
|
mist598 wrote on Thu, 21 August 2014 07:39Hi all,
Go to xxc_temp and see if you have data with the number
then go to xxc_transaction and see if the data from xxc_temp is already present.
But if i have data in the both tables it shows me exists, but i don't need this.How to resolve this issue?
thanks
If the above is a set of requirement that you have been given (and you have supplied a faithful reproduction of those requirements), then they are malformed. The are grammatically incorrect. They appear to be missing salient information and they contain no contesxt. I would personally push back and tell whoever supplied those 'requirements' to make them much clearer.
|
|
|
|
|
|
|
|
Re: exists data condition [message #622126 is a reply to message #622116] |
Thu, 21 August 2014 05:11 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
mist598 wrote on Thu, 21 August 2014 14:04
I need the know the data moved FROM xxc_temp TO xxc_transactions AND EXISTS IN the xxc_temp table which are today DATE
Isn't it a simple join between the two tables?
select temp.<column_list>
from xxc_temp temp , xxc_transactions tran
where temp.<column> = tran.<column>
and <more joins>
and temp.<date_column> = sysdate;
|
|
|
|
Re: exists data condition [message #622132 is a reply to message #622128] |
Thu, 21 August 2014 05:28 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
What is with "EXISTS" that makes you so stubborn to use it? I see it as a simple logic. to see the data common in both tables, use simple join. If you want to include the unmatched data, use outer join. If you just want to see the difference, use set operator minus.
So, unless you post something technical and relevant, which is called a test case here, it is impossible to keep guessing based on your explanation in words.
|
|
|
|
|
|
|
Re: exists data condition [message #622210 is a reply to message #622196] |
Fri, 22 August 2014 09:23 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
joy_division wrote on Fri, 22 August 2014 18:49mist598 wrote on Thu, 21 August 2014 06:35
AND number = '1234'
The above code is also impossible the way you used it as it is a reserved word.
Even the date column name doesn't comply with standards.
|
|
|