By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,302 Members | 1,185 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,302 IT Pros & Developers. It's quick & easy.

complex views

P: n/a
I want to create a rule that transforms a query on one table to a query on
many with table names and columns named after one of the columns in the fake
table.

e.g.:

select a,b,c from foo where b='x.1' or b='y.1' or b='y.2';

to:

select a,'x.1',c from foo_x union
select a,'y.1',c from foo_y union
select a,'y.2',c from foo_y;

But it doesn't seem that I can manipulate the column data into table names
when I do it in a rule.

How can I do this?
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
tr*****@yahoo.com (Thomas Reat) wrote in message news:<3c**************************@posting.google. com>...
to:

oops, I mean:

select a,'x.1',c from foo_x where foo_x.a=foo.a and b='1' union
select a,'y.1',c from foo_y where foo_y.a=foo.a and b='1' union
select a,'y.2',c from foo_y where foo_y.a=foo.a and b='2';
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.