facturaelectronica.lat - Foros de Factura Electrónica en Latinoamérica (SRI, SUNAT, SII)

Programacion o desarrollo de sistemas (software para generar, firmar y enviar la factura electronica en latinoamerica (Ecuador, Chile y Peru)
Fecha actual Dom Dic 16, 2018 10:01 am

Todos los horarios son UTC - 6 horas




Nuevo tema Responder al tema  [ 1 mensaje ] 
Autor Mensaje
NotaPublicado: Mié Ago 01, 2018 3:35 am 
Desconectado

Registrado: Vie Jun 22, 2018 7:26 am
Mensajes: 5
Hi,

I did a few searches with no luck, so I'm writing up my question. I do web programming using ASP and VFP as my database. I've recently run into a problem that I don't know how to get around.I've got a SQL statement that just won't do what I "think" I'm telling it to do. I've got to combine data from two different tables and order them by one column on the first table. The ORDER BY statement does not what to work with a JOIN clause.Here's a short form of my SQL statement:SELECT a.col_1, SUM(a.col_2) AS money, b.col_a, SUM(b.col_c) AS money2 FROM table1 a LEFT OUTER JOIN table2 b ON a.col_1 = b.col_d GROUP BY a.col_1 ORDER BY moneyThe output is not ordered correctly. After some fudging, I came to the conclusion that the JOIN clause was the problem. Interestingly enough, changing the ORDER BY column from the alias to the original column name gives a variation on the outputted data, but still does not order correctly.Any suggestions would be welcome. I am stuck with VFP, and I have to combine the two tables. I've tried a client-side cursor to sort the recordset, but VFP doesn't support the method.

Please help.

I didn't find the right solution from the Internet.

References:-
https://arstechnica.com/civis/viewtopic ... 0&t=795929
Animated How To Videos

Thanks!


Arriba
 Perfil  
 
Mostrar mensajes previos:  Ordenar por  
Nuevo tema Responder al tema  [ 1 mensaje ] 

Todos los horarios son UTC - 6 horas


¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 1 invitado


No puedes abrir nuevos temas en este Foro
No puedes responder a temas en este Foro
No puedes editar tus mensajes en este Foro
No puedes borrar tus mensajes en este Foro
No puedes enviar adjuntos en este Foro

Buscar:
Saltar a:  
cron
Powered by phpBB® Forum Software © phpBB Group
Traducción al Español Mexicano por nextgen en colaboración con phpbb-es.com