473,325 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

SQL Scripts "LIKE" Statement? need help

1
hi,

Good day!

Anyone generous enough to help me with this query. Anyway,

I have a random acount number of 1, 2, 3, 4, 5 and i wanna get the results after this number in a table.

Select * from table where account like ('1%','2%', '3%','4%','5%')


is this select query possible or not? or there are other method which you can recommend. thank you.

regards,

Unamas
Dec 6 '06 #1
1 1535
ronverdonk
4,258 Expert 4TB
No, this format is not possible. But I would prefer the following:
Expand|Select|Wrap|Line Numbers
  1. SELECT * FROM table where SUBSTRING(account,1,1) BETWEEN 1 AND 5
Ronald :cool:
Dec 6 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: NK | last post by:
Hi all, Does anyone know of how I can disable case sensitivity for the LIKE function in SQL? Currently the SQL statement looks like: $query = "SELECT * FROM itrader_games WHERE...
4
by: Radioactive Man | last post by:
anyone know of a function like "raw_input", which collects a string from the user entry, but one where I can set a time limit, as follows: time_limit = 10 # seconds user_answer =...
9
by: Peter | last post by:
My problem is the last bit of coding below, the like statement does not work. what I have is a product options field and in it is stored characters i.e. "avcy" etc what the query does is...
5
by: TD | last post by:
I created a query in Access 2000 that runs perfectly. I then copied the "sql" version of the same query and set it equal the variable "sql" in the code below. When I run the code below I get an...
2
by: Big John | last post by:
in Access 2003 I am trying to get sql query to run using a field as input, but I want to input into the field a value that uses the "like" operator to find any value that starts with the value...
3
by: Derrick | last post by:
Is there a C# "Like" statement for comparing two strings? if(stringA Like "%diabe%mel%) do stuff... Thanks in advance! Derrick
1
by: Craig Kenisston | last post by:
Hi, I need to write a function that should behave like the SQL's "like" operator on a list of words. I was wondering if I can use Regex directly to do this job. But I've been reading about...
25
by: samjnaa | last post by:
Please check for sanity and approve for posting at python-dev. In Visual Basic there is the keyword "with" which allows an object- name to be declared as governing the following statements. For...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.