Le 2012-09-04 à 21:33, Jeremy Evans a écrit :

> On Tuesday, September 4, 2012 5:59:00 PM UTC-7, François Beausoleil wrote:
> Hi!
> 
> Just wondering if I can express the above statement using pure Sequel?
> 
> I tried DB[:t1].insert(DB[:t2]) but that does INSERT INTO t1 SELECT * FROM 
> t2, and fails because t2 doesn't exist. I don't know the exact number / types 
> of columns at the point of call, because I'm higher up in my abstractions.
> 
> 
> Assuming you are trying to create a table as the result of a query, you want:
> 
>   DB.create_table(:t1, :temp=>true, :as=>DB[:t2])

Exactly! Thanks!
François

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to