| Subject |
Re: Like query |
| From |
Mervyn Bick <invalid@invalid.invalid> |
| Date |
Thu, 26 May 2022 10:01:17 +0200 |
| Newsgroups |
dbase.getting-started |
| Attachment(s) |
date_american.png, date_ymd.png |
On 2022/05/25 17:35, Tom wrote
> See NewInvoiceEntries image for additional table entries I made sometime
> in the past.
>
....>
> See CastDateEntry image for dBase's exception to your mm/dd/yyyy
> statement. Explains why I could not find my '04' date entries.
Strange. This may be due to a global setting but with date set AMERICAN
on my computer the leading 0 appears in both the 'order date' and the
cOrder fields. I normally use the YMD date format and the cast() field
shows the leading 0 as well. See the screenshots attached.
To see what cast() produces on your computer enter the following in the
Command Panel while the like_search1.wfm is open.
open database dbasetutorial
select i.'order date',i.cOrder from :dbasetutorial:invoice i
browse
use //to close the workarea once you have examined the table.
In the previous message I said "Outside of a SELECT statement localSQL
can deal with spaces in fieldnames by wrapping the fieldname in single
quotes and using the table name (or a correlation name i.e alias) e.g
invoice.'card name'" I should have said that this was true when the
SELECT statement was for a query object. As you can see from the above
SELECT statement it works correctly outside of a query. This actually
points to a bug in dBASE rather than a problem with localSQL. The
chances that this will ever get fixed are so remote I'm not going to
bother to log it.
> See CodeModification image. Search works much better with this small
> correction. More coffee?
Oops. Careless programming and inadequate testing. :-(
Mervyn.
|
|