Senin, 04 Februari 2019

Re: [MS_AccessPros] SQL problem

 

ps

if you want to eliminate " in the search string, you can do this:

'~~~~~~~~~~~~
if instr(sKeyWord, """") > 0 then
   sVariable = trim(replace(sKeyWord, """",""))
end if
'~~~~~~~~~~~~

remember to put two " in a string delimited with "

~crystal

On 2/4/2019 10:42 AM, crystal 8 strive4peace2008@yahoo.com
[MS_Access_Professionals] wrote:
> hi Valentino,
>
> you can use Instr to search for quotes, and then Replace " with "" if it
> has them
>
> ~crystal
>
> On 2/4/2019 1:24 AM, Valentino Avvisati valentino.avvisati@gmail.com
> [MS_Access_Professionals] wrote:
>> Dear all,
>> I need your help.
>> I have a procedure that select some records based on a query created with vba
>> The procedure take one variable string like
>> "Flower"
>> And extract the records that has "flower" in one specific fields.
>> Sometimes the string had some character that are also key word in sql string Like: flower "
>> This create problem in the procedure since """ is Not considered part of the string but part of sql command
>> Is there any possibility to isolate the string so that do not occur this problem?
>> I would like to avoid to clean the data before because the data entry is free and is always possible insert strange data.
>> Thank you
>>
>>
>>
>> Inviato by mobile phone
>>
>> ------------------------------------
>> Posted by: Valentino Avvisati <valentino.avvisati@gmail.com>
>> ------------------------------------
>>
>>
>> ------------------------------------
>>
>> Yahoo Groups Links
>>
>>
>>
>
> ------------------------------------
> Posted by: crystal 8 <strive4peace2008@yahoo.com>
> ------------------------------------
>
>
> ------------------------------------
>
> Yahoo Groups Links
>
>
>

__._,_.___

Posted by: crystal 8 <strive4peace2008@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (10)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


SPONSORED LINKS
.

__,_._,___

Tidak ada komentar:

Posting Komentar