Mathematica 9 is now available
Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to do a SQL type operation???

  • To: mathgroup at
  • Subject: [mg64451] Re: How to do a SQL type operation???
  • From: "Ray Koopman" <koopman at>
  • Date: Fri, 17 Feb 2006 04:12:20 -0500 (EST)
  • References: <dt1cu5$6a$>
  • Sender: owner-wri-mathgroup at

Richard Palmer wrote:
> Thanks Ray and others.  I was also able to do solve the problem with a
> dispatch command.  Figured it out after I sent the note.

Would that be something like

In[1]:= table1 = {{a,Xa},{b,Xb},{c,Xc},{d,Xd},{a,Xaa},{c,Xcc}};
        table2 = {{a,Ya},{b,Yb},{c,Yc},{d,Yd}};
        table1 /. Dispatch[({#[[1]],x_}->{#[[1]],x,#[[2]]})&/@table2]

Out[3]= {{a,Xa,Ya},{b,Xb,Yb},{c,Xc,Yc},{d,Xd,Yd},

  • Prev by Date: Re: Re: Mathematica:recursion with 2 arguments?
  • Next by Date: Re: How to plot this
  • Previous by thread: Re: Re: How to do a SQL type operation???
  • Next by thread: Mathematica 5.2 for Linux X Error