Re: [xmpie-users] INNER JOIN in uPlan User Views

103 views
Skip to first unread message

George Marsh

unread,
Dec 18, 2012, 3:58:32 AM12/18/12
to xmpie...@googlegroups.com
Ed, you could just add a where [seq] IN () and paste the list of seq numbers in - works for me with hundreds of IDs

Ed Wong

unread,
Dec 18, 2012, 10:29:31 AM12/18/12
to xmpie...@googlegroups.com
Thanks gxm,

However, I screwed-up my original example, big sorry for that!

The Sequence Number is not in table_2 and table_3. The Sequence number is from table_1 and table_3. The key points are: table_1 is the Schema, table_1 has the original 250,000 sequence numbers, [table_2].[Property] = |->[Site_ID_1]   Here is what I'm trying to do:

@{table_2}:
select * from @[table_2]
INNER JOIN @[table_3]
on |->[Sequence Number]=@[table_3].[Sequence Number]
where @[table_2].[Property] = |->[Site_ID_1]

When I code it like this I get a "OLEDB Message: Syntax error in FROM clause." I've stared at this so long I can't think straight anymore. I just tried adding a where [seq] IN () and paste the list of seq numbers with just 1 number and it did not work. Now that I've posted the real problem, could anyone point me in the right direction?

Thank you very much for helping,
Ed

George Marsh

unread,
Dec 18, 2012, 3:35:16 PM12/18/12
to xmpie...@googlegroups.com
Ed

I think you have misunderstood my intent.

Master table has IDs.
Sub tables don't matter.
Work out your master table IDs, use same query as previously but with a WHERE IN with your list. Not elegant but works.

Ed Wong

unread,
Dec 18, 2012, 4:29:43 PM12/18/12
to xmpie...@googlegroups.com
My way was even less elegant. I worked with table_1 in Excel. Then used the sequence numbers from table_3 (the ones that needed to be re-run) with conditional formatting that used a =COUNTIF function to find the original rows that matched the sequence from table_3. Then did a sort to put those rows on top, deleted the rows I did not need and ran the results through uProduce with my original plan.

I was hopping for a way to add table_3 with some sql to avoid grinding it out in Excel.

Thanks gxm,
Ed
Reply all
Reply to author
Forward
0 new messages