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
Solved

How to make SQL querryes. Need example!

Posted on 1998-04-08
6
163 Views
Last Modified: 2010-05-18
Hello!
For example I have Paradox databases main.db and words.db...
main.db fields: 1) Id; 2)name; 3)surname
words.db fields: 1)Id; 2)word
All fields are 'string'.
Please, give me example, how I can make FIND procedure in
SQL for those tables. I need to get working application. And also I need to get short description about SQL sintaxis.
Thanx...

0
Comment
Question by:hind
  • 4
  • 2
6 Comments
 
LVL 1

Accepted Solution

by:
mrider earned 100 total points
ID: 1361331
select * from "main.db" where
name like "%some%"
// for substring search
//or
select * from "main.db" where
name  "some"
//for string search
good book on SQL is Martin Gruber "Understanding SQL"


0
 

Author Comment

by:hind
ID: 1361332
Very nice... But tell me plsss, where I can read results of search? (about DBGrid with datasource:=query I know)... But may be there are more things?
0
 
LVL 1

Expert Comment

by:mrider
ID: 1361333
look at page Database Controls in your Delphi. Almost all of this components can show results

0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Expert Comment

by:mrider
ID: 1361334
look at page Database Controls in your Delphi. Almost all of this components can show results

0
 

Author Comment

by:hind
ID: 1361335
And the last question... :]
I have Paradox databases main.db and words.db...
    main.db fields: 1) Id; 2)name; 3)surname
    words.db fields: 1)Id; 2)word
    All fields are 'string'.
I want to make select from main.db and words.db for all equal
id from main.db and words.db, and for name='dima'...
It's the last question :)
0
 
LVL 1

Expert Comment

by:mrider
ID: 1361336
first - you have _tables_, not database. database is data and relations.
try use
select a.*,b.* from "main.db" a, "words.db" b
where
 b.id=a.id
 and a.name="dima"

0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

766 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