Unbelievable..  That was it.  It doesn't like the semicolon.

I tried excluding the semicolon a few times early on, but probably wasn't
addressing the table correctly.

Wow..  Humiliated again.

Well.. I'll have to work hard over the weekend.  

Thank you so incredibly much.  I will definitely write a nice beginner's
how-to for others, once I get to a point that time allows for it.

Matthew

-----Original Message-----
From: Patrick van Kleef [mailto:[email protected]] 
Sent: Friday, August 06, 2010 3:55 PM
To: Matthew Tedder
Cc: Ted Thibodeau Jr; [email protected]
Subject: Re: [Virtuoso-users] In SQL how can I reference my tables?

HI Matthew,

> It shows my database "studies" at the same level as "DB", "PUMP",  
> "UDDI",
> "VAD", etc.
>
> Clicking down to the tables, it shows them as:  studies.DBA.studies
>
> I used the default DBA account (for now).  I didn't modify any  
> defaults of
> installation from the tarball, to keep things simple.
>
> But "SELECT * FROM studies.DBA.studies;" still returns the same  
> syntax error
> as did "SELECT * FROM studies..studies;"
>
> Under the "Interactive SQL" tab, "SELECT * FROM studies..studies;"  
> works
> fine.. So, does this mean Virtuoso is somehow seeing it differently  
> from my
> php script:
>
> <?php
>
> $dbc = odbc_connect('virtuoso','dba','dba');
> $(!$dbc) { exit("Failed!\n"); }
>
> $sql = "SELECT * FROM studies..studies;";
> $rs = odbc_exec($dbc, $sql);
>

When using the isql tool, you need to use a semi colon, so the parser  
knows when it has reached the end of the statement.


In ODBC you should not use a semicolon, unless you want a compound  
statement, which in this case you do not have. So please use:

        $sql = "SELECT * FROM studies..studies";

Patrick

> -----Original Message-----
> From: Ted Thibodeau Jr [mailto:[email protected]]
> Sent: Friday, August 06, 2010 10:11 AM
> To: Matthew Tedder
> Cc: [email protected]
> Subject: Re: [Virtuoso-users] In SQL how can I reference my tables?
>
> Hi, Matthew --
>
>
> On Aug 6, 2010, at 08:42 AM, Matthew Tedder wrote:
>
>> So the PHP odbc_connect() method seems to connect, because I get SQL
> errors.
>>
>> Can anyone tell me how to at least select from these tables.. I  
>> created
> them using isql like this:
>>
>> USE studies;
>> CREATE TABLE studies ( ...);
>>
>> But the following variations give SQL errors:
>>
>> USE studies; SELECT * FROM studies;
>> SELECT * FROM studies.studies;
>> SELECT * FROM studies..studies;
>> SELECT * FROM DB.studies;
>> SELECT * FROM DB.studies.studies;
>>
>> To keep working, I made a mirror of these tables in MySQL and so  
>> that's
> what I am working with now.  I am already past my deadline.
>> As a last resort I might end up setting up a PHP ARC -based SPARQL  
>> endpoint
> and dumping to that, periodically from the tables.  But that won't  
> scale and
> has other limitations.
>>
>> But I kinda feel not so good.  I got excited reading about Virtuoso  
>> and now
> everyone's looking at me.  We're looking at possibly moving a lot  
> over to it,
> including VIVO (researchers and their publications-currently using
> Sesame/Jena), a huge clinical data repository, and others.
>>
>> I feel so close to breaking the egg-shell that can open up a huge  
>> new world
> of uses..  but also stressed with a very short timeline.
>
>
> It seems that you're trying to learn a lot of new things all at once,
> and that they're mixing up together and confusing each other.
>
> Telling us that "the following variations give SQL errors" doesn't  
> give
> us much with which to debug the issue -- because we don't know whether
> the errors are identical in all cases, nor even what the single error
> is (unless it's a repeat of the original you reported?) ...
>
> Do you have a Web browser?  Can you use it to target the Virtuoso
> Conductor (the web-based Admin interface)?  By default, you'll find
> it somewhere like --
>
>   http://localhost:8890/conductor/
>
> -- or --
>
>   http://virtuoso-host.example.com:8890/conductor/
>
> -- with a different port, if you've changed [HTTPServer]:ServerPort 
> (*NOT* [Parameters]:ServerPort) during installation or by manually
> editing the virtuoso.ini.
>
> Log in, and drill down to the Database area.  You should be able to
> see where your tables are -- and thus how to identify them in your
> SQL queries.  This documentation section may help you out --
>
>   <http://docs.openlinksw.com/virtuoso/htmlconductorbar.html>
>
>
> Hope that helps,
>
> Ted
>
>
> --
> A: Yes.                      http://www.guckes.net/faq/ 
> attribution.html
> | Q: Are you sure?
> | | A: Because it reverses the logical flow of conversation.
> | | | Q: Why is top posting frowned upon?
>
> Ted Thibodeau, Jr.           //               voice +1-781-273-0900  
> x32
> Evangelism & Support         //         
> mailto:[email protected]
>                             //              http://twitter.com/TallTed
> OpenLink Software, Inc.      //              http:// 
> www.openlinksw.com/
>        10 Burlington Mall Road, Suite 265, Burlington MA 01803
>                                 http://www.openlinksw.com/weblogs/uda/
> OpenLink Blogs              http://www.openlinksw.com/weblogs/ 
> virtuoso/
>                               http://www.openlinksw.com/blog/~kidehen/
>    Universal Data Access and Virtual Database Technology Providers
>
>
>
>
>
>
-----------------------------------------------------------------------------
-
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
> _______________________________________________
> Virtuoso-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>


Reply via email to