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?


more ▼

asked Jul 14, 2011 at 12:01 AM in Default

avatar image

305 34 36 39

To understand the problem you need to post some structure and some sample queries.

Jul 14, 2011 at 01:51 AM Grant Fritchey ♦♦

As @Grant Fritchey says, post what you have so far and what your expected results should be!

Jul 14, 2011 at 06:17 AM sp_lock

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

Jul 14, 2011 at 07:19 AM Fatherjack ♦♦

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.

Jul 14, 2011 at 08:52 AM ThomasRushton ♦♦
(comments are locked)
10|1200 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Jul 14, 2011 at 12:01 AM

Seen: 1274 times

Last Updated: Jul 14, 2011 at 12:01 AM

Copyright 2018 Redgate Software. Privacy Policy