<% @Language = "VBScript" %> <% cat = "ana" %> <% SearchClass = request.querystring("sc") SearchMan = request.querystring("co") SearchUID = request.querystring("tester") 'IF SearchASS = "" THEN 'SearchASS = "[a-z]%" 'END IF IF SearchClass = "" THEN SearchClass = request.form("SearchClass") END IF commaplaceCLASS = InStr(SearchClass,",") IF commaplaceCLASS <> 0 THEN commaplaceCLASS = commaplaceCLASS +1 ' add to delete comma too SearchClass = Mid(SearchClass,commaplaceCLASS) ' return all after comma place END IF IF SearchClass = "" THEN SearchClass = "all" END IF IF SearchMan = "A" THEN ' fix SearchMan = "A&T" END IF IF SearchMan = "B" THEN ' fix SearchMan = "B&E Scientific" END IF IF SearchMan = "J" THEN ' J&J fix SearchMan = "J&J" END IF IF SearchMan = "" THEN SearchMan = request.form("SearchMan") END IF IF SearchMan = "" THEN SearchMan = "all" END IF commaplaceMAN = InStr(SearchMan,",") IF commaplaceMAN <> 0 THEN commaplaceMAN = commaplaceMAN +1 ' add to delete comma too SearchMan = Mid(SearchMan,commaplaceMAN) ' return all after comma place END IF SearchClass = Trim(SearchClass) SearchMan = Trim(SearchMan) ' SearchASS split and count Assays 1-5 SearchASS = request.form("SearchASS") SearchASSfunc = request.form("SearchASS") SearchASSfunc = replace (SearchASSfunc, ", ",",") strArray = Split(SearchASS,",") Dim i For i = 0 to Ubound(strArray) IF (i) = 0 THEN SearchASS = TRIM(strArray(i)) iJoinLIST = SearchASS ELSEIF (i) = 1 THEN SearchASS2 = TRIM(strArray(i)) iJoin = 2 iJoinLIST = iJoinLIST & ", " & SearchASS2 ELSEIF (i) = 2 THEN SearchASS3 = TRIM(strArray(i)) iJoinLIST = iJoinLIST & ", " & SearchASS3 iJoin = 3 ELSEIF (i) = 3 THEN SearchASS4 = TRIM(strArray(i)) iJoinLIST = iJoinLIST & ", " & SearchASS4 iJoin = 4 ELSEIF (i) = 4 THEN SearchASS5 = TRIM(strArray(i)) iJoinLIST = iJoinLIST & ", " & SearchASS5 iJoin = 5 ELSEIF (i) = 5 THEN SearchASS5 = TRIM(strArray(i)) iJoinLIST = iJoinLIST & ", " & SearchASS5 iJoin = 6 ELSEIF (i) = 6 THEN SearchASS5 = TRIM(strArray(i)) iJoinLIST = iJoinLIST & ", " & SearchASS5 iJoin = 7 ELSEIF (i) = 7 THEN SearchASS5 = TRIM(strArray(i)) iJoinLIST = iJoinLIST & ", " & SearchASS5 iJoin = 8 ELSEIF (i) = 8 THEN SearchASS5 = TRIM(strArray(i)) iJoinLIST = iJoinLIST & ", " & SearchASS5 iJoin = 9 ELSEIF (i) = 9 THEN SearchASS5 = TRIM(strArray(i)) iJoinLIST = iJoinLIST & ", " & SearchASS5 iJoin = 10 ELSEIF (i) = 10 THEN SearchASS5 = TRIM(strArray(i)) iJoinLIST = iJoinLIST & ", " & SearchASS5 iJoin = 11 END IF Next %> Analyzer Search

Analyzer Search

<% ' ================== Declare SQL Query =============== IF SearchASS = "" THEN IF SearchClass = "all" AND SearchMan = "all" THEN strSQL = "SELECT * FROM SearchProductSelectionList WHERE MarketPublish = 'Yes' ORDER BY DiamondPN ASC;" ELSEIF SearchClass <> "all" AND SearchMan = "all" THEN strSQL = "SELECT * FROM SearchProductSelectionList WHERE Classification = '" & SearchClass &"' AND MarketPublish = 'Yes' ORDER BY DiamondPN ASC;" ELSEIF SearchClass = "all" AND SearchMan <> "all" THEN strSQL = "SELECT * FROM SearchProductSelectionList WHERE ProductBrand LIKE '" & SearchMan &"' AND MarketPublish = 'Yes' ORDER BY DiamondPN ASC;" ' test Urinalysis ' ELSEIF SearchClass = "Urinalysis" THEN ' strSQL = "SELECT * FROM SearchProductSelectionList ORDER BY DiamondPN ASC;" ELSE strSQL = "SELECT * FROM SearchProductSelectionList WHERE Classification = '" & SearchClass &"' AND ProductBrand LIKE '" & SearchMan &"' AND MarketPublish = 'Yes' ORDER BY DiamondPN ASC;" END IF ELSE ' Assays have been chosen IF SearchMan = "all" THEN SearchManJ = "[a-z]%" ELSE SearchManJ = SearchMan END IF IF SearchClass = "all" THEN SearchClassJ = "[a-z]%" ELSE SearchClassJ = SearchClass END IF ' ================== Declare SQL Query =============== IF iJoin= 2 THEN strSQL = "SELECT a.DiamondPN, a.ModelNumber, a.ProductBrand, a.Classification FROM " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay = '" & SearchASS & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') a " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay = '" & SearchASS2 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') b " strSQL = strSQL & " ON a.DiamondPN = b.DiamondPN " strSQL = strSQL & " ORDER by DiamondPN ASC ; " ELSEIF iJoin= 3 THEN strSQL = "SELECT a.DiamondPN, a.ModelNumber, a.ProductBrand, a.Classification FROM " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') a " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS2 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') b " strSQL = strSQL & " ON a.DiamondPN = b.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS3 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') c " strSQL = strSQL & " ON a.DiamondPN = c.DiamondPN " strSQL = strSQL & " ORDER by DiamondPN ASC ; " ELSEIF iJoin= 4 THEN strSQL = "SELECT a.DiamondPN, a.ModelNumber, a.ProductBrand, a.Classification FROM " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') a " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS2 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') b " strSQL = strSQL & " ON a.DiamondPN = b.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS3 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') c " strSQL = strSQL & " ON a.DiamondPN = c.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS4 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') d " strSQL = strSQL & " ON a.DiamondPN = d.DiamondPN " strSQL = strSQL & " ORDER by DiamondPN ASC ; " ELSEIF iJoin= 5 THEN strSQL = "SELECT a.DiamondPN, a.ModelNumber, a.ProductBrand , a.Classification FROM " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') a " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS2 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') b " strSQL = strSQL & " ON a.DiamondPN = b.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS3 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') c " strSQL = strSQL & " ON a.DiamondPN = c.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS4 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') d " strSQL = strSQL & " ON a.DiamondPN = d.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') e " strSQL = strSQL & " ON a.DiamondPN = e.DiamondPN " strSQL = strSQL & " ORDER by DiamondPN ASC ; " ELSEIF iJoin= 6 THEN strSQL = "SELECT a.DiamondPN, a.ModelNumber, a.ProductBrand , a.Classification FROM " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') a " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS2 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') b " strSQL = strSQL & " ON a.DiamondPN = b.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS3 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') c " strSQL = strSQL & " ON a.DiamondPN = c.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS4 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') d " strSQL = strSQL & " ON a.DiamondPN = d.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') e " strSQL = strSQL & " ON a.DiamondPN = e.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') f " strSQL = strSQL & " ON a.DiamondPN = f.DiamondPN " strSQL = strSQL & " ORDER by DiamondPN ASC ; " ELSEIF iJoin= 7 THEN strSQL = "SELECT a.DiamondPN, a.ModelNumber, a.ProductBrand , a.Classification FROM " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') a " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS2 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') b " strSQL = strSQL & " ON a.DiamondPN = b.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS3 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') c " strSQL = strSQL & " ON a.DiamondPN = c.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS4 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') d " strSQL = strSQL & " ON a.DiamondPN = d.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') e " strSQL = strSQL & " ON a.DiamondPN = e.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') f " strSQL = strSQL & " ON a.DiamondPN = f.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') g " strSQL = strSQL & " ON a.DiamondPN = g.DiamondPN " strSQL = strSQL & " ORDER by DiamondPN ASC ; " ELSEIF iJoin= 8 THEN strSQL = "SELECT a.DiamondPN, a.ModelNumber, a.ProductBrand , a.Classification FROM " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') a " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS2 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') b " strSQL = strSQL & " ON a.DiamondPN = b.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS3 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') c " strSQL = strSQL & " ON a.DiamondPN = c.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS4 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') d " strSQL = strSQL & " ON a.DiamondPN = d.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') e " strSQL = strSQL & " ON a.DiamondPN = e.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') f " strSQL = strSQL & " ON a.DiamondPN = f.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') g " strSQL = strSQL & " ON a.DiamondPN = g.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') h " strSQL = strSQL & " ON a.DiamondPN = h.DiamondPN " strSQL = strSQL & " ORDER by DiamondPN ASC ; " ELSEIF iJoin= 9 THEN strSQL = "SELECT a.DiamondPN, a.ModelNumber, a.ProductBrand , a.Classification FROM " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') a " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS2 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') b " strSQL = strSQL & " ON a.DiamondPN = b.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS3 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') c " strSQL = strSQL & " ON a.DiamondPN = c.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS4 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') d " strSQL = strSQL & " ON a.DiamondPN = d.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') e " strSQL = strSQL & " ON a.DiamondPN = e.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') f " strSQL = strSQL & " ON a.DiamondPN = f.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') g " strSQL = strSQL & " ON a.DiamondPN = g.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') h " strSQL = strSQL & " ON a.DiamondPN = h.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') k " strSQL = strSQL & " ON a.DiamondPN = k.DiamondPN " strSQL = strSQL & " ORDER by DiamondPN ASC ; " ELSEIF iJoin= 10 THEN strSQL = "SELECT a.DiamondPN, a.ModelNumber, a.ProductBrand , a.Classification FROM " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') a " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS2 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') b " strSQL = strSQL & " ON a.DiamondPN = b.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS3 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') c " strSQL = strSQL & " ON a.DiamondPN = c.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS4 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') d " strSQL = strSQL & " ON a.DiamondPN = d.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') e " strSQL = strSQL & " ON a.DiamondPN = e.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') f " strSQL = strSQL & " ON a.DiamondPN = f.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') g " strSQL = strSQL & " ON a.DiamondPN = g.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') h " strSQL = strSQL & " ON a.DiamondPN = h.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') k " strSQL = strSQL & " ON a.DiamondPN = k.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') l " strSQL = strSQL & " ON a.DiamondPN = l.DiamondPN " strSQL = strSQL & " ORDER by DiamondPN ASC ; " ELSEIF iJoin= 11 THEN strSQL = "SELECT a.DiamondPN, a.ModelNumber, a.ProductBrand , a.Classification FROM " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') a " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & " (SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS2 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') b " strSQL = strSQL & " ON a.DiamondPN = b.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS3 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') c " strSQL = strSQL & " ON a.DiamondPN = c.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS4 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') d " strSQL = strSQL & " ON a.DiamondPN = d.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') e " strSQL = strSQL & " ON a.DiamondPN = e.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') f " strSQL = strSQL & " ON a.DiamondPN = f.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') g " strSQL = strSQL & " ON a.DiamondPN = g.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') h " strSQL = strSQL & " ON a.DiamondPN = h.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') k " strSQL = strSQL & " ON a.DiamondPN = k.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') l " strSQL = strSQL & " ON a.DiamondPN = l.DiamondPN " strSQL = strSQL & " INNER JOIN " strSQL = strSQL & "(SELECT DISTINCT DiamondPN, ModelNumber, ProductBrand, Classification FROM SearchProductTestAssays WHERE TestAssay='" & SearchASS5 & "' AND ProductBrand LIKE '" & SearchManJ & "' AND Classification LIKE '" & SearchClassJ & "' AND MarketPublish = '1') m " strSQL = strSQL & " ON a.DiamondPN = m.DiamondPN " strSQL = strSQL & " ORDER by DiamondPN ASC ; " ELSE ' strSQL = "SELECT DISTINCT DiamondPN, Classification, ModelNumber, ProductBrand from SearchProductTestAssays WHERE TestAssay = '" & SearchASS & "' AND ProductBrand = '" & SearchMan & "' AND Classification = '" & SearchClass & "' AND MarketPublish = '1' ORDER by DiamondPN ASC ;" IF SearchClass = "all" AND SearchMan = "all" THEN strSQL = "SELECT DISTINCT DiamondPN, Classification, ModelNumber, ProductBrand from SearchProductTestAssays WHERE TestAssay = '" & SearchASS & "' AND MarketPublish = '1' ORDER by DiamondPN ASC ;" ELSEIF SearchClass = "all" AND SearchMan <> "all" THEN strSQL = "SELECT DISTINCT DiamondPN, Classification, ModelNumber, ProductBrand from SearchProductTestAssays WHERE TestAssay = '" & SearchASS & "' AND ProductBrand = '" & SearchMan & "' AND MarketPublish = '1' ORDER by DiamondPN ASC ;" ELSEIF SearchClass <> "all" AND SearchMan = "all" THEN strSQL = "SELECT DISTINCT DiamondPN, Classification, ModelNumber, ProductBrand from SearchProductTestAssays WHERE TestAssay = '" & SearchASS & "' AND Classification = '" & SearchClass & "' AND MarketPublish = '1' ORDER by DiamondPN ASC ;" ELSE strSQL = "SELECT DISTINCT DiamondPN, Classification, ModelNumber, ProductBrand from SearchProductTestAssays WHERE TestAssay = '" & SearchASS & "' AND ProductBrand = '" & SearchMan & "' AND Classification = '" & SearchClass & "' AND MarketPublish = '1' ORDER by DiamondPN ASC ;" END IF END IF END IF ' ================== Set SQL Query for retrieving search results =============== ' FUNC Stuff ======================= 'IF SearchClass = "all" THEN ' SearchClass = "Blood Gas,Electrolyte,Chemistry,Immunology,Hematology,Coagulation" 'END IF 'IF SearchMan = "all" THEN ' SearchMan = SearchManfunc 'END IF 'strSQL = "select * from dbo.fncRetrInstr('" & SearchClass & "','" & SearchMan & "','" & SearchASSfunc & "') order by DiamondPN ASC ;" 'strSQL = "select * from dbo.fncRetrInstr('Electrolyte','BioMaxima,Audicom','Calcium (Ca),Chloride (Cl),pH')" 'Response.Write(strSQL) ' / FUNC Stuff ======================= %>
Analyzer Type:
<% ' count OEMs IF SearchClass = "all" THEN strSQL = "SELECT DISTINCT ProductBrand from SearchProductSelectionList WHERE MarketPublish = 'Yes' ORDER by ProductBrand ASC;" ELSE strSQL = "SELECT DISTINCT ProductBrand from SearchProductSelectionList WHERE MarketPublish = 'Yes' AND Classification IN('" & SearchClass &"') ORDER by ProductBrand ASC;" END IF ' ================== Open Recordset / Return Records =============== oRS.Open strSQL,oConn ' ================== Data Found? =============== If oRS.EOF Then OEMcount = 0 Else ' ================== Data Found Yes =============== OEMcount = 0 'loop through the fields Do While NOT oRS.Eof IF OEMcount = 0 THEN SearchManfunc = oRS("ProductBrand") ELSE SearchManfunc = SearchManfunc & "," & oRS("ProductBrand") END IF OEMcount = OEMcount +1 oRS.MoveNext Loop End If ' ================== Close Conn / Recordset =============== oRS.Close %> Product Brands:
") Else ' ================== Data Found Yes =============== Response.Write("") 'loop through the fields Do While NOT oRS.Eof Response.write " " 'Move to the next record in the recordset oRS.MoveNext Loop Response.write " " End If ' ================== Close Conn / Recordset =============== oRS.Close %>
<% SearchMan = Trim(SearchMan) ' ================== Declare SQL Query =============== IF SearchClass = "all" AND SearchMan = "all" THEN strSQL = "SELECT DISTINCT TestAssay FROM SearchProductTestAssays WHERE MarketPublish = '1' ORDER by TestAssay ASC ; " ASSAYtitle = "All Types / All Brands" ELSEIF SearchClass <> "all" AND SearchMan = "all" THEN strSQL = "SELECT DISTINCT TestAssay FROM SearchProductTestAssays WHERE Classification = '" & SearchClass &"' AND MarketPublish = '1' ORDER by TestAssay ASC ; " ASSAYtitle = SearchClass & " / All Brands" ELSEIF SearchClass = "all" AND SearchMan <> "all" THEN strSQL = "SELECT DISTINCT TestAssay FROM SearchProductTestAssays WHERE ProductBrand = '" & SearchMan &"' AND MarketPublish = '1' ORDER by TestAssay ASC ; " ASSAYtitle = "All Types / " & SearchMan ELSE strSQL = "SELECT DISTINCT TestAssay FROM SearchProductTestAssays WHERE ProductBrand = '" & SearchMan &"' AND Classification = '" & SearchClass &"' AND MarketPublish = '1' ORDER by TestAssay ASC ; " ASSAYtitle = SearchClass & " / " & SearchMan END IF ' ================== Open Recordset / Return Records =============== oRS.Open strSQL,oConn rowc = 0 'loop through the fields If oRS.EOF Then Response.write "

No Results

" Else Do While NOT oRS.Eof rowc = rowc +1 TestAssay = oRS("TestAssay") oRS.MoveNext Loop END IF NUMASS = rowc NUMASSCOL = INT(NUMASS/2) + 1 oRS.Close %> Assay Selection:
Narrow Results from these (<%= NUMASS %>) listed
<% oRS.Open strSQL,oConn ' ================== Data Found? =============== If oRS.EOF Then Response.write "

No Results

" Else ' ================== Data Found Yes =============== Response.write "" Response.write "
" row = 1 rowc = 0 'loop through the fields Do While NOT oRS.Eof rowc = rowc +1 TestAssay = oRS("TestAssay") ' Classification = oRS("Classification") Response.write "
" If rowc= NUMASSCOL THEN 'create 2nd row ' Response.write "
" rowc=0 END IF 'Move to the next record in the recordset oRS.MoveNext Loop Response.write "
" End If ' ================== Close Conn / Recordset =============== oRS.Close %>

<% IF Session("FAVcount") = "" THEN %> <% ELSEIF Session("FAVcount") = "1" THEN %> (1) item saved   <% ELSE %> (<%= Session("FAVcount") %>) items saved   <% END IF %>
<% FAVLIST = Session("FAVORITES") IF FAVLIST <> "" THEN Response.write "
" 'FAVLIST = Replace(FAVLIST,",","
") ' list all favs strArray = Split(FAVLIST,",") Dim ix For ix = 0 to Ubound(strArray) PNlist = TRIM(strArray(ix)) ' Response.Write PNlist strSQL = "SELECT Manufacturer, ModelNumber, Classification, DiamondPN from SearchProductSelectionList WHERE DiamondPN = '" & PNlist &"' ORDER BY ModelNumber ASC ;" oRS.Open strSQL,oConn If oRS.EOF Then Response.Write(" ") Else Manufacturer = oRS("Manufacturer") ModelNumber = oRS("ModelNumber") Classification = oRS("Classification") ' Response.write ("   " & Manufacturer &" - "& ModelNumber &", "& Classification &"
" ) ' Response.write ("   " & Manufacturer &" - "& ModelNumber &"
" ) Response.write ("   X - " & Manufacturer &" - "& ModelNumber &"
" ) END IF oRS.Close Next Response.write "
" END IF %> <% IF FAVLIST <> "" THEN %>

<% END IF %>
<% ' COUNTER oRS.Open strSQL,oConn rowc = 0 Do While NOT oRS.Eof rowc = rowc +1 oRS.MoveNext Loop GRIDCOUNT= rowc oRS.Close ' / counter ' ================== Open Recordset / Return Records =============== oRS.Open strSQL,oConn ' ================== Data Found? =============== If oRS.EOF Then Response.Write("

No Analyzers Match These Assay Selections

") Response.Write("

"& iJoinLIST &"

") Response.Write("Some Assays are specific to certain Types and Brands of Analyzers.

Please choose a different group of Assays, or change Type or Brand.

") Else TITLEtype= SearchClass IF TITLEtype = "all" THEN TITLEtype= "All" END IF TITLEbrand= SearchMan IF TITLEbrand = "all" THEN TITLEbrand= "All" END IF TITLEass= iJoinLIST IF TITLEass = "" THEN TITLEass= "All" END IF 'Response.Write("
Total Results: " & GRIDCOUNT & " ") IF Session("FAVcount") = "" THEN Session("FAVcount") = 0 END IF %>
<% IF GRIDCOUNT >1 THEN Response.Write("

Results: (" & GRIDCOUNT & ") items available, " ) ELSE Response.Write("

Results: (1) item available, " ) END IF IF Session("FAVcount") = "" THEN %> ,no items saved. <% ELSEIF Session("FAVcount") = "1" THEN %> (1) item saved   <% ELSE %> (<%= Session("FAVcount") %>) items saved   <% END IF IF TITLEass = "All" THEN Response.Write("
Assay Selection:
All

") ELSE Response.Write("
Assay Selection:
" & TITLEass & "

") END IF Response.Write("") %>
<% ' ================== Data Found Yes =============== Response.write "" Response.write "" Response.write "" Response.write "" Response.write "" Response.write "" Response.write "" Response.write "" row = 1 rowc = 0 'loop through the fields Do While NOT oRS.Eof rowc = rowc +1 If row=1 THEN Response.write "" ELSE Response.write "" END IF PID= Server.URLEncode(oRS("DiamondPN"))' URL Encodes fixes chars + Response.write " " Response.write "" Response.write " " ' Detect DD Products IF PID = "0%2DDD%2DSMARTLYTE" THEN Response.write " " ELSEIF PID = "0%2DDD%2DPROLYTE" THEN Response.write " " ELSEIF PID = "0%2DDD%2DCARELYTE" THEN Response.write " " ELSE Response.write "" END IF Response.write "" If row=1 THEN row=(row-1) ELSE row=(row+1) END IF 'Move to the next record in the recordset oRS.MoveNext Loop Response.write "
TypeBrandModelFavorites 
" Response.write oRS("Classification") Response.write " " Response.write oRS("ProductBrand") Response.write " " Response.write oRS("ModelNumber") & " " %> <% IF fifv > 0 THEN 'remove button Response.write "
" Response.write "" Response.write "" Response.write "" Response.write "" Response.write "" Response.write "
" ELSE ' save button Response.write "
" Response.write "" Response.write "" Response.write "" Response.write "" Response.write "" Response.write "
" END IF Response.write "
SpecificationsSpecificationsSpecificationsSpecifications
" End If ' Response.Write "

" & (strSQL) & "

" ' ================== Close Conn / Recordset =============== oRS.Close Set oRS=nothing oConn.Close Set oConn=nothing %>