473,396 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Reg: SQL Query..

111 100+
hii...

i have 3 tables...
table 1, table 2 and table 3

now in table 1 i have st_code and st_sponsored_by fields..
st_sponsored_by is empty..

in table 2 i have sponsor_group_id_pk and sponsor_group_name

in table 3 i have st_sponsor_group_id_fk and sp_st_code


Now my requirement is such that...
I want the table 1. st_sponsored_by to be updated with the sponsor_group_name from table 2, where the table 1's st_code is same as sp_st_code in table 3
and table2.sponsor_id_pk = table3.sp_st_code


i want the update query for updating st_sponsored_by in table 1..

plz help...
thnx..
hepsi.
Sep 25 '07 #1
2 1081
Shashi Sadasivan
1,435 Expert 1GB
hii...

i have 3 tables...
table 1, table 2 and table 3

now in table 1 i have st_code and st_sponsored_by fields..
st_sponsored_by is empty..

in table 2 i have sponsor_group_id_pk and sponsor_group_name

in table 3 i have st_sponsor_group_id_fk and sp_st_code


Now my requirement is such that...
I want the table 1. st_sponsored_by to be updated with the sponsor_group_name from table 2, where the table 1's st_code is same as sp_st_code in table 3
and table2.sponsor_id_pk = table3.sp_st_code


i want the update query for updating st_sponsored_by in table 1..

plz help...
thnx..
hepsi.
Expand|Select|Wrap|Line Numbers
  1. update table1
  2. set table1.st_sponsored_by = table2.sponsor_group_name
  3. from table2, table3
  4. where table1.st_code = table3.sp_st_code
  5. and table2.sponsor_id_pk = table3.sp_st_code
cheers
Sep 25 '07 #2
rhepsi
111 100+
Expand|Select|Wrap|Line Numbers
  1. update table1
  2. set table1.st_sponsored_by = table2.sponsor_group_name
  3. from table2, table3
  4. where table1.st_code = table3.sp_st_code
  5. and table2.sponsor_id_pk = table3.sp_st_code
cheers

THNX.. so muxh.. it worked
Sep 25 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Mark J. McGinty | last post by:
Greets, One site I've written allows the user to install an IE extension menu (not malware at all) by downloading/merging a short .REG file. Worked like a peach on Win2K Server, now that I...
5
by: Henok Girma | last post by:
Hello Gurus, I wanted to have a very simple, strict regular expression validator for a phone field. the only valid format is (XXX) XXX-XXXX where X is a digit I have the following but it always...
1
by: worzel | last post by:
Hi All, I am looking for a reg ex that will match email addresses withing <a href=mailto blah > links. Actually, I already crafted my own, but with a slight problem: <a...
1
by: dixie | last post by:
I have a .reg file that I need to run across a network. Currently, we run it for each logon on the network manually, which is not really working well as there are over a hundred users and they...
7
by: DraguVaso | last post by:
Hi, Does anybody knows how to run a *.reg-file silently on a computer? I need this to do automatic updates of my application without user-interaction. So I don't want the user to be asked a...
1
by: Anurag | last post by:
Hi, I have 2 related questions. DB2 UDB ESE v8.x (8.1 till 8.2 FP2 - all fixpaks included) on AIX 5.4.x _____________________________________________________________________________ (QUESTION 1)...
2
by: Kun | last post by:
I have an html form that takes dates and inserts them into a mysql file. Currently, users have to type in dates in the yyyy-mm-dd format. As of now, this process works with the sql. However, I...
1
by: black_13 | last post by:
are there any python modules for manipulation of .reg files producted by the win32 prog "reg". thanks. black_13
6
by: LeWalrus | last post by:
Hi, I've written a reg exp for capturing a group of numbers from text files in the following format: -1.4326 s < 0.6758 s < 1.4334 s Any of the numbers can be positive or negative and the units...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.