Morning, I am not aware of a function called NVL. Could you explain the use of this function in the native language and then maybe someone can provide the solution. I searched the OLH for SQL 2000, dBase 2.01 and Visual dBase 5.7 with no results. Thanks R2
R2:
NVL(expr1,expr2) returns expr2 if expr1 is null. Otherwise it returns expr1.
Alex:
I was tring to figure this out the other day and just now got back to your post. What version of dBase are you working with? That will help to find possible alternatives for you. I know that dBaseIV for example includes the IIF() function that you may be able to apply in an SQL statement. E.g. IIF(expr1, "0","1". This returns character 0 if expr1 = .T. otherwise it returns character 1.
So....... IIF(val1=CHR(0),val2,val1) would be similar to NVL(val1,val2). I don't have dBase available to me at the moment so I can't test this - it may or may not work or work correctly - test it. I'm not sure you can use an IIF() in SQL against a dBase table.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.