Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: SQLExecute with an argument

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109931] Re: SQLExecute with an argument
  • From: "Hans Michel" <hmichel at cox.net>
  • Date: Sun, 23 May 2010 03:18:04 -0400 (EDT)
  • References: <ht7nbr$pss$1@smc.vnet.net>

DatabaseLink/ref/SQLDateTime

Use SQLDateTime to insert into a Date, DateTime, or TimeStamp field.

Hans

"Jagra" <jagra24891 at mypacks.net> wrote in message 
news:ht7nbr$pss$1 at smc.vnet.net...
>A bit simplified but I hope this explains my problem...
>
> This works:
>
> SQLExecute[conn, "=E2=80=A8SELECT column1, =E2=80=A8FROM table1=E2=80=A8 
> WHERE dateColumn >=
> '2007-02-15'"=E2=80=A8];
>
> But I'd like to make the date ('2007-02-15') a parameter.  I've tried
> this:
>
> SQLExecute[conn, "=E2=80=A8SELECT column1, FROM table1=E2=80=A8 WHERE 
> dateColumn >=
> '`1`'",
> "2007-02-15" ];
>
> and a whole variety of other combinations like:
>
> SQLExecute[conn, "=E2=80=A8SELECT column1, FROM table1=E2=80=A8 WHERE 
> dateColumn >=
> '`1`'",
> {"2007-02-15"} ];
>
> and this:
>
> SQLExecute[conn, "=E2=80=A8SELECT =E2=80=A8column1, FROM table1=E2=80=A8 
> WHERE dateColumn >=
> '`1`'",
> SQLArgument[{"2007-02-15"}] ];
>
> and this:
>
> SQLExecute[conn, "SELECT column1, FROM table1=E2=80=A8 WHERE 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: SQLExecute with an argument
  • Next by Date: Re: Intersection of sublists on date and making a 2D list from a 3D one
  • Previous by thread: Re: SQLExecute with an argument
  • Next by thread: Re: enter specific symbols for ListPlot usage