-
I had no idea how to use it and I'm quite sure i had it wrong..
this is query i used,
SELECT * , case when Location LIKE '%keywords%' then 1 else 2 end Flag
FROM PropertyTbl
WHERE (Title LIKE '%keywords%' OR Location LIKE '%keywords%' OR Remarks LIKE '%keywords%' OR Owner LIKE '%keywords%')
ORDER by Flag , 1
i tried search with keyword klcc.. which this keyword also exists it other columns..
and below is the result of Location column.
Location
Golden Triangle
Golden Triangle
Golden Triangle
Golden Triangle
Jalan Ampang
Bandaraya
Titiwangsa
Duta
Golden Triangle
KLCC
Golden Triangle
Golden Triangle
Jalan Ampang
Golden Triangle
KLCC
Bukit Bintang
KLCC
KLCC
KLCC
KLCC
KLCC
Ulu Klang
Ulu Klang
Wangsa
Setapak
Wangsa
Ulu Klang
Ulu Klang
Ulu Klang
Ulu Klang
KLCC is nowhere near top..
i hope it will look like this..
Location
KLCC
KLCC
KLCC
KLCC
KLCC
KLCC
KLCC
Golden Triangle
Golden Triangle
Golden Triangle
Golden Triangle
Jalan Ampang
Bandaraya
Titiwangsa
Duta
Golden Triangle
Golden Triangle
Golden Triangle
Jalan Ampang
Golden Triangle
Bukit Bintang
Ulu Klang
Ulu Klang
Wangsa
Setapak
Wangsa
Ulu Klang
Ulu Klang
Ulu Klang
Ulu Klang
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|