www.itgalary.com Homepage
Forum Home Forum Home > Databases > MS SQL Server
  Active Topics Active Topics
  FAQ FAQ  Forum Search   Register Register  Login Login

table select doubt

 Post Reply Post Reply
Author
Message
  Topic Search Topic Search  Topic Options Topic Options
shamsu View Drop Down
Bronze Member
Bronze Member
Avatar

Joined: 27 Feb 07
Location: United Kingdom
Posts: 67
  Quote shamsu Quote  Post ReplyReply Direct Link To This Post Topic: table select doubt
    Posted: 24 Mar 09 at 9:56am
haiii frnd....
 
 
 i have a simple doubt.  i want select all Ref_No (is a Text) begins with "15"
is it possible....?
kindly reply me...


Back to Top
Jijo View Drop Down
Admin Group
Admin Group
Avatar

Joined: 31 Dec 05
Location: United Kingdom
Posts: 495
  Quote Jijo Quote  Post ReplyReply Direct Link To This Post Posted: 24 Mar 09 at 7:14pm

The LIKE condition allows you to use wildcards in the where clause of an SQL statement. This allows you to perform pattern matching. The LIKE condition can be used in any valid SQL statement - select, insert, update, or delete.

The patterns that you can choose from are:

% allows you to match any string of any length (including zero length)

_ allows you to match on a single character

So you can write the query as follows

select * from TableName where Ref_No like '15%';

I think you can use * in access instead of %.


Back to Top
shamsu View Drop Down
Bronze Member
Bronze Member
Avatar

Joined: 27 Feb 07
Location: United Kingdom
Posts: 67
  Quote shamsu Quote  Post ReplyReply Direct Link To This Post Posted: 25 Mar 09 at 10:20am
THANKS UR REPLY
I WILL TRY THIS
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

.