HI
I have two tables like the following:
table1
id variable
1 speed
2 distance
3 acceleration
table2
id allowedvalue
1 3
1 5
1 6
2 4
2 5
i want to write a a loop to check whether for a given variable in all tables in the database the values is within the allowed value. THe link for getting the allowed values of each table is the id no.
i have tried the following
SELECT id from table1 s where variable = "speed"
inner join table2 on s.id = [table2].id
but i am gewtting missing operator error
hope someone can help
I have two tables like the following:
table1
id variable
1 speed
2 distance
3 acceleration
table2
id allowedvalue
1 3
1 5
1 6
2 4
2 5
i want to write a a loop to check whether for a given variable in all tables in the database the values is within the allowed value. THe link for getting the allowed values of each table is the id no.
i have tried the following
SELECT id from table1 s where variable = "speed"
inner join table2 on s.id = [table2].id
but i am gewtting missing operator error
hope someone can help