MathGroup Archive 2010

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

Search the Archive

Re: SQLExecute with an argument

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109926] Re: SQLExecute with an argument
  • From: Jagra <jagra24891 at mypacks.net>
  • Date: Sun, 23 May 2010 03:17:09 -0400 (EDT)
  • References: <ht7nbr$pss$1@smc.vnet.net>

I don't know what happened in my earlier post for it to have picked up
a bunch of extraneous characters that confuse the issue.  Unable to
edit an earlier post, I've reentered it below, hoping it will come
through without the extra characters....

A bit simplified but I hope this explains my problem...

This works:

SQLExecute[conn,"SELECT column1, FROM table1 WHERE dateColumn
>='2007-02-15'"];

But I'd like to make the date ('2007-02-15') a parameter.  I've tried
this:

SQLExecute[conn,"SELECT column1, FROM table1 WHERE dateColumn
>='`1`'","2007-02-15" ];

and a whole variety of other combinations like:

SQLExecute[conn,"SELECT column1, FROM table1 WHERE dateColumn >='`1`'",
{"2007-02-15"} ];

and this:

SQLExecute[conn,"SELECT column1, FROM table1 WHERE dateColumn
>='`1`'", SQLArgument[{"2007-02-15"}] ];

and this:

SQLExecute[conn,"SELECT column1, FROM table1WHERE dateColumn >='`1`'",
DateList["2007-02-15"] ];

BUT I can't seem to figure it out.  Any suggestions or guidelines
beyond the documentation?
Perplexed but hopeful.
Thanks a lot.


  • Prev by Date: Re: Intersection of sublists on date and making a 2D list from a 3D
  • Next by Date: Re: SQLExecute with an argument
  • Previous by thread: SQLExecute with an argument
  • Next by thread: Re: SQLExecute with an argument