|
Prev: Am I guaranteed that TRUNCATE TABLE always can be rolled back within a transaction?
Next: Trap when SELECT returns >1 row
From: Jay via SQLMonster.com on 18 Jul 2008 13:55 In the database I am working out of there is one table (treatment_events) that collect the ids from other tables that are linked throught the application users use to enter the data. I cannot manually join these tables through using joins because they do not have related keys. The table that I can link them to that is related to treatment_events is called treatments. This table may have many additional keys that are related to the main record but not linked to the data I need to extract. Can someone give mne ideas or direction on how I can get only the linked data? Thanks in advance. -- Jay Message posted via http://www.sqlmonster.com
From: Roy Harvey (SQL Server MVP) on 18 Jul 2008 14:34
I suspect that without more information you will not get much of a response. If you post the tables with their key and foreign key definitions - preferably as CREATE TABLE commands - along with sample data (preferably as INSERT commands) and an example of the results you want you may have a better chance of an answer. Roy Harvey Beacon Falls, CT On Fri, 18 Jul 2008 17:55:02 GMT, "Jay via SQLMonster.com" <u7124(a)uwe> wrote: >In the database I am working out of there is one table (treatment_events) >that collect the ids from other tables that are linked throught the >application users use to enter the data. I cannot manually join these tables >through using joins because they do not have related keys. The table that I >can link them to that is related to treatment_events is called treatments. >This table may have many additional keys that are related to the main record >but not linked to the data I need to extract. Can someone give mne ideas or >direction on how I can get only the linked data? > >Thanks in advance. |