cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Choose Language Hide Translation Bar
View Original Published Thread

JSL fetching records 3x from SQL database

zathe
Level I

Hiya guys!  I'm querying a boat load of historical data and I've noticed that the fetching rows pop up counts up to about 3x the number of rows that load (number of rows that load is approx. correct).  I'm getting data 1 month at a time (it breaks if I ask for more) and the data logger runs just over 1Hz which means I should get around 2.5e6 rows at a time but the system says it fetches 7.5e6 rows

 

Here is the snippet of code that does the query

Open Database(
	"driver={SQL Server}; Server=XXXXXXXXXX; database=Runtime; trusted_connection=yes;",
	"SET NOCOUNT ON
	DECLARE @StartDate DateTime
	DECLARE @EndDate DateTime  
	SET @StartDate = '2023-5-1 00:00:00' 
	SET @EndDate = '2023-5-31 23:59:59'
	SELECT temp.TagName, DateTime = convert(varchar, DateTime, 126), vValue From (
	SELECT * FROM History WHERE History.TagName IN (" || tagnamelist || ")
	
	AND vValue IS NOT NULL 
	AND wwRetrievalMode = 'Delta'
	AND wwVersion = 'Latest'
	AND DateTime >= @StartDate
	AND DateTime <= @EndDate) temp
	LEFT JOIN AnalogTag ON AnalogTag.TagName = temp.TagName
	LEFT JOIN EngineeringUnit ON AnalogTag.EUKey = EngineeringUnit.EUKey
	LEFT JOIN QualityMap ON QualityMap.QualityDetail = temp.QualityDetail
	WHERE temp.StartDateTime >= @StartDate"
);

And the screen capture of the pop up near the end of the query

Capture.PNG

 

Cheers,

Zach

1 REPLY 1


Re: JSL fetching records 3x from SQL database

Going through old posts with no replies, I see this is one which is quite hard to answer for the community due to reproducibility. I guess the issue does not exist anymore, got resolved or has been worked around, or even still exists which would be a pitty. . 

 

However, these kind of questions seem to be best to send to Technical Support support@jmp.com so they can help you identify the root cause of this behavior.  

 

And if you want to get an A+ grade, in case it has been resolved post this with the solution to the community so the others who run into this can benefit from your experience

 

Happy JMP-ing

/****NeverStopLearning****/