[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

HELP - From SQL to Ruby

luciosan

10/10/2007 2:18:00 PM

Hi

How I can execute this query on Ruby?

SELECT *
FROM table_1 T
WHERE T.document_id not in (SELECT distinct documnet_id FROM
binary_files);

Now, I execute without proble the second part of query (SELECT
distinct documnet_id FROM binary_files) in this
method:BinaryFile.find(:first, :select => 'distinct document_id')

I've all crontrollers and all models

Thank you


--

I'm using an evaluation license of nemo since 48 days.
You should really try it!
http://www.malcom-ma...

2 Answers

khaines

10/10/2007 2:34:00 PM

0

luciosan

10/13/2007 9:13:00 AM

0

In article
<Pine.LNX.4.61.0710100922000.11180@server1.enigo.com>khaines@enigo.com
wrote:
> My point is that there are many ways to do what you ask in _Ruby_.
> I imagine you are actualy wanting to know how to do it in
> ActiveRecord?

Thank you for the answare.... yes I'm waiting to know how I can do it
in ActiveRecord.


--

I'm using an evaluation license of nemo since 51 days.
You should really try it!
http://www.malcom-ma...