Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sybase searching for date

Posted on 2011-09-13
5
Medium Priority
?
280 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
rbride earned 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While opting for any web-to-print solution, you need to discuss with your team and some of your end users and know their opinions about your decisions. In this article we list down some questions you need to ask yourself.
Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

715 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