Fw: [DB-SIG] SQL query help

Oliver Rutherfurd fruhstuck@rutherfurd.net
Wed, 7 Mar 2001 15:21:33 -0500


Oops, I meant to reply to the list...

----- Original Message -----
From: "Oliver Rutherfurd" <fruhstuck@rutherfurd.net>
To: "Ryan Weisenberger" <ryanw@inktomi.com>
Sent: Wednesday, March 07, 2001 3:07 PM
Subject: Re: [DB-SIG] SQL query help


> maybe try square brackets?
>
> c.execute("select * from [order details]")
>
> -Ollie
>
> ----- Original Message -----
> From: "Ryan Weisenberger" <ryanw@inktomi.com>
> To: <db-sig@python.org>
> Sent: Wednesday, March 07, 2001 3:07 PM
> Subject: [DB-SIG] SQL query help
>
>
> > Does anyone know how to get at tables with spaces in the name?  The
> > Microsoft SQL Server 2000 demo database is loaded with tables with names
> > like "Order Details".
> >
> > I've tried a few combinations:
> > c.execute("select * from order details")
> > c.execute("select * from order-details")
> > c.execute("select * from order_details")
> > c.execute("select * from 'order details'")
> > c.execute("select * from order%20details")
> >
> > All of these return a syntax error from the SQL parser.
> >
> > Does anyone know the correct syntax for this?
> >
> > - Ryan
> >
> >
> > _______________________________________________
> > DB-SIG maillist  -  DB-SIG@python.org
> > http://mail.python.org/mailman/listinfo/db-sig
> >
>