question

LtDan avatar image
LtDan asked

Join two secondary tables to one other on the same key field

Million dollar question - Why can't I update my data? When my query has only two joined tables it can be updated. But I need to add a third table, when I do it locks. Both secondary tables are joined to the primary key of the main table. Is that the problem?? If so, I cannot create a second primary key (or candidate key) because both table need to like to the primary auto-generated key field. Could someone please help me add a third table. Should be noted that these tables are liked to SQL tables and the joins are already created in SQL. They work fine separately but not in one query. What information can I give to help clarify? Thanks
sql-server-2008joins
4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

To understand the problem you need to post some structure and some sample queries.
6 Likes 6 ·
As @Grant Fritchey says, post what you have so far and what your expected results should be!
0 Likes 0 ·
Does the query work if you use TSQL from SSMS? If that works then the issue is possibly something to do with using linked tables from Access
0 Likes 0 ·
It could be to do with column names - do you have the same column names in any of your tables? If so, are you properly referencing them in the update statement? As @Grant says, though, in order to really help, we need to know your table structures and your attempts to date at getting this to work.
0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.