forked from dougthor42/jmp_jsl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQuery Lot IDs.jsl
41 lines (33 loc) · 900 Bytes
/
Query Lot IDs.jsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//!
// Line 1 makes script run on open.
Names Default To Here(1);
conn = "DSN=Reedholm_x64;UID=owt_read;PWD=owtread;APP=JMP;WSID=THORIUM;DATABASE=RIWEBSQL";
sqlString1 = "
SELECT
a.Lot_ID,
a.Lot_Name,
a.Locked AS 'Complete',
b.Device_Name,
a.Date_Time,
a.Finish_DT,
a.Device_ID,
a.Device_Version,
a.Process_ID,
a.User_ID,
a.Tester_ID,
a.Step_ID
FROM dbo.Tested_Lots AS a
INNER JOIN dbo.Device_Names AS b
ON a.Device_ID = b.Device_ID
";
dt1 = Open Database(conn, sqlString1, "Reedholm Lot IDs");
dt1 << Sort(
Replace Table,
By(:Lot_ID),
Order(Descending)
);
dt1 << Delete Table Property("Save To DB");
// Recode the "Complete?" column to Yes (U: Unlocked) and No (E: ???)
Current Data Table() << Begin Data Update;
For Each Row( :Complete = Match( :Complete, "U", "Yes", "E", "No", :Complete ) );
Current Data Table() << End Data Update;