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 2008 Forums
 Transact-SQL (2008)
 between alfa numeric query

Author  Topic 

emmim44
Yak Posting Veteran

65 Posts

Posted - 2012-08-07 : 02:43:33
Hi all, I am trying to search between an alfanumeric dept code,and job code? Do you think I will get accurate result with a simple sql between statement?

AND (ProfitCenter.AccountNumber BETWEEN @BranchCodeR0 AND @BranchCodeR1)
---
DeptCode
G0274630
G0274630
G0274600
G0274610
G0274000
G3F14000
G3F00000
G3F13000
G3F14000
G3F11000
G0274630
G3F11000
G3F13000
---
TitleCode
130-GMRAP01
150-SMUH01
150-ODEM02
140-ODEM01
150-SMUH01
150-MIMISL01
150-MEKTES01
150-MIMISL01
160-TEKDES05
160-TEKDES05
130-INEML01
160-MIMISL02

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2012-08-07 : 04:56:00
YES, it will work.

--------------------------
http://connectsql.blogspot.com/
Go to Top of Page
   

- Advertisement -