SQLExecute with an argument
- To: mathgroup at smc.vnet.net
- Subject: [mg109912] SQLExecute with an argument
- From: Jagra <jagra24891 at mypacks.net>
- Date: Sat, 22 May 2010 00:42:50 -0400 (EDT)
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.