Stored function

  • Thread starter Thread starter CA Zuke
  • Start date Start date
C

CA Zuke

Hi,

1. I know it is possible to store a VB function and call it in SQL if
that function is stored in the MS ACCESS database. Is it possible to
call that function from ASP? I have great difficulty doing this. So in
summary: I want to create a custom function for SQL and use it in an
ASP sql query. How do I do that?

2. If I can't do number 1, then I have to put whatever I wanted to put
in the function, directly in the SQL statement. As far as I know
decode doesn't work. So is there a function to test if a number is
negative? I basically want to say select x-y from emp. but if x-y is
negative I want to display 0. How do I do that?

Thanks!
 
Not too sure about the 1st, but the second can be done with Jet

Select Iif([x]-[y]<0, 0, [x]-[y]) from tblMyTable;
 
Back
Top