Re: [SQL] simple SQL question

2009-03-20 Thread Kevin Duffy
Duffy Subject: RE: [SQL] simple SQL question Hi again, You got me curious so I went into my SQL browser and got cracking: SELECT companyName, capName FROM ( SELECT companyName, MIN(capitalizationlevel.caplevelmillions) FROM companies, capitalizationlevel WHERE companymil

[SQL] simple SQL question

2009-03-20 Thread Kevin Duffy
Hello All: I would like your input on how I should approach a problem. Say I have a table of companies and one attribute is the market capitalization of these companies. I have another table (definition below) and it contains capitalization levels. For example Micro Cap, Mid Cap, and Lar

Re: [SQL] simple SQL question

2007-06-25 Thread manchicken
On Monday 25 June 2007 10:19:49 Fernando Hevia wrote: > > > I have a column with the following values (example below) > > > > > > 5673 > > > 4731 > > > 4462 > > > 5422 > > > 756 > > > 3060 > > > > > > I want the column to display the numbers as follows: > > > > > > 56.73 > > > 47.31 > > > 44.62 > >

Re: [SQL] simple SQL question

2007-06-25 Thread Ireneusz Pluta
Joshua napisał(a): I have a column with the following values (example below) 5673 4731 4462 5422 756 3060 I want the column to display the numbers as follows: 56.73 47.31 44.62 54.22 7.56 30.60 I have been playing around with string functions but cannot seem to figure out a quick solution.

Re: [SQL] simple SQL question

2007-06-25 Thread Fernando Hevia
> > I have a column with the following values (example below) > > > > 5673 > > 4731 > > 4462 > > 5422 > > 756 > > 3060 > > > > I want the column to display the numbers as follows: > > > > 56.73 > > 47.31 > > 44.62 > > 54.22 > > 7.56 > > 30.60 > > > > I have been playing around with string functions

Re: [SQL] simple SQL question

2007-06-25 Thread manchicken
On Monday 25 June 2007 09:38:39 Milen A. Radev wrote: > Joshua написа: > > I have a column with the following values (example below) > > > > 5673 > > 4731 > > 4462 > > 5422 > > 756 > > 3060 > > > > I want the column to display the numbers as follows: > > > > 56.73 > > 47.31 > > 44.62 > > 54.22 > >

Re: [SQL] simple SQL question

2007-06-25 Thread Milen A. Radev
Joshua написа: > I have a column with the following values (example below) > > 5673 > 4731 > 4462 > 5422 > 756 > 3060 > > I want the column to display the numbers as follows: > > 56.73 > 47.31 > 44.62 > 54.22 > 7.56 > 30.60 > > I have been playing around with string functions but cannot seem to

Re: [SQL] simple SQL question

2007-06-25 Thread Rodrigo De León
On 6/25/07, Joshua <[EMAIL PROTECTED]> wrote: I have a column with the following values (example below) 5673 4731 4462 5422 756 3060 I want the column to display the numbers as follows: 56.73 47.31 44.62 54.22 7.56 30.60 I have been playing around with string functions but cannot seem to figu

[SQL] simple SQL question

2007-06-25 Thread Joshua
I have a column with the following values (example below) 5673 4731 4462 5422 756 3060 I want the column to display the numbers as follows: 56.73 47.31 44.62 54.22 7.56 30.60 I have been playing around with string functions but cannot seem to figure out a quick solution. Does anyone have any

Re: [SQL] Simple SQL Question

2004-11-09 Thread Franco Bruno Borghesi
Didn't know about the seqscan problem when using ORs. But you still can split the query in two, and then use Union to join the results: SELECT WHERE itemKey=:lastItemKey AND location>:lastLocation UNION SELECT ... WHERE itemKey>:lastItemKey You could solve the OFFSET/LIMIT modification probl

Re: [SQL] Simple SQL Question

2004-11-09 Thread Andras Kutrovics
Franco Bruno Borghesi wrote: Hi! Sorry for being late with the answer, I was busy at one of our customer;) wouldn't it be easier using offset & limit?: you always select from the table with an itemkey,location order by clause. You save the current offset between requests, and for every request yo

Re: [SQL] Simple SQL Question

2004-11-07 Thread Bricklen
Andras Kutrovics wrote: Hi All! In one of my application, I would like to implement incremental fetching. The problem is that I would like to run it from a stateless application server, so I have to tell where to begin fetching data. It is simple for a table which has single column primary key, but

Re: [SQL] Simple SQL Question

2004-11-06 Thread Greg Stark
Tomasz Myrta <[EMAIL PROTECTED]> writes: > > select * from table1 LIMIT x > > gives me the first x row of the result. > > After that, I save the last value, and next time, I adjust > > the query as > > select * from table1 where itemkey>:lastvalue LIMIT x > > Why do you complicate it so much? Ev

Re: [SQL] Simple SQL Question

2004-11-05 Thread Tomasz Myrta
Hi All! In one of my application, I would like to implement incremental fetching. The problem is that I would like to run it from a stateless application server, so I have to tell where to begin fetching data. It is simple for a table which has single column primary key, but causes difficulties (at

Re: [SQL] Simple SQL Question

2004-11-05 Thread Franco Bruno Borghesi
wouldn't it be easier using offset & limit?: you always select from the table with an itemkey,location order by clause. You save the current offset between requests, and for every request you re-execute the query with a different offset. If you still want to go with what you already have, you

[SQL] Simple SQL Question

2004-11-05 Thread Andras Kutrovics
Hi All! In one of my application, I would like to implement incremental fetching. The problem is that I would like to run it from a stateless application server, so I have to tell where to begin fetching data. It is simple for a table which has single column primary key, but causes difficulties (at

Re: [SQL] Simple SQL question

2004-03-08 Thread Iain
Sorry, did I write "ANALYSE SELECT "? It's supposed to be "EXPLAIN [ANALYSE] [VERBOSE] SELECT ..." - Original Message - From: "Daniel Henrique Alves Lima" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 09, 2004

Re: [SQL] Simple SQL question

2004-03-08 Thread Iain
it. regards Iain - Original Message - From: "Daniel Henrique Alves Lima" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 09, 2004 1:21 PM Subject: Re: [SQL] Simple SQL question > Thank you, Jeremy. > > I've built a function that returns a s

Re: [SQL] Simple SQL question

2004-03-08 Thread Daniel Henrique Alves Lima
Thank you, Jeremy. I've built a function that returns a string from (cd_teacher, cd_course) and i've create a functional index over this function, like : create index teacher_course_idx on teacher_course (build_unique_2p(cd_teacher,cd_course)); select * from teacher_course where build_unique_2p

[SQL] Simple SQL question

2004-03-08 Thread Daniel Henrique Alves Lima
Hello, everybody. I've a simple question about SQL usage but i don't know even i can formulate this question. Well, i will try : I've a teacher_course table with columns cd_course, cd_teacher => teacher_course(cd_teacher,cd_course) and i've a set of pairs that contains the values for t