[SQL] Sql and paradox

2000-08-27 Thread Lalit
I want to know the incompatibilities between Paradox text files and SQL database.

Re: [SQL] Select subset of rows

2000-08-27 Thread Stephan Szabo
On Sun, 27 Aug 2000, John McKown wrote: > On Sun, 27 Aug 2000, Stephan Szabo wrote: > > > > > Of course immediately after sending the last message and logging off my > > ISP I figured out the simpler way for the third one: > > > > begin; > > select salary into temp saltemp from employee order

Re: [SQL] Select subset of rows

2000-08-27 Thread John McKown
On Sun, 27 Aug 2000, Stephan Szabo wrote: > > Of course immediately after sending the last message and logging off my > ISP I figured out the simpler way for the third one: > > begin; > select salary into temp saltemp from employee order by salary desc > limit 5; > select name from employee w

Re: [SQL] weird structure

2000-08-27 Thread Yury Don
Renato De Giovanni wrote: > > > > Consider the following tables/fields: > > > table "person": fields "p_id", "p_name". > > > table "person_attribute": fields "a_id", "a_name". > > > table "person_data": fields "d_person_id", "d_attribute_id", > > > "d_value". > > > > > > Also consider that a pers

[SQL] Complex query

2000-08-27 Thread J. Fernando Moyano
Hey everybody !!! I am new on this list !!! I have a little problem . I try this on my system: "select n_lote from pedidos except select rp.n_lote from relpedidos rp, relfacturas rf where rp.n_lote=rf.n_lote group by rp.n_lote having sum(rp.cantidad)=sum(rf.cantidad)" I get this result:

Re: [SQL] queries and inserts

2000-08-27 Thread Mitch Vincent
Removing indexes will speed up the INSERT portion but slow down the SELECT portion. Just an FYI, you can INSERT into table (select whatever from another table) -- you could probably do what you need in a single query (but would also probably still have the speed problem). Have you EXPLAINed the

Re: [SQL] Select subset of rows

2000-08-27 Thread Stephan Szabo
On Sun, 27 Aug 2000, Paulo Roberto Siqueira wrote: > Hi folks, > > I have this table > > CREATE TABLE EMPLOYEE (ID_EMP INT4 PRIMARY KEY, NAME VARCHAR(35), SALARY > NUMERIC(5,2)); > > I want to select only the employees' names who have the 5 highest salaries. Well, that depe

Re: [SQL] Select subset of rows

2000-08-27 Thread Stephan Szabo
Of course immediately after sending the last message and logging off my ISP I figured out the simpler way for the third one: begin; select salary into temp saltemp from employee order by salary desc limit 5; select name from employee where exists (select * from saltemp where saltemp.salary=em

[SQL] Select subset of rows

2000-08-27 Thread Paulo Roberto Siqueira
Hi folks, I have this table CREATE TABLE EMPLOYEE (ID_EMP INT4 PRIMARY KEY, NAME VARCHAR(35), SALARY NUMERIC(5,2)); I want to select only the employees' names who have the 5 highest salaries. Paulo Siqueira

[SQL] Time Results Conversion

2000-08-27 Thread Brian C. Doyle
Hello all, I have now upgraded to 7.0.2 and am very pleased with it. I do have a question about a result that I am getting. When I sum an interval field will get "1 01:01:01" representing "25 hours 1 minute 1 second" The result that I need is just the sum of the hours minutes and se