Welcome Guest, Not a member yet? Register   Sign In
Select Query
#8

[eluser]Sanjay Sarvaiya[/eluser]
I have found solution after a day of hard work and using google I got what I want.

I have search from number <b>001/SPJ/BT/09</b> to number <b>099/SPJ/BT/12</b>, In this case search query will be like this
Code:
SELECT * FROM tablename WHERE (po_number LIKE '%/SPJ/BT/09' AND SUBSTRING_INDEX( SUBSTRING_INDEX( po_number, '/' , -4 ) , '/', 1 ) >= 001 ) OR (po_number LIKE '%/SPJ/BT/12' AND SUBSTRING_INDEX( SUBSTRING_INDEX( po_number, '/' , -4 ) , '/', 1 ) <= 099) OR po_number LIKE '%/SPJ/BT/10' OR po_number LIKE '%/SPJ/BT/11'


Messages In This Thread
Select Query - by El Forum - 09-05-2012, 04:54 AM
Select Query - by El Forum - 09-05-2012, 12:38 PM
Select Query - by El Forum - 09-05-2012, 02:03 PM
Select Query - by El Forum - 09-05-2012, 02:31 PM
Select Query - by El Forum - 09-05-2012, 09:45 PM
Select Query - by El Forum - 09-05-2012, 10:56 PM
Select Query - by El Forum - 09-05-2012, 10:59 PM
Select Query - by El Forum - 09-07-2012, 04:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB