Solved

Merge two tables in select query, vfp, oledb

Posted on 2008-06-23
2
876 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
asp.net mvc5 6 20
exporting html table data 4 27
Parameter Values   Crystal Rep. XI release 2 6 25
Why use this lambda? 12 28
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
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…

789 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