Solved

Setting Range in SQL

Posted on 2000-03-05
4
244 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

16 Experts available now in Live!

Get 1:1 Help Now