•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 374,005 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,778 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 537 | Replies: 2 | Solved
![]() |
•
•
Join Date: Apr 2008
Posts: 18
Reputation:
Rep Power: 1
Solved Threads: 0
--Que-4)Create a Query to pull all emails that contains
--characters +,^,*,&,!
I have tried the above query but error is coming. Reply .thx in advance.
--characters +,^,*,&,!
sql Syntax (Toggle Plain Text)
CREATE TABLE mail3(email varchar(50)) INSERT INTO mail3 VALUES('mansi.sharma@yahoo.co.in') INSERT INTO mail3 VALUES('mansi.sharma+yahoo.co.in') INSERT INTO mail3 VALUES('mansi.sharma^yahoo.co.in') INSERT INTO mail3 VALUES('mansi.sharma*yahoo.co.in') INSERT INTO mail3 VALUES('mansi.sharma&yahoo.co.in') INSERT INTO mail3 VALUES('mansi.sharma!yahoo.co.in') INSERT INTO mail3 VALUES('mansi&sharma!yahoo.co.in') SELECT * FROM mail3
select * from mail3 where email like '%+%' or '%*%'I have tried the above query but error is coming. Reply .thx in advance.
Last edited by peter_budo : Apr 10th, 2008 at 4:24 pm. Reason: Keep It Organized - please use [code] tags
•
•
Join Date: Feb 2008
Posts: 14
Reputation:
Rep Power: 1
Solved Threads: 4
The correct code is:
select * from mail3 where email like '%+%' or email like '%*%' Last edited by peter_budo : Apr 10th, 2008 at 4:24 pm. Reason: Keep It Organized - please use [code] tags
Hence Wijaya
www.ex-Soft.tk
www.ex-Soft.tk
•
•
Join Date: Apr 2008
Posts: 18
Reputation:
Rep Power: 1
Solved Threads: 0
Thx,It worked.
Plz see the following query-
Instead of showing the particular records ,the above query is displaying all the records.
Plz see the following query-
sql Syntax (Toggle Plain Text)
SELECT * FROM mail3 WHERE email NOT LIKE '%@%' OR email NOT LIKE '%&%'
Instead of showing the particular records ,the above query is displaying all the records.
Last edited by peter_budo : Apr 10th, 2008 at 4:24 pm. Reason: Keep It Organized - please use [code] tags
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MS SQL Marketplace
Other Threads in the MS SQL Forum
- Previous Thread: Urgent Help Needed
- Next Thread: Link server in MS SQL 2005


Linear Mode