
I have JMP 16 but and have no issues with my JMP addin query working. JMP 15 users have an error when running the below and don't get the table.
Open Database(
"DSN=PI SQL Connection Lab;Description=PI SQL Connection Lab;UID=;Trusted_Connection=Yes;APP=JMP;WSID=SFX-5GCN2M1;DATABASE=LabData",
"select t.* from (select t.*, row_number() over (partition by SiteID, TimeStamp order by (select null)) as seqnum FROM dbo.CornOilManualEntryDataAvgsAll t WHERE t.\!"TimeStamp\!" >= DATEADD(d, -365, getdate())) t where seqnum = 1",
" Year dbo.CornOilManualEntryDataAvgsAll ORDER BY dbo.CornOilManualEntryDataAvgsAll.TimeStamp, dbo.CornOilManualEntryDataAvgsAll.SiteID",
"Year Manual Data"
);
// Change column info: TimeStamp
Data Table( "Year Manual Data" ):TimeStamp << Data Type(
Numeric,
Format( "yyyy-mm-ddThh:mm:ss", 19, 0 ),
Input Format( "yyyy-mm-ddThh:mm:ss", 0 ),
Format( "m/d/y h:m", 19 )
) << Set Modeling Type( "Continuous" );I am surprised that this function call ever works. It takes 3 arguments, not 4 arguments. The first argument is for the connection. The second argument is the SQL. The third and optional argument is the name of the resulting data table.