<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>

<META content="MSHTML 5.00.3314.2100" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=780220917-10022003>I 
thought they had to be the same name too. Chock another one 
up.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=780220917-10022003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN 
class=780220917-10022003>Va.</SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Charlotte Foust 
  [mailto:cfoust@infostatsystems.com]<BR><B>Sent:</B> Monday, February 10, 2003 
  10:55 AM<BR><B>To:</B> accessd@databaseadvisors.com<BR><B>Subject:</B> RE: 
  [AccessD] Learned Something Today<BR><BR></DIV></FONT>
  <DIV><SPAN class=131315416-10022003><FONT color=#0000ff face="Comic Sans MS" 
  size=2>Virginia,</FONT></SPAN></DIV>
  <DIV><SPAN class=131315416-10022003><FONT color=#0000ff face="Comic Sans MS" 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=131315416-10022003><FONT color=#0000ff face="Comic Sans MS" 
  size=2>In a union query, field order is everything.  The fields don't 
  have to have the same name, but they have to be the same datatype and in the 
  same order.</FONT></SPAN></DIV>
  <DIV><SPAN class=131315416-10022003><FONT color=#0000ff face="Comic Sans MS" 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=131315416-10022003><FONT color=#0000ff face="Comic Sans MS" 
  size=2>Charlotte Foust</FONT></SPAN></DIV>
  <BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
    <DIV></DIV>
    <DIV align=left class=OutlookMessageHeader dir=ltr lang=en-us><FONT 
    face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> 
    Hollis,Virginia [mailto:HollisVJ@pgdp.usec.com] <BR><B>Sent:</B> Saturday, 
    February 08, 2003 6:46 AM<BR><B>To:</B> 
    'accessd@databaseadvisors.com'<BR><B>Subject:</B> [AccessD] Learned 
    Something Today<BR><BR></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN class=940353314-08022003>I learned 
    something today that most of you probably already know, but just in case I 
    thought I would pass it along - especially since it took me 2 days to figure 
    out what I was doing wrong.</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=940353314-08022003></SPAN></FONT> </DIV>
    <DIV><FONT face=Arial size=2><SPAN class=940353314-08022003>I created a 
    Union query using SELECT * from both tables. The Union query worked when I 
    viewed it, but when I tried using it to create a report & joined it 
    to the evaluator table, I kept getting a type mismatch in join. 
    The main table had the EvaluatorID as a number & the Evaluator table had 
    EvaluatorID as autonumber (the tables were joined by EvaluatorID). So there 
    should not have been any problem. All the other joins worked 
    fine.</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=940353314-08022003></SPAN></FONT> </DIV>
    <DIV><FONT face=Arial size=2><SPAN class=940353314-08022003>So after 
    eliminating all the possible combinations and trying different tables 
    </SPAN></FONT><FONT face=Arial size=2><SPAN class=940353314-08022003>I 
    compared the 2 tables used in the Union to see if one of the fields might 
    have been wrong. Here is where the learning comes in! The table fields have 
    to be in the same Order. In one table I had EvaluatorID listed 3rd in the 
    list & the other it was 2nd.</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=940353314-08022003></SPAN></FONT> </DIV>
    <DIV><FONT face=Arial size=2><SPAN class=940353314-08022003>Another way I 
    found this is that I switched the order of the tables in the query, SELECT * 
    from table 1 UNION ALL table 2. When I did SELECT from table 2 UNION ALL 
    table 1, I had text in the EvaluatorID field.</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=940353314-08022003></SPAN></FONT> </DIV>
    <DIV><FONT face=Arial size=2><SPAN class=940353314-08022003>Just thought I 
    would pass that along.</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=940353314-08022003></SPAN></FONT> </DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=940353314-08022003>Virginia</SPAN></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>