06-25-2011 10:54 AM
I would like to use an SQL query to return from a database the first occurence of a data value (DUT's serial number). I have a database that contains the DUT serial number, the test status (i.e. pass or fail), and the date the DUT was tested. Since I am trying to determine the first pass yield for this test lot of DUTs, I want to only query the database for the first occurence (i.e. earliest date DUT was tested), and retunr the test status for this entry. Any recommendations on what type of SQL commadn I could use to get this data?
Below is an example of the database:
DUT SN TEST STATUS DATE TESTED
001 Failed 6-1-2011
001 Passed 6-2-2011
002 Passed 6-1-2011
003 Passed 6-1-2011
004 Failed 6-2-2011
004 Passed 6-2-2011
005 Passed 6-2-2011
THis is the data I would like to extract:
DUT SN TEST STATUS DATE TESTED
001 Failed 6-1-2011
002 Passed 6-1-2011
003 Passed 6-1-2011
004 Failed 6-2-2011
005 Passed 6-2-2011
As you can see I only want to get the first entry for a serial number. This first entry will be used to determine the first pass yield for the lot of boards.
Thank you in advance for your time and assistance,
Jim
Solved! Go to Solution.
06-27-2011 06:00 AM
I don't believe you can do one query to get what you want. I use this query:
... and then process the results like this:
...to get first-pass yield information.
06-27-2011 09:41 AM
Hi Jim,
Thank you for the response. I am looking at your solution but I am having a difficult time trying to identify the VI you are using to get the distinct serial number (the Vi with the (1) underneath it in your diagram). Can you tell me the name of this VI? I am using LV 2010 if that makes any difference.
Thank you,
Jim
06-27-2011 09:50 AM
All of the green functions are OpenG VIs. The first one is Remove Duplicates From1D Array. They're all from the array pallet:
Here's how to get them.
06-27-2011 10:16 AM
Thanks Jim! I installed the OpenG library and give this a go later today. I'll let you know how I make it.
Thanks again,
Jim
06-29-2011 01:21 PM
Hi Jim,
Looks like your solution worked. Thank you very much for providing this information.
Best Regards,
Jim