Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seconds()
Message
From
10/02/2019 09:00:06
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Seconds()
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01666213
Message ID:
01666213
Views:
84
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
Next
Reply
Map
View

Click here to load this message in the networking platform