Viewing 15 posts - 121 through 135 (of 686 total)
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..
January 5, 2023 at 5:53 pm
No I created a staging table on remote server and doing the ETL there before moving dataset back to Local server,,
Thanks.
January 5, 2023 at 3:55 pm
Yes I changed the process to extract from remote machine first ..
Thanks for all comments and suggestions.
January 5, 2023 at 11:49 am
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...
January 4, 2023 at 11:38 pm
Looking for your responses to find that example, but am I correct with what I suggested above.
January 4, 2023 at 8:15 pm
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...
January 4, 2023 at 4:04 pm
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...
January 4, 2023 at 12:26 pm
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,...
December 15, 2022 at 7:29 pm
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...
December 15, 2022 at 6:13 pm
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...
December 15, 2022 at 12:12 am
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...
December 14, 2022 at 12:44 pm
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...
December 13, 2022 at 9:37 pm
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...
December 13, 2022 at 12:24 pm
Viewing 15 posts - 121 through 135 (of 686 total)