Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Change date created if date modified = Today

Posted on 2008-11-03
4
Medium Priority
?
214 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
  • 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
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.

773 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