Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Search Organisation name

Author  Topic 

shaileshk
Starting Member

6 Posts

Posted - 2008-04-03 : 08:28:05
Hello All,

I would like to know how to search organisation from the Organisation table


I run the Query as below

SELECT *
FROM org
WHERE (organisationname LIKE 'del%')

Search Reult for the Above Query is this


DEL BOY'S
DELTA Computer
DELUXE DESIGNS LTD
DELYTH AT TONY'S
DELYN HIRE CENTRES LTD
DELUXE LABORATORIES LTD
DELVER CONSTRUCTION
DELWYN PARKER
DELYN HIRE CENTRES LTD

When i search with

SELECT *
FROM org
WHERE (organisationname LIKE '%del%')


The DEL Computer
DEL BOY'S
DELTA Computer
DELUXE DESIGNS LTD
DELYTH AT TONY'S
DELYN HIRE CENTRES LTD
DELUXE LABORATORIES LTD
DELVER CONSTRUCTION
DELWYN PARKER
DELYN HIRE CENTRES LTD


But i need search result with match whole ('del')word with the oragatiosation records
i.e.

The DEL Computer
DEL BOY'S


Thanks
Shailesh




shailesh kavathiya
http://www.codegroup.com/blog/

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-04-03 : 08:32:00
like '%del %' ?

Em
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-04-03 : 08:33:25
[code]organisationname Like 'DEL %' or organisationname Like '% DEL %'[/code]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-04-03 : 08:35:50
was just coming back to correct that

Em
Go to Top of Page

shaileshk
Starting Member

6 Posts

Posted - 2008-04-03 : 09:20:20
It's realy helpful to me..
Thanks a lot both of you.

Shailesh Kavathiya
http://www.codegroup.com/blog/
Go to Top of Page
   

- Advertisement -