Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > SQL Language
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 6th, 2011, 02:25 PM
Authorized User
Points: 234, Level: 4
Points: 234, Level: 4 Points: 234, Level: 4 Points: 234, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2010
Posts: 50
Thanks: 0
Thanked 1 Time in 1 Post
Default BETWEEN operator

Dear friends,
could you please any one explain me, how the between operator working for string values. for examples

SELECT * FROM Persons
WHERE LastName
BETWEEN 'peter' AND 'sam'

the result set from the above query includes both 'peter' and 'sam'. but if i run the below query

SELECT * FROM Persons
WHERE LastName
BETWEEN 'peter' AND 'sa'

the result doesn't include sam. why its not included in the result set and how the sql server works.

Thanks,
Rockbal
Reply With Quote
The Following User Says Thank You to RockBal For This Useful Post:
Ramkumar Bishnoi (April 6th, 2011)
  #2 (permalink)  
Old April 7th, 2011, 12:55 AM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Please check the following thread which might help you:
SQL 'Between' operator
__________________
Om Prakash Pant
Click the "Thanks" button if this post helped you.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use like operator thillaiarasu SQL Server 2000 4 April 23rd, 2010 09:47 AM
new line operator in c# MunishBhatia C# 2005 9 December 11th, 2007 03:03 AM
=== operator in c# surendraparashar C# 2005 8 November 8th, 2007 05:14 AM
Invalid operator for data type. Operator equals di Pusstiu SQL Server 2000 2 August 10th, 2007 04:51 AM
? operator in PHP Tachyon Beginning PHP 2 May 24th, 2004 02:59 PM



All times are GMT -4. The time now is 10:28 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.