Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.sqlserver.server > #18808
| Newsgroups | microsoft.public.sqlserver.server |
|---|---|
| Date | 2017-10-23 12:07 -0700 |
| Message-ID | <d2ab174f-0825-43a1-82a4-1e715ef716dc@googlegroups.com> (permalink) |
| Subject | SQL Query help |
| From | Mike Arney <mikespcnet.net@gmail.com> |
I have a MSSQL table with the following columns and data types: Topic -- nvarchar Payload -- numeric Timestamp -- datetime id -- int Here is some example data: Topic Payload Timestamp id STG/A/CycleStart 0 2017-10-23 15:37:56.697 1651 STG/A/CycleStart 0 2017-10-23 15:37:55.670 1650 STG/A/CycleStart 0 2017-10-23 15:37:55.193 1649 STG/A/CycleStart 0 2017-10-23 15:37:54.687 1648 The Timestamp column's default value is set to: (getutcdate()) I need to add the TIMESTAMP column for the last 24 hours where TOPIC = 'STG/A/CycleStart' and PAYLOAD = 1 I also need this time in seconds. Any help would be greatly appreciated. Thanks, Mike
Back to microsoft.public.sqlserver.server | Previous | Next — Next in thread | Find similar
SQL Query help Mike Arney <mikespcnet.net@gmail.com> - 2017-10-23 12:07 -0700 Re: SQL Query help toddism@gmail.com - 2017-11-14 10:04 -0800
csiph-web