15 pts.
 How do I prevent from losing the first position of a non “0″ field?
How do I prevent from losing the 1st position of non "0" field, using this logic: WHERE concat(TRN@DS, concat(substring(concat('00',TRNYDS),2,2), concat(substring(concat('00',TRNMDS),2,2), substring(concat('00',TRNDDS),2,2)))) between

Software/Hardware used:
ASKED: June 11, 2009  3:51 PM
UPDATED: June 11, 2009  11:13 PM

Answer Wiki:
Sorry this keeps crashing on me. Just this part -- year? substring(concat('00',TRNYDS),2,2), assuming that perhaps 2009 is blank9 and 2010 is 10 1. Trim(TRNYDS) will make it 9 or 10 .. no blank 2. CONCAT('00',Trim(TRNYDS)) makes it 009 or 0010 3 now you want the substring of the last 2 If you have a left function then Left(CONCAT('00',Trim(TRNYDS)),2) but you probably don't have one .. in which case Substring(CONCAT('00',Trim(TRNYDS)),length(CONCAT('00',Trim(TRNYDS)) -1),2) Phil
Last Wiki Answer Submitted:  June 11, 2009  11:13 pm  by  philpl1jb   44,070 pts.
All Answer Wiki Contributors:  philpl1jb   44,070 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _