开发者

error wrong number of arguments

this query is giving me error. I am looking for two similar letters in the 2 tables

SELECT clients.ClinicName, clinics.clinicName, 
       clinics.ClientID, clients.[Clinic ID]  
FROM clients, clinics  
WHERE Left(clients.ClinicName, Instr(Instr(clients.ClinicName," ")  
+1,clients.ClinicName," ")-1) 开发者_C百科= Left(Instr(clinics.clinicName," ")  
+1,clinics.clinicName, Instr(clinics.clinicName," ")-1);  

Thanks


Left(str, count) requires a string and an integer count, and InStr(str, substr) requires a string and a substring, returning an integer.

Reformatting your sample, you can see that the number of parameters and types of parameters don't match:

WHERE Left(clients.ClinicName,
           Instr(Instr(clients.ClinicName," ")+1,
                 clients.ClinicName," ")-1) =
      Left(Instr(clinics.clinicName," ")+1,
           clinics.clinicName,
           Instr(clinics.clinicName," ")-1);

I believe you want something like this (but I can't guess your intent):

WHERE Left(clients.ClinicName, Instr(clients.ClinicName," ")-1) =
      Left(clinics.clinicName, Instr(clinics.clinicName," ")-1);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜