Jumat, 18 Juli 2014

[MS_AccessPros] Use of "*" in a query

 

I use an Access database on a remote server and code generated pages
for data display and editing.

I have been using the same code generator in it's several versions
for nine years.

Yesterday a new query failed to provide data on the site. This is the SQL:

SELECT tCalendar.Page, tCalendar.Dayte, tCalendar.ID,
tCalendar.Status, tCalendar.Hide, tCalendar.Visits
FROM tCalendar
WHERE (((tCalendar.Page) Like "District Governor visits*") AND
((tCalendar.Status)=2) AND ((tCalendar.Hide)=No))
ORDER BY tCalendar.Page;

The advice from the support people, within 24hrs, was:
~~~~~~~~~~~~
The Jet Engine does not like SQL query of the form "[Field] LIKE
'value*'" (note the "*" in the SQL). Replace "*" with "%".

Alternatively, remove the WHERE part from the view and add it using
the table filter.
~~~~~~~~~~~~~~

I tested the first suggestion and the use of "%" in place of "*"
failed on my machine. I did not test on the remote site.

I do not understand the alternative that has been suggested. How do I
implement that advice?

Any advice is welcome.

Many thanks,

Robin Chapple

__._,_.___

Posted by: Robin Chapple <robinski@westnet.com.au>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Yahoo Groups
Improved Group Homepage!
The About page of your Group now gives you a heads up display of recent activity, including the latest photos and files

Yahoo Groups
Control your view and sort preferences per Yahoo Group
You can now control your default Sort & View Preferences for Conversations, Photos and Files in the membership settings page.


.

__,_._,___

Tidak ada komentar:

Posting Komentar