Solved

Sybase searching for date

Posted on 2011-09-13
5
274 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How would you store an Access 2003 memo data type field in Sybase. 1 574
Pivot and Unpivot in Sybase 2 1,780
Problems writing binary files to Sybase from PHP 2 196
SQL Query  Syntax 3 90
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

751 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