Select table1.field1,table1.field2,iif(isnull(table2.field1,spac(10),table2.field1) as Name From table1 left join table2 ...................

What i want to ask is how to do IIF part when using remote view Can I use the same Select in Remote View Or may be there is another command to use to substitute the IIF when using Remove View

Re: Remote View


What is the target database IIF() is a FoxPro function, for SQL Server you have to use the CASE statement, other databases use other syntax, it all depends what you are hitting....

Re: Remote View

Alex Feldstein

Most probably you can't. IIF() is a Foxpro function. It would work in a Local View. A Remote View works against an external database. Unless you are using Fox as your external (through ODBC), you would have to use whatever syntax is valid in that database engine.

In SQL Server (T-SQL) for example you would have to use a different construct

SELECT field1, ISNULL(field2, ' ') AS Name FROM table1....

For other type of IIF() replacement you would have to use CASE.

Re: Remote View


But I need to do that in Remote view (in vfp), not from store procedure or sql pass through.

my current app is using local view, and i have upsize my database and my local view to remote view.

so i need to do that in remote view