![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi I have a problem with SQL anywhere 9. I have installed the same DB in to computers one in the Server and a copy in a Pc. the one in the Pc I use it for testing before updating the program to users. an is a simple copy of the Principal DB I have this Script SELECT ( select top 1 pip_precio from prepintura where id_pintura = comptarimap.id_pintura order by id_fecha desc ) FROM comptarimap WHERE ( ( comptarimap.id_empresa = 1 ) AND ( comptarimap.id_cliente = 382 ) AND ( comptarimap.id_sucursal = 1 ) AND ( comptarimap.id_cod_art = 'A186' ) ) ; If I execute it on the server it will not work, because a syntax error but if I change the connection to the one in pc I works just fine.. I have noticed that the problem is the order by line "order by id_fecha desc" , but why It works on the PC DB and not on Server DB if it is exaclty The same and same version ? FirmaIng. Luis M. Cavazos |
#3
| |||
| |||
|
|
To me it looks like on the server you're using an older version of SQLA. ORDER BY in a sub-select was introduced with v9 (so it runs on the local engine). HTH Reimer Lmcm wrote: Hi I have a problem with SQL anywhere 9. I have installed the same DB in to computers one in the Server and a copy in a Pc. the one in the Pc I use it for testing before updating the program to users. an is a simple copy of the Principal DB I have this Script SELECT ( select top 1 pip_precio from prepintura where id_pintura = comptarimap.id_pintura order by id_fecha desc ) FROM comptarimap WHERE ( ( comptarimap.id_empresa = 1 ) AND ( comptarimap.id_cliente = 382 ) AND ( comptarimap.id_sucursal = 1 ) AND ( comptarimap.id_cod_art = 'A186' ) ) ; If I execute it on the server it will not work, because a syntax error but if I change the connection to the one in pc I works just fine.. I have noticed that the problem is the order by line "order by id_fecha desc" , but why It works on the PC DB and not on Server DB if it is exaclty The same and same version ? FirmaIng. Luis M. Cavazos |
#4
| |||
| |||
|
|
Thanks for your answer, but no, it is the same version even installed from the same cd.. To me it looks like on the server you're using an older version of SQLA. ORDER BY in a sub-select was introduced with v9 (so it runs on the local engine). HTH Reimer Lmcm wrote: Hi I have a problem with SQL anywhere 9. I have installed the same DB in to computers one in the Server and a copy in a Pc. the one in the Pc I use it for testing before updating the program to users. an is a simple copy of the Principal DB I have this Script SELECT ( select top 1 pip_precio from prepintura where id_pintura = comptarimap.id_pintura order by id_fecha desc ) FROM comptarimap WHERE ( ( comptarimap.id_empresa = 1 ) AND ( comptarimap.id_cliente = 382 ) AND ( comptarimap.id_sucursal = 1 ) AND ( comptarimap.id_cod_art = 'A186' ) ) ; If I execute it on the server it will not work, because a syntax error but if I change the connection to the one in pc I works just fine.. I have noticed that the problem is the order by line "order by id_fecha desc" , but why It works on the PC DB and not on Server DB if it is exaclty The same and same version ? FirmaIng. Luis M. Cavazos |
![]() |
| Thread Tools | |
| Display Modes | |
| |