Solved

Change date created if date modified = Today

Posted on 2008-11-03
4
206 Views
Last Modified: 2008-11-04
Basically

If t0.U_IIS_REF2 = TODAYS DATE
I want to change that records t0.createdate to todays date

Thanks

Keir
0
Comment
Question by:KeirMcCann
[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
4 Comments
 
LVL 37

Expert Comment

by:momi_sabag
ID: 22868001
update table1
set createdate = getdate()
where U_IIS_REF2 = getdate()
0
 
LVL 37

Expert Comment

by:momi_sabag
ID: 22868005
what is the format of dates you work with?
0
 

Author Comment

by:KeirMcCann
ID: 22868012
DD.MM.YY

Thanks

Keir
0
 
LVL 41

Accepted Solution

by:
Sharath earned 500 total points
ID: 22872444
Run Momi's query. If that does n't work, then run the below query.

update table1
set createdate = CONVERT(varchar(10), GETDATE(), 4)
where U_IIS_REF2 = CONVERT(varchar(10), GETDATE(), 4)
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

739 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