|
Log in |
FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |