Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
dmaxj
Posting Yak Master
174 Posts |
Posted - 2009-06-16 : 14:23:11
|
How can I access a related field in my query?Date is a related field in another table named Events. This is an ODBC connections to a Filemaker table. I am trying to avoid an export by querying the live database.My current query give the error 'Columne Not Found - Events::Date'Is it possible to access related fields in my query?RegardsSELECT DISTINCT patient_idFROM table01WHERE Events::Date >='1/1/2005'ORDER BY patient_id |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-06-16 : 14:25:20
|
where are you trying the above query? also how are table01 & Events related? |
|
|
dmaxj
Posting Yak Master
174 Posts |
Posted - 2009-06-16 : 14:40:40
|
I am trying this query in MS Visual Studio - Add New Report. The query is in one of my New Datasets.The tables are related by patient_id. patient_id is a primary key in Events table and patient_id is a foreign key in table01.Regards |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-06-16 : 14:47:37
|
then query should beSELECT DISTINCT t1.patient_idFROM table01 t1INNER JOIN Events eON e.patient_id=t1.patient_idWHERE e.Date >='1/1/2005'ORDER BY t1.patient_id |
|
|
|
|
|