I am using a Sybase ASA database version 8.02. Here is the select statement I am sending to the database. Im my testing I found the problem only when using the coalesce()function as part of the select. This is the same as the nvl() in foxpro.
select reports.rptname,
reports.descrp,
reports.category,
reports.screenclass,
reports.reportclass,
reports.ident,
reports.initvars,
reports.preprocess,
reports.reportalias,
reports.setproc,
reports.preview as security,
reportpref.recno,
reportpref.curuser,
COALESCE (reportpref.printer,'Default') as cPrinter ,
reportpref.preview,
reportpref.pickprinter
from reports key left outer join reportpref on reportpref.curuser = current user
order by reports.category, reports.descrp
REPLACE cprinter WITH null
>>Hi all
>>
>>I am using SQL Pass Through for all my data access to a sql database. I use the replace command to change the data and then roll my own update and insert statements. I just ran into an issue of trying to replace a column with null when none of the columns in the cursor are null. The column on the table does accept null. I can't find a way to set the column to accept nulls in this case. Is there a way? DBsetprop() won't work because I am not using a DBC.
>>
>>Thanks.
>
>Hi James,
>
>Are you saying that remote column defined as NULL defined as NOT NULL in local cursor? Could you provide complete repro code?
>Take a look into message #
790070 for a workaround.
>
>Thanks,
>Aleksey.