MathGroup Archive 2006

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

Search the Archive

Re: Substitution inside an SQLExecute statement

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64069] Re: [mg64062] Substitution inside an SQLExecute statement
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Tue, 31 Jan 2006 01:14:15 -0500 (EST)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

I don't have a database to test this with, but this should work.

sireId=5;
nameId=6;

SQLExecute[conn,
  "UPDATE MathTest SET sireId = "<>
    ToString[sireID]<>" WHERE nameId = "<>
    ToString[nameId]]


Bob Hanlon

> 
> From: "Patricia-and-Charles  Jones" <brio11 at earthlink.net>
To: mathgroup at smc.vnet.net
> Subject: [mg64069] [mg64062] Substitution inside an SQLExecute statement
> 
> When I use Mathematica to connect to a database an expression such as
> SQLExecute[conn,"UPDATE MathTest SET sireId = 5 WHERE nameId =6"] works
> correctly. However, I would like to be able to replace the 5 and 6 with 
> variables computed
> exterior to  the SQLExecute statement but evaluated within the SQLExecute 
> statement. The " "
> quotes present a stumbling block as they prevent evaluation of exterior 
> vaiables, I think.
> 
> 


  • Prev by Date: Re: Substitution inside an SQLExecute statement
  • Next by Date: Re: Moving average / smoothing data
  • Previous by thread: Re: Substitution inside an SQLExecute statement
  • Next by thread: problem with constants