Solved

Sybase searching for date

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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sybase - CronJob schedule 2 598
SyBase SQL DataTime Format 6 295
Get data out of MediSoft 4 97
Why did SAP buy Sybase? 3 160
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

810 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