Groups
Groups
Sign in
Groups
Groups
Comunidad de Visual Foxpro en Español
Conversations
Labels
About
Send feedback
Help
Como puedo sumar diferentes filas de un mismo registro
165 views
Skip to first unread message
Oscar Zuniga
unread,
May 26, 2016, 2:16:37 PM
5/26/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Comunidad de Visual Foxpro en Español
quiero sumar por ejemplo
tengo
Articulo
Valor
10072
30
10072
40
10072
50
10072
60
10072
70
10072
80
10071
25
10071
35
10071
15
que mi resultado sea
Articulo
Valor
10072
330
10071
50
ya lo agrupe por group by pero me traer un solo regirtro sin sumar lo demas
Allan Raúl Acuña
unread,
May 26, 2016, 2:19:59 PM
5/26/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to publice...@googlegroups.com
SELECT articulo, sum(valor) as valor from miTabla GROUP BY articulo
Saludos cordiales.
Lic. Allan Raúl Acuña
Analista Programador
msn
=
allan...@hotmail.com
skype
= NicEasySoft
+(505) 8 999 8950
Managua, Nicaragua
Centroamérica
Date: Thu, 26 May 2016 11:16:37 -0700
From:
oscarzu...@gmail.com
To:
publice...@googlegroups.com
Subject: [vfp] Como puedo sumar diferentes filas de un mismo registro
Claudio Luna
unread,
May 26, 2016, 2:21:49 PM
5/26/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Comunidad de Visual Foxpro en Español
Oscar,
Select sum(valor) from tu_tabla group by articulo.
Te recomiendo :
http://www.w3schools.com/sql/
Saludos
--
Claudio Luna
Monttevideo - Uruguay
SKYPE: clunamarin
Cel. 099 194 770
Luis la Romana
unread,
May 26, 2016, 3:31:38 PM
5/26/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Comunidad de Visual Foxpro en Español
El que dice Allan es correco, solo que debes colocar antes
set enginebehavior 70
integral
unread,
May 26, 2016, 4:47:09 PM
5/26/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Comunidad de Visual Foxpro en Español
Estimado Amigo OSCAR :
La respuesta correcta la dio el amigo ALLAN, y la sumatoria del articulo 10071 debe ser 75 y no 50
100071 75
La otra respuesta del amigo CLAUDIO
tiene un error de sintaxis.
Saludos,
INTEGRAL
Reply all
Reply to author
Forward
0 new messages