Solved

Setting Range in SQL

Posted on 2000-03-05
4
246 Views
Last Modified: 2010-04-04
How can I 'SetRange' in SQL by using Delphi?.
0
Comment
Question by:madevac
4 Comments
 

Accepted Solution

by:
HamidHossain earned 100 total points
ID: 2586454
add these lines to Query1.Sql.Lines

==========================
Select * from DBName
Where MyField between 1 and 5
==========================

then put

Query1.Active := True;

that code selects all fields (*) from the file DBName.db wich in the Query1.databasename directory and contains a number between 1 and 5 at the "MyField" field.

I hope that is help
also, try righe clicking on the Query1 component, choose "SQL Builder" from shortcut menu. It is a nice program to help you build SQL
0
 

Expert Comment

by:zb_russia
ID: 2586471
Unique note. For want of it is desirable to work with local files Paradox/Dbase - to use Filter. It works faster, than access to basises through SQL.

As an example - for want of to data processing (volumes up to 0.5 Gb) I at first used Sql-demands (inserted and connected tables). The velocity of handling was low. Has copied on TTable. Filter + installation in a cycle on second of TTable. Filter - velocity has lifted in 3-4 times.

Certainly, for want of work with real SQL-server's should use SQL-query.
0
 

Expert Comment

by:doncov
ID: 2586643
SELECT first_name, last_name, salary
FROM employee

WHERE salary BETWEEN 20000 AND 30000
0
 

Author Comment

by:madevac
ID: 2586742
Thanks everyone for your help!.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

912 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now