Jump to content

SQL query


Recommended Posts

Posted

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.

Posted

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”

Posted

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

Posted
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?

Posted
1 hour ago, argadorn said:

Update x,y

set column =

where condition 

2 tables update in one condition aaa man... Kata Kata kata...

Posted
3 minutes ago, loveindia said:

Provide basic data at least and ask what you want man.

Gp

Posted
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.

Posted
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 

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...