March 25, 2010 at 12:29 pm
Hi,
I've setup a linked server to a Pervasive database on my SQL Server 2008 Express. It works and I can execute simple select query. But I can't run queries where I mention field name with spaces in them, like:
select * from openquery(ExactSQL, 'SELECT [Group Number] FROM Product where number=''PP141-72''')
It gives the error:
An error occurred while preparing the query "SELECT [Group Number] FROM Product where number='PP141-72'" for execution against OLE DB provider "MSDASQL" for linked server "ExactSQL".
so, how can I use fields with spaces in their names??
thanks for the help
March 25, 2010 at 1:00 pm
I figured out that the query: SELECT "Product Group" FROM ... " works.
But double quotes doesn't works on join or where fields, like:
SELECT * FROM ProductRecipe WHERE "Id Product" = 3532
it gives an error.
so how can I do that?
thanks
March 25, 2010 at 2:16 pm
Perhaps its a limitation of the Pervasive db?
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply