Quantcast
Channel: Für Entwickler: SQL Server Forum
Viewing all articles
Browse latest Browse all 1772

SQL Datum ändern

$
0
0
Hilfe ich steh auf dem Schlauch ;(

Ich will ein Datum in SQL 2008 R2 ändern, Beispiel

Ich selektiere 01.01.2015

<code>

select * from [%DB%].[dbo].[%Tabelle%]

where

DATEPART(year, [%Datumsspalte%]) = 2015
and DATEPART(month, [%Datumsspalte%]) = 1
and DATEPART(day, [%Datumsspalte%]) = 1

</code>

Die Treffer die kommen passen. Kann mit jemand grad helfen wie der Syntax zum UPDATE ist, z.B. für den 02.03.2016?

Aufbau der Spalte ist: 2015-01-01 00:00:00.000

Vielen Dank

Viewing all articles
Browse latest Browse all 1772

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>