三个表对一个 [英] Three tables to one

查看:79
本文介绍了三个表对一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个带有不同数据表的Oracle数据库。

他们都有一个共同的字段。

我需要组合三个表中的一些字段。

ie

field1和table1 from table1

field3和field4 from table2
来自table3的
field5


总而言之,我想生成一个包含以下表格的数据集

架构:common,field1,field2,field3, field4,field5


我该怎么做?

我可以通过将SQL命令排除到数据库来实现,还是我可以将
结合起来
数据集中的数据还是有其他方法可以做到这一点?


我的程序在VB.NET中。


rg,

Eric

Hi,

I have an Oracle database with different tables of data.
They all have one common field.
I need to combine some fields from three tables.
i.e.
field1 and field2 from table1
field3 and field4 from table2
field5 from table3

Alltogether I want to produce a dataset with one table with the following
schema: common, field1, field2, field3, field4, field5

How can I do this?
Can I do it by excecuting a SQL command to the database or do I combine the
data within the dataset or is there some other way of doing this?

My program is in VB.NET.

rg,
Eric

推荐答案

最有效的方法是在SQL查询中进行连接,所以这是

全部在数据库级别完成。


EMW <所以***** @ MikroZoft.com>在消息中写道

news:41 ********************** @ dreader2.news.tiscal i.nl ...
The most efficient way, would be to do joins in your SQL query, so this is
all done at the database level.

"EMW" <so*****@MikroZoft.com> wrote in message
news:41**********************@dreader2.news.tiscal i.nl...


我有一个带有不同数据表的Oracle数据库。
它们都有一个共同的字段。
我需要组合三个字段表格。
ie
来自table1的field1和field2
来自table2的field3和field4
来自table3的field5

总而言之我想用一个表生成一个数据集使用以下
模式:common,field1,field2,field3,field4,field5

我该怎么做?
我可以通过将SQL命令排除到数据库来实现吗?或者我将数据集中的数据组合成
还是有其他方法可以做到这一点?

我的程序是在VB.NET中。

rg,< Eric
Hi,

I have an Oracle database with different tables of data.
They all have one common field.
I need to combine some fields from three tables.
i.e.
field1 and field2 from table1
field3 and field4 from table2
field5 from table3

Alltogether I want to produce a dataset with one table with the following
schema: common, field1, field2, field3, field4, field5

How can I do this?
Can I do it by excecuting a SQL command to the database or do I combine the data within the dataset or is there some other way of doing this?

My program is in VB.NET.

rg,
Eric



最有效的方法,就是在你的SQL查询中进行连接,所以这是

全部在数据库级别完成。


EMW <所以***** @ MikroZoft.com>在消息中写道

news:41 ********************** @ dreader2.news.tiscal i.nl ...
The most efficient way, would be to do joins in your SQL query, so this is
all done at the database level.

"EMW" <so*****@MikroZoft.com> wrote in message
news:41**********************@dreader2.news.tiscal i.nl...


我有一个带有不同数据表的Oracle数据库。
它们都有一个共同的字段。
我需要组合三个字段表格。
ie
来自table1的field1和field2
来自table2的field3和field4
来自table3的field5

总而言之我想用一个表生成一个数据集使用以下
模式:common,field1,field2,field3,field4,field5

我该怎么做?
我可以通过将SQL命令排除到数据库来实现吗?或者我将数据集中的数据组合成
还是有其他方法可以做到这一点?

我的程序是在VB.NET中。

rg,
Eric
Hi,

I have an Oracle database with different tables of data.
They all have one common field.
I need to combine some fields from three tables.
i.e.
field1 and field2 from table1
field3 and field4 from table2
field5 from table3

Alltogether I want to produce a dataset with one table with the following
schema: common, field1, field2, field3, field4, field5

How can I do this?
Can I do it by excecuting a SQL command to the database or do I combine the data within the dataset or is there some other way of doing this?

My program is in VB.NET.

rg,
Eric



要展开,你可以使用视图来适当地格式化数据然后全部

客户要做的是从视图中选择信息。


" Marina" <所以***** @ nospam.com>在消息中写道

新闻:#3 ************** @ TK2MSFTNGP09.phx.gbl ...
To expand, you can use a view to format the data appropriately and then all
the client has to do is select information from the view.

"Marina" <so*****@nospam.com> wrote in message
news:#3**************@TK2MSFTNGP09.phx.gbl...
最有效的方法,将在你的SQL查询中进行连接,所以这都是在数据库级别完成的。

EMW <所以***** @ MikroZoft.com>在消息中写道
新闻:41 ********************** @ dreader2.news.tiscal i.nl ...
The most efficient way, would be to do joins in your SQL query, so this is
all done at the database level.

"EMW" <so*****@MikroZoft.com> wrote in message
news:41**********************@dreader2.news.tiscal i.nl...

我有一个带有不同数据表的Oracle数据库。
它们都有一个共同的字段。
我需要组合三个表中的一些字段。来自table1的field1和field2
来自table2的field3和field4
来自table3的field5

总而言之,我想生成一个带有$ b的表的数据集$ b以下架构:common,field1,field2,field3,field4,field5

如何执行此操作?
我可以通过将SQL命令排除到数据库来实现,还是组合使用?
Hi,

I have an Oracle database with different tables of data.
They all have one common field.
I need to combine some fields from three tables.
i.e.
field1 and field2 from table1
field3 and field4 from table2
field5 from table3

Alltogether I want to produce a dataset with one table with the following schema: common, field1, field2, field3, field4, field5

How can I do this?
Can I do it by excecuting a SQL command to the database or do I combine


数据集中的数据还是有其他方法可以做到这一点?

我的程序在VB.NET中。

rg,
Eric
data within the dataset or is there some other way of doing this?

My program is in VB.NET.

rg,
Eric




这篇关于三个表对一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆