Solved

sql

Posted on 1998-02-16
16
199 Views
Last Modified: 2010-04-04
hi
i"m using a local sql and i would like to know , if i have a big database (data records ) and i wish to run a query , the all purpose of the query is just to recive from the sql empty dataset (that is combination of the query tables fields ! ) so the query have to be very short on .open (quick) even when there are large data .
(the sql result should be an empty table constructed from the fields in the select query)
i try to use several ways including sql false  condition but its look like every time the the sql is running he always scan all the data record ....
can u help me ?
asi :)
0
Comment
Question by:asi
  • 6
  • 6
  • 2
  • +2
16 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1359336
euhm....
Can you please explain it in an other way? What do you want exactly?
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1359337
He means, creating a new table, that it's structure is based on several fields from several tables.
This will be done by using SQL statement: Create Table...
Right?

Ronit
Kfar Saba
0
 

Author Comment

by:asi
ID: 1359338
i'll try ...
i have some sql query, one of the things that the user should have , is the option to choose fields from the sql result;
since the sql query is created dynamicly, and i dont know witch fields are going to be in the query, i want to find some way to execute the query just for the purpose to know the query fields name; this action have to be very quick and should not do any real query/condition/procsses
if i'll recive an empty query table, it will be very easy 4 me to access to all its field
The problem that i got is that any try to exec even a simple query, the query start going over allthe data record and it is very slow proccess ....
10x any was
asi

0
 

Author Comment

by:asi
ID: 1359339
Ronit ? Kfar SABA ? e-mail me please ,your e-mail to b_asi@inter.net.il
bye
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1359340
Are using Paradox?
0
 

Author Comment

by:asi
ID: 1359341
b"h
yap , i" using paradox
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1359342
It's a bit complicated to explain it. If you increase the points I'll send you a sample application+some explanation in here for the others.
0
 

Author Comment

by:asi
ID: 1359343
Adjusted points to 65
0
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.

 
LVL 5

Expert Comment

by:ronit051397
ID: 1359344
Is it necessary for you to build the table, using SQL, Cause I prefer to build it by another method, based of course on these Linked tables.
0
 
LVL 3

Expert Comment

by:Matvey
ID: 1359345
Hmmmm, I just wonder. It's hard for me to understand what you realy want.

Maybe you can create your table just the usual way, I mean to add field objects to a table object. Can you explain again how a query can do a thing that this "usual" way can't?

Matvey
Petach-Tiqa
bosism@netvision.net.il
0
 

Author Comment

by:asi
ID: 1359346
to ronit;
i"m ready to hear othere answers but i think that i much prefer sql ;
(if u mean to find out the field using linkt tabel and easy access to the fields propreties ... this is not what i"m looking 4)
so i think using sql is the best (only?) way 4 me
10x
asi
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1359347
You'll get the sample on Sunday.
0
 
LVL 3

Expert Comment

by:Matvey
ID: 1359348
Ronit, can you send the sample for me too, because I still don't really get it...Thanks!

bosism@netvision.net.il
0
 

Accepted Solution

by:
bijoyn earned 60 total points
ID: 1359349
Asi,

U cannot get the fields name from a query component without opening it. U need to open it for access the fieldnames. Another thing u should remember is that it does not take anytime for the Open statement to execute because it just opens a internal cursor handle to the database that it is using. Hence whatever is the size of the table, it will always be fast.

Bijoy
0
 

Author Comment

by:asi
ID: 1359350
when i"m using the open statment the sql query is actualy start running ... and its take time ... this is the my problem !
10x
asi

0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1359351
Hi,
In INFORMIX and ORACLE, there is a possibilty to do it.

Here is an example in INFORMIX:
SELECT colname, coltype, HEX(collength)
FROM syscolumns C, systables T
WHERE C.tabid = T.tabid AND T.tabname = 'orders'

syscolumns and systables are informix system tables which store information on the database tables.

In PARADOX, however, I think you'll have to define your database
in the Data Dictionary.
The Data Dictionary stores information on your table's structure etc.
Enter the BDE GUI Application and see that the DBDEMOS is already defined.
The system Table name is BDESDD, located in:
C:\Program Files\Borland\Delphi 3\OBJREPOS

I don't know much about the data in this table, but as every other table, you can use SQL with it.

Regards,
Ronit
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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

867 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

14 Experts available now in Live!

Get 1:1 Help Now