Forum Replies Created

Viewing 15 posts - 316 through 330 (of 686 total)

  • Reply To: group records by week

    any way to make it all done in SP without having to invoke SSIS or Powershell? Dump 3 files based upon the CASE above?

     

     

  • Reply To: group records by week

    Thats very fast retrieval... thank you!!!  Now that this query shows me how much data is being written to the table per day could it be altered to get 8 hr...

  • Reply To: group records by week

    Thanks for updates: I ran 2nd example and received:

     

    cast(dt.dt_stamp As date);

     

    Msg 529, Level 16, State 2, Line 14

    Explicit conversion from data type bigint to date is not allowed.

  • Reply To: group records by week

    This is getting 1-day of information, can be it done more efficient?

    SELECT count(*)
    , dt_stamp = convert(date,DATEADD(SECOND, CAST( (t_stamp / 1000) AS int ), CONVERT(datetime, '1970-01-01...
  • Reply To: group records by week

    What if it has to be retro-fitted to SQL 2012 is datediff_big available?

    Thanks for your help.

     

     

    • This reply was modified 3 years, 8 months ago by Bruin.
  • Reply To: group records by week

    I'm a little confused by:

     

    Declare @current_date datetime = '2022-01-12 10:22:21.183';

    Declare @ts_startbigint = datediff_big(ms, '1970-01-01 00:00:00.000', cast(@current_date - 1 As date))

    , @ts_endbigint = datediff_big(ms, '1970-01-01 00:00:00.000', cast(@current_date As date))

    Select @ts_start, @ts_end;

    --

    Msg...

  • Reply To: group records by week

    I was getting and idea of how many records are accumulating for a week, and trying to figure out how to read the data.

    Now the request has shifted to pull...

  • Reply To: group records by week

    I like to use a parm to pass in like @date then the query dumps the data from the table to a (csv) file that is pipe delimited.

     

    Can this be...

  • Reply To: group records by week

    Thanks the above query worked great. If I wanted to do a daily extract of records saying start at 00:00 to 11:59 how would that query look?

     

    Thx.

  • Reply To: group records by week

    I have it displaying datetime now, how can I get it grouped by week?   and a COunt.

    SELECT *, CONCAT
    (
    CAST(DATEADD(SECOND, t_stamp/1000 ,'1970/1/1')...

    • This reply was modified 3 years, 8 months ago by Bruin.
  • Reply To: group records by week

    Thats my problem not sure how to make it work along with the grouping

    Thx.

  • Reply To: Restore error on Page[0.0]

    Using the 5 9gig files the Restore worked on the SQL2017 STD box.

    Thanks.

  • Reply To: Restore error on Page[0.0]

    I currently have it busted out to 5 9-gig files.

  • Reply To: Restore error on Page[0.0]

    I took a smaller db backup from the STD2012, and was able to restore to my SQL2017 instance. I can't move the backup to the sql2017 Box as it would...

  • Reply To: Restore error on Page[0.0]

    I was asking the question of a stripped backup because maybe Transferring the 45gig caused a problem. I thought maybe smaller files

    could be moved quickly and eliminate file moving issue....

Viewing 15 posts - 316 through 330 (of 686 total)