|
View previous topic :: View next topic
|
| Author |
Message |
Ankur_bhargava
New User
Joined: 18 Jul 2011 Posts: 2 Location: India
|
|
|
|
Hi All,
I have 3 separate queries to update fields in 3 different tables.But my requirement is, i want to update all 3 tables simultaneouly by single query.I tried to join 3 tables with a common field on all,and tried to update the fields on all 3 tables ( Fields are different in all tables ) .But it's not working.Anyone please help me on this.  |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
Do NOT post "it didn't work". . . This is a completely wasted post as it tells us nothing
If the columns are different in all 3 tables, how might there be a join - makes no sense
Why is there an issue with multiple queries to update multiple sets of unrelated data? |
|
| Back to top |
|
 |
Ankur_bhargava
New User
Joined: 18 Jul 2011 Posts: 2 Location: India
|
|
|
|
Thanks for giving Reply,
But as per my thinking why to run 3 separate queries if possible to do the same work in single query.
I don't have any idea whether this is possible or not but just tried to get the best possible. ( can we use Temporary Table or Cursor to do the same ) |
|
| Back to top |
|
 |
Akatsukami
Global Moderator

Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
| Ankur_bhargava wrote: |
I don't have any idea whether this is possible or not but just tried to get the best possible. |
So now that you've been told that it is not possible you'll devote your energies to more productive endeavors, yes? |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
| Quote: |
| But as per my thinking why to run 3 separate queries if possible to do the same work in single query. |
Suggest you totally change your thinking. . .
There is no good reason to do unrelated "things" in the same query. . .
Actually, there are good reasons (which should be obvious) NOT to do unrelated things in a query. . . |
|
| Back to top |
|
 |
|
|