?
Solved

Setting Range in SQL

Posted on 2000-03-05
4
Medium Priority
?
253 Views
Last Modified: 2010-04-04
How can I 'SetRange' in SQL by using Delphi?.
0
Comment
Question by:madevac
[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
4 Comments
 

Accepted Solution

by:
HamidHossain earned 300 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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

764 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