Sto lavorando per unire due tabelle JMP.
Tutti i dati si uniscono correttamente, tranne una riga. Ho controllato per assicurarsi che siano copiati uguali e abbiano le stesse caratteristiche, e ho usato i flag di corrispondenza per confermare quale tabella sta causando l'errore. Anche se ho determinato quale tavolo è il problema, non sono ancora sicuro del perché?
Tabella 1:
New SQL Query(
QueryName( "1. Curd xfer with time offsets" ),
CustomSQL(
"SET NOCOUNT ON
DECLARE @StartDate DateTime
DECLARE @EndDate DateTime
SET @StartDate = '20170115 00:00:00.000'
SET @EndDate = '20170122 00:00:00.000'
SET NOCOUNT OFF
SELECT * FROM (
SELECT History.TagName, DateTime, Value, vValue, StartDateTime
FROM History
WHERE History.TagName IN ('DAL.CP5.CHEESE.CVSTATUS.CURD_XFER_VAT')
AND wwRetrievalMode = 'Cyclic'
AND wwResolution = 30000
AND wwVersion = 'Latest'
AND DateTime >= @StartDate
AND DateTime <= @EndDate) temp WHERE temp.StartDateTime >= @StartDate"
)
) << Run;
While (try(dt1<<GET name=""></GET>
Tabella dati 2:
New SQL Query(
QueryName( "3. Tags with Values" ),
CustomSQL(
"SET NOCOUNT ON
DECLARE @StartDate DateTime
DECLARE @EndDate DateTime
SET @StartDate = '20170115 00:00:00.000'
SET @EndDate = '20170122 00:00:00.000'
SET NOCOUNT OFF
SELECT * FROM (
SELECT History.TagName, DateTime, Value, vValue, StartDateTime
FROM History
WHERE History.TagName IN
('DAL.CP5.CHEESE.CCB01.LT_01684_RAW', 'DAL.CP5.CHEESE.CCB01.LT_01685_RAW', 'DAL.CP5.CHEESE.CCB01.LT_01686_RAW', 'DAL.CP5.CHEESE.CCB01.LT_01687_RAW', 'DAL.CP5.CHEESE.CCB01.LT_01688_RAW', 'DAL.CP5.CHEESE.CCB01.TIC_01510_PV', 'DAL.CP5.CHEESE.CCB01.FIC_01410_PV', 'DAL.CP5.CHEESE.CVSTATUS.CURD_XFER_VAT', 'DAL.CP5.CHEESE.CCB01.LT_01662_RAW','DAL.CP5.CHEESE.CCB01.TE_01590', 'DAL.CP5.CHEESE.CVSTATUS.CURD_XFER_RECIPE', 'DAL.CP5.CHEESE.CCB01.LT_01652_RAW', 'DAL.CP5.CHEESE.CCB01.LT_01662_RAW', 'DAL.CP5.CHEESE.CCB01.LT_01686_RAW', 'DAL.CP5.CHEESE.CCB01.CTK02010.MCCB_02310A_RAW', 'DAL.CP5.CHEESE.CCB01.CTK02020.MCCB_02320A_RAW', 'DAL.CP5.CHEESE.CCB01.CTK02030.MCCB_02330A_RAW', 'DAL.CP5.CHEESE.CCB01.CTK02040.MCCB_02340A_RAW', 'DAL.CP5.CHEESE.CCB01.CTK02050.MCCB_02350A_RAW', 'DAL.CP5.CHEESE.CCT01.CURD_LT', 'DAL.CP5.CHEESE.CCB01.PRGM_BELT_STOP_CTR1_ACC', 'DAL.CP5.CHEESE.CCB01.PRGM_BELT_STOP_ACC', 'DAL.CP5.CHEESE.CCB01.LT_01672_RAW')
AND wwRetrievalMode = 'Cyclic'
AND wwResolution = 30000
AND wwVersion = 'Latest'
AND DateTime >= @StartDate
AND DateTime <= @EndDate) temp WHERE temp.StartDateTime >= @StartDate"
)
) << Run;
While (try(dt3<<GET name=""></GET>
I dati che non vengono trasferiti sono per DAL.CP5.CHEESE.CCB01.LT_01672_RAW.
Qualcuno può aiutare?
Grazie!
Ciao,
Guardando velocemente i tuoi script vedo che hai una colonna definita due volte ( DAL.CP5.CHEESE.CCB01.LT_01672_RAW)
JMP aggiungerà un suffisso numerico al nome ripetuto della colonna. Nel tuo caso, "DAL.CP5.CHEESE.CCB01.LT_01672_RAW 2"
Quindi la tua tabella di dati in pila probabilmente non produrrà l'output che ti aspetti.
Se è possibile fornire campioni di ciascuna delle tre tabelle di dati, possiamo contribuire a restringere ulteriormente il problema.
--Stan
stack probabilmente non produce quello che ti aspetti
Si noti che si crea la stessa colonna due volte