humbletechie
IS-IT--Management
Hi,
I am attempting to use the LIKE search function but it only works in certain cases. For example: If I search for Garcia it displays all results with the last name of Garcia, but if I type Judge Garcia it displays nothing. The first name in the DB is not judge but is there a way to display the Garcia results anyway? Below is my SQL statement.
"SELECT Atty_2_CaseNew.Short_Case, Cases.[Case No], Cases.Court, Atty_2_CaseNew.[Plntf/Def], Atty_2_CaseNew.Judge, Cases.Status, Atty_2_CaseNew.Attorney FROM Cases RIGHT JOIN Atty_2_CaseNew ON Cases.[Case ID] = Atty_2_CaseNew.[Case ID] WHERE Atty_2_CaseNew.Atty_ID Is Not Null AND Atty_2_CaseNew.Judge LIKE '%"&SearchTerms&"%' AND Cases.[File Date] >= #"&StartDate&"# AND Cases.[File Date] <= #"&EndDate&"#"
I am attempting to use the LIKE search function but it only works in certain cases. For example: If I search for Garcia it displays all results with the last name of Garcia, but if I type Judge Garcia it displays nothing. The first name in the DB is not judge but is there a way to display the Garcia results anyway? Below is my SQL statement.
"SELECT Atty_2_CaseNew.Short_Case, Cases.[Case No], Cases.Court, Atty_2_CaseNew.[Plntf/Def], Atty_2_CaseNew.Judge, Cases.Status, Atty_2_CaseNew.Attorney FROM Cases RIGHT JOIN Atty_2_CaseNew ON Cases.[Case ID] = Atty_2_CaseNew.[Case ID] WHERE Atty_2_CaseNew.Atty_ID Is Not Null AND Atty_2_CaseNew.Judge LIKE '%"&SearchTerms&"%' AND Cases.[File Date] >= #"&StartDate&"# AND Cases.[File Date] <= #"&EndDate&"#"