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

DataSet append

P: n/a
Hi,

I have one dataset which is exported to an external file (excel)
My problem is that I want to append the data of two different views to
one dataset. (because they have to be displayed in an sheet among each
other)
Something like:

cmd = new OracleDataAdapter("Select * from view1");
cmd.Tablemappings.Add("Table", "Views");
cmd = new OracleDataAdapter("Select * from view2");
cmd.Tablemappings.Add("Table", "Views"); -- append to first table

cmd.Fill(ds, "Views");
Is there a way to do something like that?

Thank you very much in advance.

regards,

Sebastian
Apr 7 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Apr 7, 11:06 am, SePp <C_o_z_...@gmx.dewrote:
Hi,

I have one dataset which is exported to an external file (excel)
My problem is that I want to append the data of two different views to
one dataset. (because they have to be displayed in an sheet among each
other)
Something like:

cmd = new OracleDataAdapter("Select * from view1");
cmd.Tablemappings.Add("Table", "Views");

cmd = new OracleDataAdapter("Select * from view2");
cmd.Tablemappings.Add("Table", "Views"); -- append to first table

cmd.Fill(ds, "Views");

Is there a way to do something like that?

Thank you very much in advance.

regards,

Sebastian
Okay found a way in sql ....

select * from view1 union (all) select * from view2

cheers
sebastian
Apr 7 '08 #2

P: n/a
Sepp,

The DataSet.Merge(table) will merge every datatable inside a dataset.
(be aware that it is only the reference of course)

Cor

"SePp" <C_*******@gmx.deschreef in bericht
news:27**********************************@a70g2000 hsh.googlegroups.com...
Hi,

I have one dataset which is exported to an external file (excel)
My problem is that I want to append the data of two different views to
one dataset. (because they have to be displayed in an sheet among each
other)
Something like:

cmd = new OracleDataAdapter("Select * from view1");
cmd.Tablemappings.Add("Table", "Views");
cmd = new OracleDataAdapter("Select * from view2");
cmd.Tablemappings.Add("Table", "Views"); -- append to first table

cmd.Fill(ds, "Views");
Is there a way to do something like that?

Thank you very much in advance.

regards,

Sebastian

Apr 7 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.