I don't necessarily need the "..", it's just a nice bit of shorthand
for using dbo in queries. But anyways, your example works as long as
dbo is specified:

DB1[:database__dbo__table___t1]

Which results in:

SELECT * FROM [database].[dbo].[table] AS [t1]

Thanks for you help Jeremy!

Doug
On Dec 15, 3:31 pm, Jeremy Evans <[email protected]> wrote:
> On Dec 15, 11:48 am, Doug Tykocki <[email protected]> wrote:
>
> > Basically all I'm looking to do is to build a query like:
>
> > SELECT *
> > FROM [database1..table1]
> > INNER JOIN [database2..table2] ON [database1..table1].key1 =
> > [database2..table2].key2
>
> At least the identifier quoting there looks wrong to me (but I'm not a
> Microsoft SQL Server expert).
>
> Anyway, this Sequel code:
>
>   DB1[:database1__table1___t1].
>     join(:database2__table2___t2, :key2=>:key1)
>
> Gives this SQL:
>
>   SELECT * FROM [database1].[table1] AS [t1]
>   INNER JOIN [database2].[table2] AS [t2]
>           ON ([t2].[key2] = [t1].[key1])
>
> If that doesn't give you the exact answer you are looking for (like
> you really need the .. instead of .), let me know.  It's possible to
> handle the query you gave exactly, but I'm not sure that's really what
> you want.
>
> Jeremy

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