Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Change date created if date modified = Today

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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

688 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