Hvordan laves en forespørgsel der søger efter hele ord. LIKE '%" & soegefelt & "%' søger på alle ord som bare indeholder "soegefelt" ordkombinationen et eller andet sted i ordet.
I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
can we see the complete SQL? Or even better send your dB to ekspertn@santhell.dk and I will take a look. I need to know waht to look at if you do send it!
terry - what do you mean? Is it because it has to be complete words or what? Otherwise that should work - have it running in a DB myself where it looks up partial names.
soegefelt = Request.Form("soegefelt") strsrch = "*" & soegefelt & "*" "SELECT f_id, articles_main.main as main FROM articles_main WHERE articles_main.main LIKE '" & strsrch & "';"
Dette her virker stadig ikke. Nu returnerer den slet ingen resultater - også selvom de søgte ord eksisterer i tabellen. Jeg har altså brug for en forespørgsel der søger på hele ord og ikke på ord hvor ordkombinationen blot findes i en del af ordet.
soegefelt = Request.Form("soegefelt") strsrch = "*" & soegefelt & "*" "SELECT f_id, articles_main.main as main FROM articles_main WHERE articles_main.main LIKE '*" & strsrch & "*';"
trine> Its just come to my notice that you are using ASP and as this category is Access then there will be things which we may not be able to help with.
Concerning the SQL, try the following, if it desont work then you need to check the contents of sSQL to make sure that it is correct.
soegefelt = Request.Form("soegefelt")
strsrch = "%" & soegefelt & "%" sSQL = "SELECT f_id, articles_main.main as main FROM articles_main WHERE articles_main.main LIKE '" & strsrch & "'"
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.