Forum Replies Created

Viewing 15 posts - 121 through 135 (of 686 total)

  • Reply To: record loading

    Both systems involved are sql

    remote:2012

    Local:2016

    I'm removing the Linked server doing all of the ETL on remote than going to use BCP to transfer to Local..

     

  • Reply To: record loading

    No I created a staging table on remote server and doing the ETL there before moving dataset back to Local server,,

    Thanks.

  • Reply To: record loading

    Yes I changed the process to extract from remote machine first  ..

    Thanks for all comments and suggestions.

  • Reply To: record loading

    Since there are millions of records for each day..

    On Local server:

    Won't I have to find the max(t_stamp) for date  2/10/2022 and then Min(t_stamp) for 2/17/2022 then pass that into query(remote)

    so...

  • Reply To: record loading

    Looking for your responses to find that example, but am I correct with what I suggested above.

  • Reply To: record loading

    If I want to do between 2 dates example:

    2/11/2022 and 2/15/2022

    Would I have to get the max value of t_stamp for 2/10 then get the min value of t_stamp for...

  • Reply To: record loading

    I ended up with this as my query...

    Would there be any way to get the range of t_stamp values for 01-21-2022 thru 01-25-2022 and send that into query string rather...

  • Reply To: record loading

    I did this for both 12-21 and 12-26 .. then inserted into open query should this get me all records in that range.

     

    Thanks for help..

     

     

    SELECT DATEADD(second, DATEDIFF(second,...
  • Reply To: record loading

    I used that piece of code but just used DATE:

    ----===== Convert a given Date/Time to the "Old" and "New" UNIX Timestamps.

    DECLARE @GivenDateTime DATE = '2021-12-21'

    ;

    SELECT OldUnixTS=DATEDIFF (ss,'1970',@GivenDateTime) --Always based on...

  • Reply To: record loading

    I tried to use this Function and passed in my date that I want to start pulling information just for a test so I could verify results.

    SELECT dbo.UNIX_TIMESTAMP('12-21-2021 00:00:00');

    The Value...

  • Reply To: record loading

    So make call in open query to get the int value of  t_stamp then use that as the driver in query..

    sorry no 3rd server(rem) that was miss-step on my part..

    just...

  • Reply To: record loading

    rem server is SQL2012

    Local is sql2016

    Thanks.

  • Reply To: record loading

    correct

    It looks to me like t_stamp is a unix timestamp - except that you are offsetting that by 4 hours.  So maybe a unix timestamp stored as UTC where you...

  • Reply To: record loading

    Insert Into Tag_Data_Capture_staging
    (TagName,CaptureValue,DateRecorded)
    select *
    from OPENQUERY(srv1, 'select tagid,floatvalue,DATEADD(s,t_stamp/1000,''1969-12-31 20:00:00'') from rem.ignition.dbo.sqlt_data_1_2021_12
    where DATEADD(s,t_stamp/1000,''1969-12-31 20:00:00'') between ''12-09-2021'' AND ''12-10-2021'' and floatvalue is not null');

    I did the Insert to...

  • Reply To: record loading

    there are over 500 unique tag_ids

Viewing 15 posts - 121 through 135 (of 686 total)