Access and blitz

Miscellaneous Forums/General Discussion/Access and blitz

I'm not exactly using these together, but i'm using Access to organise a database etc.

However it seems very limited. All i'm wanting to do is check for the existance of a string within another.

For example:

Does "hello big world" have the word "big" in it.

My only idea is something like:

Left( right( [misc_],(len - instr("b"))) , 3)

Which should start from the right and find the character "b" and return a number, and produce a string from this character to the end of this string, which in turn will get LEFT'ed from this start of this newly created string, to 3 characters LEFT.

Confusing? Yes. Cause it doesn't work. Is there any easier way in Access of searching a string within a string? Or is this another Visual Basic task...

This is for a query btw.

The command Instr (string1$, string2$, offset) searches for the occurrance of String2 into String1 and then returns the offset of the string found. Since it returns 0 only if it doesn't find the occurrance, this function also tells if the string has been found or not.

EDIT: Oh, but you're not talking about blitz products it seems... anyway, the instr command works similarly in access too.
It looks like Instr(StartOffset, string1, string2, CompareConstant [vbTextCompare in this case])

Hmm, apologies there then. I tried putting in a string larger than 1 character and it produced an error. Hmmmm, i'll beaver away on that. Thanks again man.

http://office.microsoft.com/en-us/access/HA012288571033.aspx

select * from table_name where misc_ like "%big%" ? Or something similar.

Cheers guys, i reckon it's working now :o)