Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Seconds()
Message
De
10/02/2019 09:00:06
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Seconds()
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01666213
Message ID:
01666213
Vues:
85
Sir, I am using SQL SERVER 2008.

Suppose I have following data
CREATE CURSOR junk(date t,nSeconds n(4))
INSERT INTO junk values({^2019-02-08 01:25:28 AM},	0)
INSERT INTO junk values({^2019-02-08 01:25:29 AM},	0)
INSERT INTO junk values({^2019-02-08 01:25:55 AM},	0)
INSERT INTO junk values({^2019-02-09 02:28:29 AM},	0)
INSERT INTO junk values({^2019-02-09 02:50:18 AM},	0)
INSERT INTO junk values({^2019-02-09 08:59:17 PM},	0)
INSERT INTO junk values({^2019-02-09 10:25:39 PM},	0)
INSERT INTO junk values({^2019-02-12 03:05:19 AM},	0)
I want to fill nSeconds column like this
For second record
AA={^2019-02-08 01:25:29 AM}-{^2019-02-08 01:25:28 AM}   && 1 Second
Second() difference with Previous record.

I need result shown in attached file

I want to update JUNK table in sqlserver.

Thanks in advance
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform