473,503 Members | 2,046 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

query for numeric/symbol first character

7 New Member
Hi, I have a query which gives me all names in the database based on first letter:

Expand|Select|Wrap|Line Numbers
  1. SELECT drinkid, drinkname FROM tDrinks WHERE drinkname like 'A%' ORDER BY drinkname
How do I query for names starting with a symbol or a number. ie: if I had names in the database like '123 Martini' or '@the beach' how would I return those in a query.

Thanks
Dec 17 '08 #1
1 3168
xNephilimx
213 Recognized Expert New Member
you can use regexp to test if it doesn't start with a number or a letter:

Expand|Select|Wrap|Line Numbers
  1. SELECT drinkid, drinkname FROM tDrinks WHERE drinkname REGEXP '^[\D\W]' ORDER BY drinkname
  2.  
Dec 24 '08 #2

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

Similar topics

2
3082
by: Poster | last post by:
After creating an IN clause from a bunch of character strings created by a Word macro, Query Analyzer complains about a syntax error. The macro takes a column full of character strings and wraps...
7
12034
by: Egor Shipovalov | last post by:
I'm implementing paging through search results using cursors. Is there a better way to know total number of rows under a cursor than running a separate COUNT(*) query? I think PostgreSQL is bound...
4
1614
by: Maxi | last post by:
I have posted my question on my website as the alignment in this post goes for a toss. The text editor wraps up the data in the next line by default and because of which I am not able to copy my...
11
3752
by: anony | last post by:
Hello, I can't figure out why my parameterized query from an ASP.NET page is dropping "special" characters such as accented quotes & apostrophes, the registered trademark symbol, etc. These...
8
5499
by: Zox | last post by:
Hi all, There is a symbol used in Paris for the Metro system, which is a capital M inside a circle. It's used in tourist guidebooks and in weekly papers and such. Does HTML have an...
13
14945
by: nishit.gupta | last post by:
Is their any fuction available in C++ that can determine that a string contains a numeric value. The value cabn be in hex, int, float. i.e. "1256" , "123.566" , "0xffff" Thnx
13
5744
by: ptq2238 | last post by:
Hi, I have written this code to help me learn C but I'm not sure why gcc - Wall is giving me an error when I compile Basically I want to read in a character then a number and then manipulate...
1
1280
by: amj1020 | last post by:
Need help with a query. I need to get a date from table1 where the symbol is equal to OQY7 but the symbol in table table2 is OQY07. How do I get it to look for the first three characters plus the...
1
3119
by: ananthaisin | last post by:
Hi, This is the query i am trying to build I have attached the same in the file.... while running its throwing an error ........ NVL((SELECT USAGEMODE FROM KKTYPEMAST_AP B WHERE...
0
7204
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7091
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6998
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7464
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5018
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4680
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3162
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
741
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.