Page 1 of 1

Raverse table???

Posted: Thu Jul 29, 2004 1:47 am
by siropchik
Hi,I have very strange problem .My big table consists of many records ,part of them is null or empty value .Now a problem:
Then I do Order By 'Some Column_Name' I receive an answer but in wrong way :First of all -it's a empty fields and at finish Results that i need.
Probably you know how can I redirect an answer.
First my search value,after empty fields????
Thanks

Posted: Thu Jul 29, 2004 1:50 am
by feyd

Code: Select all

ORDER BY `column` WHERE `column` NOT NULL
?

Posted: Thu Jul 29, 2004 9:07 am
by Draco_03
You could also put some sort of validation
For exemple if you put first name REQUIRed, well you won't have null field..

(note that this is in the case that you have UNWANTED NULL fields..)

replay

Posted: Sun Aug 01, 2004 2:01 am
by siropchik
Yes,I have to have NULL fields too,but in the end

Posted: Sun Aug 01, 2004 2:08 am
by feyd
if you can perform unions, I'd use one, the first select grabs the non-null ones, the second only the null ones..

Posted: Sun Aug 01, 2004 8:24 am
by siropchik
it works but
first: it not sort right;
second: this query has 14 seconds

Posted: Sun Aug 01, 2004 10:31 am
by feyd
it may be better to sort it yourself then.