Schalk Neethling wrote:
Mathias/Everyone on the list
I am running the following query against the database:
SELECT demographic.demographic_no, demographic.first_name,
demographic.last_name, demographic.chart_no, demographic.sex,
demographic.year_of_birth, demographic.month_of_birth,
demographic.
Schalk,
Your query looks ok except for an apparently missing '%' in LIKE 'TES',
but all the WHEREs are hard to read, aren't they? I find queries easier
to write, read & maintain with joins in the JOIN clause and specific
row-selection criteria in the WHERE clause, eg
SELECT
demographic.demogra
Mathias/Everyone on the list
I am running the following query against the database:
SELECT demographic.demographic_no, demographic.first_name,
demographic.last_name, demographic.chart_no, demographic.sex,
demographic.year_of_birth, demographic.month_of_birth,
demographic.date_of_birth, demograph
Try this
If something is numeric
SELECT * FROM table1, table2, table3, table4, table5, table6
WHERE table1.something = table2.something
AND
table1.something = table3.something
AND
table1.something = table4.something
AND
table1.something = table5.something
Hi,
Select * from table1 T1, table2 T2, table3 T3, table4 T4, table5 T5,
table6 T6
Where T1.col=T2.col
and T2.col=T3.col
and T3.col=T4.col
and T4.col=T5.col
and T5.col=T6.col
and T1.col=T6.col
[and col='val']
Doesn't this work ? Have you an example ?
Best Regards
Mathia
On Sun, April 24, 2005 3:51 pm, Schalk Neethling said:
> Hope someone can give me some pointers here. I have six tables in the
> database and I need to JOIN them on a row that appears in all of the
> tables. How do I do this? I have so far done the normal 'cross-join'
> saying SELECT * FROM table1,