Go Back   NexusDB Newsgroups > Support Newsgroups > nexusdb.public.support.sql
Log in
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Thread Tools Display Modes
  #1  
Old 3rd November 2006, 11:13 AM
=?ISO-8859-1?Q?=22Rodrigo_G=F3mez_=5BNDX=5D=22?=
 
Posts: n/a
Default 2.0.599r3: Query that should work returns Unable to resolve the identifier"#t1"."ContratoId"

Hello there,

This query as far as I see is a valid one, but returns this error in the 2.0599r3 version.
The problem seems to be the LEFT JOINs, even if they don't (or shouldn't) affect the
only part where #t1.ContratoId is referenced. Changing them for JOIN "solves" the problem,
but doesn't return the correct resultset.

Query:

SELECT
Contratos.*
INTO #t1
FROM
Contratos
WHERE
Contratos.Numero = ?;

SELECT
#t1.*,
Clientes.*,
Agentes.*,
Agencias.*,
Comercializadoras.*,
TiposContrato.*,
FacturarA.ClaveCliente AS FacturarAClaveCliente,
FacturarA.NombreFiscal AS FacturarANombreFiscal,
FacturarA.RFC AS FacturarARFC,
FacturarA.Direccion AS FacturarADireccion,
(SELECT MIN(FechaInicial) FROM PautasContrato WHERE ContratoId = #t1.ContratoId) AS
FechaInicialContrato,
(SELECT MAX(FechaFinal) FROM PautasContrato WHERE ContratoId = #t1.ContratoId) AS
FechaFinalContrato,
UsuarioAlta.Clave AS ClaveUsuarioAlta,
PlanesFranceses.ClavePlan AS ClavePlanFrances,
PlanesFranceses.Descripcion AS DescripcionPlanFrances
FROM #t1
LEFT JOIN Clientes ON (Clientes.ClienteId = #t1.ClienteId)
LEFT JOIN Agentes ON (Agentes.AgenteId = #t1.AgenteId)
LEFT JOIN Agencias ON (Agencias.AgenciaId = #t1.AgenciaId)
LEFT JOIN Comercializadoras ON (Comercializadoras.ComercializadoraId =
#t1.ComercializadoraId)
LEFT JOIN TiposContrato ON (TiposContrato.TipoContratoId = #t1.TipoContratoId)
LEFT JOIN Clientes AS FacturarA ON (FacturarA.ClienteId = #t1.ClienteIdAFacturar)
LEFT JOIN Usuarios AS UsuarioAlta ON (UsuarioAlta.UsuarioId = #t1.UsuarioAlta)
LEFT JOIN PlanesFranceses ON (PlanesFranceses.PlanFrancesId = #t1.PlanFrancesId);

ErrorString: (thank's very much for the query logging capability!!!)

Unexpected exception object raised: [Exception] Error in statement: Unable to resolve the
identifier
"#t1"."ContratoId"<[--!þException.Class=Exceptionþ!--]><[--!þException.Message=Error in
statement: Unable to resolve the identifier "#t1"."ContratoId"þ!--]>

Changing the query to create a second temporary table, and getting those two values in
that third query, solves the issue, but I believe this should be fixed, or I'm doing
something incorrect here?

Regards,

--
Rodrigo Gómez [NDX]
  #2  
Old 4th November 2006, 07:35 AM
Hannes Danzl[NDD]
 
Posts: n/a
Default Re: 2.0.599r3: Query that should work returns Unable to resolve the identifier"#t1"."ContratoId"

"Rodrigo Gómez [NDX]" wrote:

> Hello there,
>
> This query as far as I see is a valid one, but returns this error in the
> 2.0599r3 version. The problem seems to be the LEFT JOINs, even if they


Known problem. Issues #2258 and #2254 (for left and right respectively). We're
just working on these.

--

Hannes Danzl [NexusDB Developer]
Newsgroup archive at http://www.tamaracka.com/search.htm
  #3  
Old 4th November 2006, 11:03 AM
=?ISO-8859-1?Q?=22Rodrigo_G=F3mez_=5BNDX=5D=22?=
 
Posts: n/a
Default Re: 2.0.599r3: Query that should work returns Unable to resolve theidentifier"#t1"."ContratoId"


> Known problem. Issues #2258 and #2254 (for left and right respectively). We're
> just working on these.


Ok, thanks. Because this affects a lot of my queries... :-S

Regards,

--
Rodrigo Gómez [NDX]


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
On the "empty identifier" front ... Martijn Tonies nexusdb.public.support.sql 3 7th September 2006 08:54 PM
SQL "TOP" & "GROUP" question fred nexusdb.public.support.sql 38 10th August 2006 06:49 PM
SQL query to search on a field that is "similar to a set" or "mask"? J Tabor nexusdb.public.support.sql 2 10th May 2006 03:20 PM
Announcment! "The Keep" ver 2.0.0.1 and "Po Boy Application LifeCycle Management Utility" ver 1.0.0.l are now both available for free download! Robert Meek nexusdb.public.support.thirdparty 1 11th July 2004 11:23 AM
ORDER BY "Date" does not work in 1.07 David Charron nexusdb.public.support.sql 5 10th July 2004 02:58 PM


All times are GMT +11. The time now is 06:46 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.