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.

If the worst comes to the worst[1], I could do:

dsname = DB[:t1].unused_table_alias
ds = DB[:t1]
DB.run <<-EOSQL
  SELECT *
  INTO TEMPORARY t1
  FROM ( #{ ds.sql } ) AS #{dsname}
EOSQL

I love it that I can drop down to pure SQL when necessary. Sequel rocks!

Thanks!
François Beausoleil

[1]: 
http://english.stackexchange.com/questions/9141/worse-comes-to-worst-or-worst-comes-to-worst#9150
Really, that's how it should be written!

-- 
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