bar0822
asked on
Error on nulls with Left Mid() function
this function in Access produces an error on nulls in the column:
Left(Right(,Len()-InStr(), "(")),Len( Right(,Len ()-InStr(( ),"(")))-1 ) - how can this be rewritten so that it will convert nulls into empty strings?
Also, will this work in SQL 2005? thanx
Left(Right(,Len()-InStr(),
Also, will this work in SQL 2005? thanx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
"bar0822 declined to include the actual strings and/or fields used in the expression and in doing so"
I see. Just to make it a trick question.
I see. Just to make it a trick question.
@JDettman:
"Nice to see you wanting to go the extra mile here,"
Huh? Not related.
"Nice to see you wanting to go the extra mile here,"
Huh? Not related.
I agree with everyone! Yes, the expression is a mess, and a royal pain to debug. But the question was about how to convert Nulls to empty strings, and that was the answer given.
If I was stuck with that expression, I'd probably write a VBA function to clean it up, and call that from a query. But even that might depend on the performance, as if it's in a query that hits many rows then performance could be a dog.
But I'm not going to go into "what ifs" or I'd drive myself nuts. More nuts.
If I was stuck with that expression, I'd probably write a VBA function to clean it up, and call that from a query. But even that might depend on the performance, as if it's in a query that hits many rows then performance could be a dog.
But I'm not going to go into "what ifs" or I'd drive myself nuts. More nuts.
Left(Right(,Len()-InStr(),"(")),Len(Right(,Len()-InStr((),"(")))-1)
Left(Right(,Len()-InStr(),"(")),Len(Right(,Len()-InStr((),"(")))-1)
Please look these up in VBA Help to get the correct syntax ...
mx