Select Problems

Damanindahaus

New Member
hello colleagues,

maybe i am bit "blem blem" now after coding over hours. but how can i solve this problem?
i have a select that returns 100k entries and i wanna select another column from another table, too. but the resultset must not reduce. e.g.:

--returns 100k entries
select ca from table1

--just returns 24k entries
select a.ca, b.cb from table1 a, table2 b
where a.id = b.id
and b.anothercolumn like '%hey%'

is there another way to select b.anothercolumn without cutting the other entries? i m a bit confused right now? :confused:

regards
Daman
 

Damanindahaus

New Member
i tried this:

select a.ca, (select b.cb from from table2 b where ...) anothercolumn from table1 a where a.id = b.id

but i got a syntax problem. any suggestion?

regards
 

RealHeavyDude

Well-Known Member
You should post such question in the SQL-92 forum. Progress is not SQL in the first place, it's 4GL ( nowadays called ABL ). Accessing the Progress database with SQL is possible, but not the preferred way to talk to a Progress database. Most people here in the forum talk mainly 4GL which is the native interface to the database and not SQL ( that's true for me too - it is just that I happen to know some things on how to set the thing up ).

SQL is not SQL. Different database vendors implement their own SQL and sell it as SQL-xyz compliant. Progress is no difference here. Ironically, as far as I know, the SQL Server product from M$soft appears to be one of the most SQL compliant ones ...

As a starter I would recommend you to read the documents "SQL Development" and "SQL reference" from the chapter data management of the documentation that comes with the product in PDF format. If you don't have 'em you can also access them from their web page. You can use the following link as a starting point:

Heavy Regards, RealHeavyDude.
 

oetalker

New Member
try this...

select a.ca, b.cb from table1 a left outer join table2 b on a.id = b.id and b.anothercolumn like '%hey%'
 

Damanindahaus

New Member
thx to all of you.

@oetalker: i really was confused. usually i should know, how to handle this ;) this sql works in sql server 2005 but not unfortunately not in progress. but the problem is a column with exceeding value ... i hope this sql helps me after i ve changed the column format.

@heavydude: thx for the advice. i try to develope with 4GL.
 

Damanindahaus

New Member
@realheavydude:

i tried to develop 4gl like
"
for each table:
display column.
end.
"
in the sql explorer it doesn't function. in procedure editor it lasts too long, so i interrupted it. where should i run this 4GL?

regards
daman
 

RealHeavyDude

Well-Known Member
The procedure editor ( the development environment ) is the only place where you can run code that is not compiled ( in the development environment it gets compiled temporarily ).

What do you mean it by "it lasts too long"?


RealHeavyDude.
 

Damanindahaus

New Member
i waited for about 5 mins. and if i make a select * from table through sql explorer tool, it doesn't even take a second. so i though, that it is not running anymore and i interrupted.
the table just has 280k entries.
 
Top