Author |
Message
|
cociu_2012 |
Posted: Fri Jan 06, 2012 5:43 am Post subject: dataUpdate node |
|
|
Acolyte
Joined: 06 Jan 2012 Posts: 72
|
Hello,
I am trying to use dateUpdate node, to update some rows into database. I have a complex key consisting of 2 keys.
The problem is that the node is ignoring the keys and there is no WHERE clause in UPDATEstatement. Obviously an exception is raised that a violation of primary key constraint has occurred.
Can I solve some how this problem?, or this node is useless. I know there are a lot of ways I can update a table, but I'm just curios if I should consider this specific node as a valid one.
Thanks.
Alex.
Last edited by cociu_2012 on Fri Jan 06, 2012 6:00 am; edited 1 time in total |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Jan 06, 2012 5:53 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
cociu_2012 |
Posted: Fri Jan 06, 2012 5:57 am Post subject: |
|
|
Acolyte
Joined: 06 Jan 2012 Posts: 72
|
lancelotlinc wrote: |
Hi Alex,
Use a Compute node instead. It works better.
Lance |
Hi Lance,
I appreciate your opinion. As I mentioned above, I have lot's of ways to update a table, including COMPUTE node. The question was different. |
|
Back to top |
|
 |
adrian_ |
Posted: Fri Jan 06, 2012 6:11 am Post subject: |
|
|
Novice
Joined: 06 Jan 2012 Posts: 13
|
hi , i am interested in this to.
The question is , can a dataUpdate make an update with where clause or not ? |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jan 06, 2012 6:13 am Post subject: Re: dataUpdate node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
cociu_2012 wrote: |
The problem is that the node is ignoring the keys and there is no WHERE clause in UPDATEstatement. Obviously an exception is raised that a violation of primary key constraint has occurred. |
Where are you seeing this? Is this in a user trace or your inference from the result?
If you're seeing WMB perform an unexpected update & you're on the latest version of WMB I'd suggest a PMR. _________________ Honesty is the best policy.
Insanity is the best defence.
Last edited by Vitor on Fri Jan 06, 2012 6:20 am; edited 1 time in total |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Jan 06, 2012 6:18 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
cociu_2012 wrote: |
lancelotlinc wrote: |
Hi Alex,
Use a Compute node instead. It works better.
Lance |
Hi Lance,
I appreciate your opinion. As I mentioned above, I have lot's of ways to update a table, including COMPUTE node. The question was different. |
The reason the Compute node works better is not because the Database DataUpdate node has no where clause. It is because the human doesn't trust the technology. Of course, the data Update node uses a WHERE clause. How else would it be able to function ?
Using a Compute node, you can actually see the DB statement, so the reason it works better, is because the human doesn't have to have faith in the unseen. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
cociu_2012 |
Posted: Fri Jan 06, 2012 6:20 am Post subject: Re: dataUpdate node |
|
|
Acolyte
Joined: 06 Jan 2012 Posts: 72
|
Vitor wrote: |
cociu_2012 wrote: |
The problem is that the node is ignoring the keys and there is no WHERE clause in UPDATEstatement. Obviously an exception is raised that a violation of primary key constraint has occurred. |
Where are you seeing this? Is this in a user trace or your inference from the result?
If you're seeing WMB generating an UPDATE statement with no WHERE clause & you're on the latest version of WMB I'd suggest a PMR. |
Yes, this is in user trace log, as well in odbc trace. I can try a PMR, but I am convinced that the response will be "try another node, this is a normal behavior". |
|
Back to top |
|
 |
cociu_2012 |
Posted: Fri Jan 06, 2012 6:22 am Post subject: |
|
|
Acolyte
Joined: 06 Jan 2012 Posts: 72
|
lancelotlinc wrote: |
cociu_2012 wrote: |
lancelotlinc wrote: |
Hi Alex,
Use a Compute node instead. It works better.
Lance |
Hi Lance,
I appreciate your opinion. As I mentioned above, I have lot's of ways to update a table, including COMPUTE node. The question was different. |
The reason the Compute node works better is not because the Database DataUpdate node has no where clause. It is because the human doesn't trust the technology. Of course, the data Update node uses a WHERE clause. How else would it be able to function ?
Using a Compute node, you can actually see the DB statement, so the reason it works better, is because the human doesn't have to have faith in the unseen. |
I am not discussing a Compute node in this topic, so forget about it. You don't have to explain why it works better. If you say dataUpdate has WHERE clause, can you please explain how can I use it? |
|
Back to top |
|
 |
adrian_ |
Posted: Fri Jan 06, 2012 6:22 am Post subject: |
|
|
Novice
Joined: 06 Jan 2012 Posts: 13
|
lancelotlinc wrote: |
cociu_2012 wrote: |
lancelotlinc wrote: |
Hi Alex,
Use a Compute node instead. It works better.
Lance |
Hi Lance,
I appreciate your opinion. As I mentioned above, I have lot's of ways to update a table, including COMPUTE node. The question was different. |
The reason the Compute node works better is not because the Database DataUpdate node has no where clause. It is because the human doesn't trust the technology. Of course, the data Update node uses a WHERE clause. How else would it be able to function ?
Using a Compute node, you can actually see the DB statement, so the reason it works better, is because the human doesn't have to have faith in the unseen. |
lance are you ever use a dataUpdate node in practice?
and u succeed to update only one row from a table (means where clause exist and work ) ?
i |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Jan 06, 2012 6:23 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
cociu_2012 wrote: |
lancelotlinc wrote: |
cociu_2012 wrote: |
lancelotlinc wrote: |
Hi Alex,
Use a Compute node instead. It works better.
Lance |
Hi Lance,
I appreciate your opinion. As I mentioned above, I have lot's of ways to update a table, including COMPUTE node. The question was different. |
The reason the Compute node works better is not because the Database DataUpdate node has no where clause. It is because the human doesn't trust the technology. Of course, the data Update node uses a WHERE clause. How else would it be able to function ?
Using a Compute node, you can actually see the DB statement, so the reason it works better, is because the human doesn't have to have faith in the unseen. |
I am not discussing a Compute node in this topic, so forget about it. You don't have to explain why it works better. If you say dataUpdate has WHERE clause, can you please explain how can I use it? |
I will, if you tell me when and where you attended the WM663 class. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jan 06, 2012 6:25 am Post subject: Re: dataUpdate node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
cociu_2012 wrote: |
I can try a PMR, but I am convinced that the response will be "try another node, this is a normal behavior". |
You're convinced the response will be "yes it's perfectly normal for the DataUpdate node not to update data correctly"? You think IBM put the node in the product as a kind of April Fool?
Or are you in fact my father in law, who refused for years to see a doctor because "they'll just tell me I'm getting old" & now gets very annoyed when people tell him how much better he's looking?
If it achieves nothing else, a PMR will:
- confirm your belief you need to use a different node
- enable you to post that here for the benefit of the wider community
- highlight a weakness in the node or it's supporting documentation (if this is an expected behaviour, it should be more clearly indicated)
At best a PMR will get you a fix.
It's not like they charge to raise a PMR. You have nothing to lose and everything to gain. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
cociu_2012 |
Posted: Fri Jan 06, 2012 6:28 am Post subject: |
|
|
Acolyte
Joined: 06 Jan 2012 Posts: 72
|
lancelotlinc wrote: |
I will, if you tell me when and where you attended the WM663 class. |
@lance - how will my answer help you to explain the dataUpdate node. I must agree with adrian_, you have no clue what's going on, so please, don't waste your time.
Thanks. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Jan 06, 2012 6:30 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
cociu_2012 wrote: |
lancelotlinc wrote: |
I will, if you tell me when and where you attended the WM663 class. |
@lance - how will my answer help you to explain the dataUpdate node. I must agree with adrian_, you have no clue what's going on, so please, don't waste your time.
Thanks. |
I'm not the one with the word "Noob" next to his name. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
adrian_ |
Posted: Fri Jan 06, 2012 6:32 am Post subject: |
|
|
Novice
Joined: 06 Jan 2012 Posts: 13
|
lancelotlinc wrote: |
cociu_2012 wrote: |
lancelotlinc wrote: |
I will, if you tell me when and where you attended the WM663 class. |
@lance - how will my answer help you to explain the dataUpdate node. I must agree with adrian_, you have no clue what's going on, so please, don't waste your time.
Thanks. |
I'm not the one with the word "Noob" next to his name. |
can you please answer what i ask .
have you ever used node dataUpdate in practice ? or you talk from what read or heard from other people ? |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jan 06, 2012 6:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
lancelotlinc wrote: |
I'm not the one with the word "Noob" next to his name. |
Ooo....you need to watch that. Remember that's just based on number of posts. There are 20 year Hursley veterans in here with very few posts to their name. And less experienced posters who have clocked up an impressive number of "pls guid me stp by stp" posts.
Assumptions can be dangerous. I'm just saying.
On topic, I'm sticking with my PMR advice. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|