sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
mark.cockburn@honeywell.com's Avatar

MS Access query returns many rows in preview but 0 on run (execute)


Question posted by: mark.cockburn@honeywell.com (Guest) on July 13th, 2006 08:55 AM
When i run the following query on my table it returns 0 rows but when i
run it in the preview mode (where the update is applied) more then 2000
records are returned.

UPDATE dbo_ISRTEST SET dbo_ISRTEST.Product = "Gure"
WHERE (((dbo_ISRTEST.Product) Like '%station%'));

If I change the Like to be just = as below then everything works so it
seems to be something about the Like statement.

UPDATE dbo_ISRTEST SET dbo_ISRTEST.Product = "Gure"
WHERE (((dbo_ISRTEST.Product)="station"));

Unfortunately i need to use like as Product field is a text field and
station is just a tag which may appear in it.

Any help would be greately appreciated.

Funny thing is that stuff used to work but for some reason doesn't
anymore.

I am connecting to a SQL database through ODBC & a linked table.

1 Answer Posted
Terry Kreft's Avatar
Guest - n/a Posts
#2: Re: MS Access query returns many rows in preview but 0 on run (execute)

Replace % with *




--

Terry Kreft


<mark.cockburn@honeywell.comwrote in message
news:1152777571.739607.158980@75g2000cwc.googlegro ups.com...
Quote:
Originally Posted by
When i run the following query on my table it returns 0 rows but when i
run it in the preview mode (where the update is applied) more then 2000
records are returned.
>
UPDATE dbo_ISRTEST SET dbo_ISRTEST.Product = "Gure"
WHERE (((dbo_ISRTEST.Product) Like '%station%'));
>
If I change the Like to be just = as below then everything works so it
seems to be something about the Like statement.
>
UPDATE dbo_ISRTEST SET dbo_ISRTEST.Product = "Gure"
WHERE (((dbo_ISRTEST.Product)="station"));
>
Unfortunately i need to use like as Product field is a text field and
station is just a tag which may appear in it.
>
Any help would be greately appreciated.
>
Funny thing is that stuff used to work but for some reason doesn't
anymore.
>
I am connecting to a SQL database through ODBC & a linked table.
>



 
Not the answer you were looking for? Post your question . . .
197,031 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 197,031 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors