Solved

Merge two tables in select query, vfp, oledb

Posted on 2008-06-23
2
870 Views
Last Modified: 2008-10-13
How do I combine two tables into one query?  the tables are exact... so it's not a parent/child situation... the tables are current/archived data... when the user selects a date which falls into the archived data range... I would like to pull that data, in addition to any data n the current file which may also fall into the users selected date rage.  I'm using a VFP-OLEDB connection in asp.net page... (vb)...

I'm trying to populate a grid... then a crystal report... if the user desires to print.

Something like select * from table1, table2 where dateshipped => etc...
0
Comment
Question by:zebasdad
2 Comments
 
LVL 33

Accepted Solution

by:
raterus earned 250 total points
ID: 21845584
I'm not sure of your exact syntax, but it sounds as if a union operator is what you need to research.

Select *
from table1
where dateshipped = (...)
UNION
select *
from table2
where dateshipped = (...)
0
 

Author Comment

by:zebasdad
ID: 21845654
THANKS!  You save me some time... I searched for a similiar solution for hours... here's what worked...

Select shipdate, date_in, orderno from orders where shipdate => bDate and shipdate =< eDate UNION select shipdate, date_in, orderno from aorders where shipdate => bDate and shipdate =< eDate
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Display mvc partial view with errors on parent page 1 26
business objects to connect to MSSQL 6 61
ODBC Question 3 30
Crystal image Object type? 7 29
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now