DevTrain Startseite SharePoint Camp ? In 5 Tagen zum SharePoint Profi!  
  
  
SUCHEN:  
ARTIKEL ONLINE: 525   

Kategorien
.NET
Datenbanken
Web
XML

Allgemein
Camp
Foren
Events
Persönliche Einstellungen
Registrieren
Prämien Shop
Kontakt
Impressum
Über DevTrain

Autoren



 

Forum: SQL | Thema: can anyone help me writing a query? | Von: G. Guest ( 01.10.2003 17:48)

I have to write a query to migrate some data and I don't know, how to solve it:

I got a table, having a primary key, a foreign key, a value and a timestamp
PK | FK_ID | VALUE | TIMESTAMP
1 | 1 | 5 | 2003-10-05
2 | 1 | 10 | 2003-09-01
3 | 2 | 15 | 2003-01-15
4 | 2 | 20 | 2003-01-16


there is a second table whose primary key is linked to the foreign key and contains an unset column with values und timestamps as well:

PK | VALUE | TIMESTAMP
1 | - | -
2 | - | -


The value of this second table should be updated with the value from the first table ... as you can see there are 2 possibilities for each row. The row interesting is the one with the later date, so after updating the second table should look like this:

PK | VALUE | TIMESTAMP
1 | 5 | 2003-10-05
2 | 20 | 2003-01-16


Can anyone give me a hint, how I could solve this ?


Betreff Von Datum
Re: can anyone help me writing a query?
q
G. Guest 11.10.2003 16:26

Antworten
Vorsicht bei der Eingabe: Die Zeichen ' oder -- sind nicht erlaubt!

 Betreff:
 Nachricht: Den Beitrag finden Sie nun unter: http://beta.devtrain.de/foren Die Benutzerdaten und Foreninhalte von beta.devtrain.de und www.devtrain.de sind die selben.
Sie können sich dort sogar per RSS über neue Inhalte informieren lassen.
Bei Problemen bitte direkt Mail an asp [AT] ppedv.de.

 Signatur:

  



Login
Username:


Passwort:






Passwort vergessen?

Advanced Developers Conference vom 14.-15. Februar 2011

© Copyright 2003 ppedv AG