nikhilboorla Posted November 23, 2016 Report Posted November 23, 2016 I have 2 tables called X and Y and both tables have common field called BASELINE .When i update in X table, it replaces only the records where BASELINE != “RESOURCES” When i update in Y table, it replaces records where BASELINE=”RESOURCES”(X table has different records other than "RESOURCES" but Y has only "RESOURCES" throughout the table ) => How should we update each of these files when i get new data from client? Please help me to solve this issue. Quote
JollyBoy Posted November 23, 2016 Report Posted November 23, 2016 r u tryin to join tables or independent updates Quote
nikhilboorla Posted November 23, 2016 Author Report Posted November 23, 2016 i am doing independent updates Quote
JollyBoy Posted November 23, 2016 Report Posted November 23, 2016 too basic adugutnav man.. u shud google it before update X set update_field = update_value where BASELINE!=”RESOURCES” update Y set update_field = update_value where BASELINE=”RESOURCES” Quote
nikhilboorla Posted November 23, 2016 Author Report Posted November 23, 2016 i need query to update all records where it matches condition BASELINE =”RESOURCES” in X table because it is updating records where BASELINE = other fields EXCEPT RESOURCES Quote
argadorn Posted November 23, 2016 Report Posted November 23, 2016 Update x,y set column = where condition Quote
kiran karthik Posted November 23, 2016 Report Posted November 23, 2016 1 hour ago, nikhilboorla said: I have 2 tables called X and Y and both tables have common field called BASELINE .When i update in X table, it replaces only the records where BASELINE != “RESOURCES” When i update in Y table, it replaces records where BASELINE=”RESOURCES”(X table has different records other than "RESOURCES" but Y has only "RESOURCES" throughout the table ) => How should we update each of these files when i get new data from client? Please help me to solve this issue. then y where clause for Y table? Quote
loveindia Posted November 23, 2016 Report Posted November 23, 2016 1 hour ago, argadorn said: Update x,y set column = where condition 2 tables update in one condition aaa man... Kata Kata kata... Quote
loveindia Posted November 23, 2016 Report Posted November 23, 2016 Provide basic data at least and ask what you want man. Quote
SwamyRaRa Posted November 23, 2016 Report Posted November 23, 2016 3 minutes ago, loveindia said: Provide basic data at least and ask what you want man. Gp Quote
sarkaar Posted November 23, 2016 Report Posted November 23, 2016 2 hours ago, nikhilboorla said: I have 2 tables called X and Y and both tables have common field called BASELINE .When i update in X table, it replaces only the records where BASELINE != “RESOURCES” When i update in Y table, it replaces records where BASELINE=”RESOURCES”(X table has different records other than "RESOURCES" but Y has only "RESOURCES" throughout the table ) => How should we update each of these files when i get new data from client? Please help me to solve this issue. Assalu nuvvu adige question neeku ayina ardam ayindha? update table X set column=' ' where baseline not in ('RESOURCES'); update table Y set column='' where baseline in ('RESOURCES'); How should we update each of these files when i get new data from client? - what do you mean by new data? Do not post the questions from your work as is in this forum. First understand what exactly you need and then ask for help. Quote
argadorn Posted November 23, 2016 Report Posted November 23, 2016 30 minutes ago, loveindia said: 2 tables update in one condition aaa man... Kata Kata kata... nenu cheppana two tables update ani ...syntax motham chepala enti..basic syntax ccheppanu...table X AND Y separate ga update cheyyi ani chepthuna Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.