>Any way around this?
I think I seen some tricks where people use OPENDATASOURCE. Why can't you use a stored procedure?
-Mike
>Hi Mike,
>
>As always, terse and to the point :-)
>
>Too bad, would have been nice.
>
>Any way around this?
>
>
>>You can't modify data in a table from within a UDF.
>>
>>-Mike
>>
>>>
>>>
>>>
>>>IF @Discrepancy <= 0 AND @IsStatus = 0
>>> BEGIN
>>> UPDATE CBInvoice
>>> SET IsStatus = 1
>>> WHERE ...
>>>END
>>>
>>>
>>>Discrepancy (calculated as subtract a -(b+c), where a,b and c are fields in CBInvoice) and IsStatus are both fields in CBInvoice.
>>>
>>>
>>>TIA