Re: sql-reader-syntax confusion

[email protected] Wed, 21 Dec 2011 22:07:47 +0100
Newsgroups gmane.lisp.clsql.general
Message-ID <[email protected]>
On Wed, Dec 21, 2011 at 03:43:05PM -0500, Tyler Smith wrote:
> Hi,
> 
> I'm trying to figure out the sql-reader-syntax, and I'm confused on one
> point. Should I have to use quoted arguments inside the square brackets? I
> have the following situation:
> 
> 
> +------------------------------------------------+
> * (table-exists-p "specimens")
> 
> T
> * (table-exists-p [specimens])
> 
> T
> * (table-exists-p ["specimens"])
> 
> T
> * (select [genus] [species] :from "specimens")
> 
> (("Populus" "alba") ("Populus" "alba") ("Populus" "alba") ("Populus" "alba")
>  ("Populus" "alba") ("Populus" "alba") ("Populus" "alba") ("Populus" "alba")
>  ("Carex" "oligocarpa"))
> ("GENUS" "SPECIES")
> 
> * (select [genus] [species] :from [specimens])
> 
> 
> While accessing database #<MYSQL-DATABASE localhost/herb/tws OPEN {B384DA1}>
>   with expression "SELECT GENUS,SPECIES FROM SPECIMENS":
>   Error 1146 / Table 'herb.SPECIMENS' doesn't exist
>   has occurred.
>    [Condition of type SQL-DATABASE-DATA-ERROR]
> +------------------------------------------------+
> 
> 
> >From the manual it looks like I should be able to use just the square
> brackets, but when I do so with (select ...) it can't find a table that
> does exist. What am I doing wrong?

Hmmm, what backend? This looks suspiciously like a mysql case bug ...

 HTH Ralf Mattes

> Thanks,
> 
> Tyler

> _______________________________________________
> CLSQL mailing list
> [email protected]
> http://lists.b9.com/cgi-bin/mailman/listinfo/clsql