追加多个表的内容 - Visual FoxPro
我正在使用带有 Visual Foxpro 后端的会计系统。每个月,所有发票和付款都会从当前发票/付款表移动到仅包含该月数据的新表(在不同的目录中)。例如:
MainDBDir
currentInvoices.dbf (contains Dec invoices)
currentPayments.dbf (contains Dec payments)
2010Dir
NovDir
invoices.dbf (contains Nov2010 invoices)
payments.dbf (contains Nov2010 payments)
OctDir
invoices.dbf (contains Oct2010 invoices)
payments.dbf (contains Oct2010 payments)
我需要对最近六个月的数据执行查询。有没有办法可以在单个 Visual Foxpro 查询中连接多个表(来自多个目录)?
我需要这样的东西:
select * from concatenate(currentInvoices, 2010Dir/NovDir/invoices.dbf, 2010Dir/OctDir/invoices) where invoice_number like '12345'
我不想为每个表执行单独的查询...
谢谢
-乔纳森
I'm working with an accounting system with a Visual Foxpro backend. Every month, all of the invoices and payments are moved from the current invoices/payments table to a new table (in a different directory) with just that month's data. For example:
MainDBDir
currentInvoices.dbf (contains Dec invoices)
currentPayments.dbf (contains Dec payments)
2010Dir
NovDir
invoices.dbf (contains Nov2010 invoices)
payments.dbf (contains Nov2010 payments)
OctDir
invoices.dbf (contains Oct2010 invoices)
payments.dbf (contains Oct2010 payments)
I need to execute a queries on the last six months of data. Is there a way I can concatenate multiple tables (from multiple directories) in a single Visual Foxpro query?
I need something like this:
select * from concatenate(currentInvoices, 2010Dir/NovDir/invoices.dbf, 2010Dir/OctDir/invoices) where invoice_number like '12345'
I'd rather not execute a separate query for each table...
Thanks-
Jonathan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 union 语句连接查询。
示例:
或
You can concatenate the queries by using a union statement.
Example:
or