Re: Problem with FROM Clause in Query



Lyle,
The SQL I worked on was the one the OP had compounded to get rid of the
original query, I don't believe this is the one they stated was working in
Access I think the OP was referring to the first statements with respect to
this. In summary they aren't saying the SQL worked in Access and therefore
aren't saying the [] delimiter worked.

[] used to delimit a sub-query; I've not seen this before so I tested it, I
can't get it to work without error in either Access as a query or ADO, in
both cases an error is returned i.e.
"The Microsoft Jet database engine cannot find the input table or query
'SELECT * FROM YourTable'.
Make sure it exists and that its name is spelled correctly."

BTW 'SELECT * FROM YourTable' is the subquery text held in t [].


--
Terry Kreft



"lylefair" <lylefairfield@xxxxxxx> wrote in message
news:1132404454.682756.226590@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Terry
>
> I'm confused.
>
> In JET, I have used
>
> [some select string]. AS name
>
> to effect subqueries in SQL strings
>
> for a long time. (I didn't invent this by any means, but I may have
> championed it).
>
> I believe that in T-SQL we can just use
>
> (some select string) AS name
>
> OP states that the query with []. AS name does work in Access.
>
> So, can I assume that there is something in OP's post which indicated
> he's not sending this query string to JET in his .NET application
> (maybe it's just that: ".NET"?), or does .NET send ANSI SQL to JET and
> []. As name isn't allowed there or what?
>
> I'm confused.
>
> Oh, I already said that.
>
> OK, I'm very confused!
>


.



Relevant Pages

  • Re: Problems with Delete Command
    ... The SQL could get fairly messy if you need to construct it in code, ... ContactID, and WebComID, and create your on-the-fly SQL on that saved query, ... to find the list of ContactIDs from the junction table, ... This is a style/readability thing: if you are going to use string ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Need help with Code Please!!!
    ... posted in response to my last post was some SQL, but this is not the SQL that ... the actual string that gets built at the end of the SQ1 build process. ... The message says Syntax error in query expression ... Dim rs As Recordset 'object ref to qryCompany\USFNumber ...
    (microsoft.public.access.formscoding)
  • Re: Requery subform
    ... are just changing the SQL? ... remove this function and relevent code because the query always exists. ... Dim strProjectType As String ... Dim strProjectStatus As String ...
    (comp.databases.ms-access)
  • Re: Building SQL statement in VBA. Getting 3131 Runtime Error in FROM clause :@
    ... Number of characters in a cell in the query design grid 1,024 ... Since the SQL parser mentions an error in the FROM clause, ... The only problem I can see is the SQL string is very long. ... Dim qdf As QueryDef ...
    (microsoft.public.access.queries)
  • Re: GROUP BY vs DISTINCT
    ... In Jet, the second query uses the same plan than MS SQL ... MS SQL Server uses 1 UET! ...
    (microsoft.public.access.queries)