Solved

Query

Posted on 2000-02-18
3
172 Views
Last Modified: 2010-04-04
Hi

please tel me whats wrong with this
Query1.Sql.Add ('select * from Invoice');
Query1.Sql.Add ('Where Date >= "1/1/2000" and Date <= "31/1/2000"');
When i run the program give me type mismatch expression

0
Comment
Question by:sivatagiherceg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 5 total points
ID: 2534396
hi,

A / is interpreted as M/D/Y. A . is interpreted as D.M.Y.

Thus :

11/1/99 is November 1, 1999.

11.1.99 is January 11, 1999.

here is an example with the orders.db from dbdemo

select *
from orders
where (SaleDate >= '04/12/1988') AND (SaleDate <= '08/12/1988')


Regards, Zif.
 
0
 
LVL 5

Expert Comment

by:TheNeil
ID: 2534402
Make sure that your dates are formatted correctly. I find that it expects them to be in the format

YYYY-MM-DD HH:MM:SS

You could also try getting rid of the "s

Have you tried your queries out in database desktop or somtehing similar?

The Neil

0
 
LVL 8

Expert Comment

by:ZifNab
ID: 2534432
argh, sivatagiherceg,

sorry I didn't noticed the comment on your previous question. I don't get notified when a comment is given. Only when an answer is rejected or graded. Sorry!

Well, I think it should work now. Not?

Zif.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month8 days, 15 hours left to enroll

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question