Hi,
I've been handed a project with tables already in place. I am using PHP to construct and run SQL statements.
One of the tables is named Values.
This creates a problem when running this SQL statement within it being constructed in PHP:
select gref.Field1, gref.Field2, othertable.Field3,
Values.Field4, Values.Field5, Values.Field6
from (Values inner join gref ON Values.Field2=gref.Field2)
left join othertable on gref.Field2=othertable.Field2
where gref.Field1='abc'
Changing the table name works, such as calling it Values2. But I can't do that. The code above in particular gets hung up on: from (Values inner join
It seems having Values at that point in the SQL statement is the problem.
Any ideas what to do?
Thanks,
KB
I've been handed a project with tables already in place. I am using PHP to construct and run SQL statements.
One of the tables is named Values.
This creates a problem when running this SQL statement within it being constructed in PHP:
select gref.Field1, gref.Field2, othertable.Field3,
Values.Field4, Values.Field5, Values.Field6
from (Values inner join gref ON Values.Field2=gref.Field2)
left join othertable on gref.Field2=othertable.Field2
where gref.Field1='abc'
Changing the table name works, such as calling it Values2. But I can't do that. The code above in particular gets hung up on: from (Values inner join
It seems having Values at that point in the SQL statement is the problem.
Any ideas what to do?
Thanks,
KB