Order by in query

radek225

Registered User.
Local time
Yesterday, 21:17
Joined
Apr 4, 2013
Messages
307
I have a query with "order by LP asc" (lp is a number) but the problem is when the lp is null (has no value) then these rows are on top. What should I do to have rows with no value at the bottom?
 
try order by nz(LP,1000000)

make the number as big as it needs to be to be the biggest
 
ORDER BY NZ(LP, 999999)

If you have LP values greater than 999999, use a value greater than your largest LP value.
 
Damn it CJ, that's twice today. I'm getting closer though, this time I was only a minute behind.
 

Users who are viewing this thread

Back
Top Bottom