How to resolve this query sql this? -


i have query sql this

select fname, idcard, left(idcard,3) kodecard tcard kodecard = '200' 

how resolve query? have 2 column (fname, , idcard) , want filter first 3 digits in idcard column.

could give me solution?

just use left function in condition

select fname, idcard tcard left(idcard,3) = '200' 

you may use like well.

select fname, idcard tcard idcard '200%' 

this solution better since allows query processor use index (if available).


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -