473,327 Members | 2,118 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,327 software developers and data experts.

sql join update

232 100+
i have two tables and i want to fill first table data with second one in condition that if employee 1 is in more than one group that the one which contains its neighbor also will be considered
Emp1,emp2,emp3,gp1,gp2,gp3
e1,e2,e3
Gp,emp
g1,e1
g2,e1
g2,e2
g3,e2
g4,e3
net result
e1,e2,e3,g2,g2,g4
Oct 28 '13 #1
1 1066
Rabbit
12,516 Expert Mod 8TB
Your description doesn't make any sense. I have no idea how you got from your sample data to your results. I also don't understand how you structured your data.
Oct 28 '13 #2

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

Similar topics

2
by: serge | last post by:
/* This is a long post. You can paste the whole message in the SQL Query Analyzer. I have a scenario where there are records with values pointing to wrong records and I need to fix them using an...
2
by: Mike Leahy | last post by:
Hello all, This question is related to updating tables - is there any way to calculate or update the values in a column in a table to the values in a field produced by a query result? An...
6
by: ralph_noble | last post by:
Can someome please advise what the equivalent query would be in Microsoft SQL Server ... I've tried a number of combinations with no success ... Thanks, Ralph Noble (ralph_noble@hotmail.com) ...
7
by: Altemir | last post by:
I want to create an UPDATE statement that updates a value in a table in database A based on the results of an inner join between tables each residing in deifferent databases. What is the correct...
1
by: Ryandmcbee | last post by:
I am trying to write an update trigger that will send one field from one table (header) to update one field in another table (multiple rows though). Here is what I have so far, the syntax is...
2
by: Rick | last post by:
VS 2005 & Firebird DB 1.5 I have a query for Customer orders that has several inner joins to show things like Terms name (from termsnum) and Sales Rep name (from repnum) etc. I have written...
0
by: Michele | last post by:
Where is the error in this update with join update snx_comuni set sta_id = 2782 from snx_comuni inner join snx_province on snx_comuni.provincia_id = snx_province.provincia_id inner join...
3
by: Michel Esber | last post by:
Hi all, DB2 V8 LUW FP 15 There is a table T (ID varchar (24), ABC timestamp). ID is PK. Our application needs to frequently update T with a new value for ABC. update T set ABC=? where ID...
1
by: tksamy | last post by:
Dear Sir/Madam I want to use the output of update statement in the select statement. But I couldn't. My query is select Table1.*, x.seqno from Table1 cross join (UPDATE z_addin_counter
0
by: henry hawjjins | last post by:
Hi I have a problem with 3 InnoDB tables in MySQL linked with a foreign key, My tables are: Table1 name - products PID(PK(bigint, auto inc)), CATALOG_NO, PRODUCT_NAME, COMPOSITION, SIZE,...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.