It's impossible to say what's the best way of solving your particular
problem since you haven't given us any clues about what code you actually
have in your stored proc. However, the SQL Server CASE function is the
usual answer when you need an "equivalent" to the Access Iif function (it
isn't exactly an equivalent, but you can do the same sort of things with
it).
It's impossible to say what's the best way of solving your particular
problem since you haven't given us any clues about what code you actually
have in your stored proc. However, the SQL Server CASE function is the
usual answer when you need an "equivalent" to the Access Iif function (it
isn't exactly an equivalent, but you can do the same sort of things with
it).
CASE WHEN Field2 = 0 THEN 0 ELSE Field1/Field2 END
If you are going to do much in the way of stored procedures you are going to
need to get SQL Server Books Online, not sure if it is downloadable from
Microsoft's web site.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.