Solved

Sybase searching for date

Posted on 2011-09-13
5
267 Views
Last Modified: 2012-05-12
I have a column in sybase table which has column values in this format

ABC TECH (11/09/09)*
CDE INC
FEG SYNC (11/09/10)*

I need to find all the records which have date in parenthesis followed by *. Please advise
0
Comment
Question by:saibsk
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
rbride earned 500 total points
ID: 36534404
Use the LIKE operator in your query

WHERE myCol LIKE '%([0-9][0-9]/[0-1][0-9]/[0-9][0-9])*'
0
 
LVL 3

Expert Comment

by:pg_vinod
ID: 36719638

simpler one would be:

WHERE myCol LIKE '%)*'
0
 
LVL 4

Expert Comment

by:rbride
ID: 36813268
@pg_vinod: your solution will find all rows where the field ends in )* including those that do not match the search criteria, such as "(abc)*"

My solution is not 100% sufficient because it will also find columns where date is invalid. To check that something really is a date is a whole chapter in itself.
0
 
LVL 29

Expert Comment

by:leonstryker
ID: 37271919
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

In  today’s increasingly digital world, managed service providers (MSPs) fight for their customers’ attention, looking for ways to make them stay and purchase more services. One way to encourage that behavior is to develop a dependable brand of prod…
Find out what the Office 365 disclaimer function is, why you would use it and its limited ability to create Office 365 signatures.
This video discusses moving either the default database or any database to a new volume.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now