Skip to content

Instantly share code, notes, and snippets.

View jakeboone02's full-sized avatar

Jake Boone jakeboone02

View GitHub Profile
{
"basics": {
"name": "Jake Boone",
"label": "Product Owner / Web Developer",
"picture": "http://1.gravatar.com/avatar/717ff67f2d673388855f5df58f884bba.jpg",
"email": "jakeboone02@gmail.com",
"phone": "(832) 360-4807",
"website": "https://jakeboone02.github.io",
"summary": "I am a highly motivated, hard-working product owner and web developer with technical as well as managerial and leadership experience. I have worked successfully with diverse, international teams in many different environments. I enjoy designing and creating tools, teaching others, and acting as the bridge between functional and technical parties.",
"location": {
@jakeboone02
jakeboone02 / gist:7567107
Created November 20, 2013 17:17
Toad: Using SYSDATE instead of specific dates when exporting as Insert statements

When extracting data via INSERT statements with Toad, date fields get hard-coded to the date stored in the database in the form of TO_DATE('<the_date>','MM/DD/YYYY HH24:MI:SS'). Many times the actual date in the source table doesn't matter, and you would rather insert SYSDATE in the destination table instead.

Since the dates can be different in each statement, a standard Find/Replace doesn't help automate the process of converting the TO_DATEs to SYSDATEs. However, you can use this regular expression that is agnostic about the content between the parentheses:

TO_DATE\(.*?\)

Most text editors have a regex option in the Find/Replace function. I have tested this successfully with Sublime Text and Notepad++, but the TextPad regex engine does not support it.