Ver Mensaje Individual
  #4 (permalink)  
Antiguo 27/12/2009, 09:41
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 3 meses
Puntos: 360
Respuesta: ¿trabajar con fecha y auto incremento en los P.A?

No declares variables. haz el insert directamente

Código SQL:
Ver original
  1. INSERT INTO ventas(fecha,Idcliente,Idempleados,Idproducto,cantidad,PrecioUnit,total)
  2. VALUES(CURRENT_DATE(),xIdcliente,xIdempleados,xIdproducto,xcantidad,xPrecioUnit,
  3. xcantidad * xPrecioUnit);

prueba y nos cuentas
__________________
Without data, You are another person with an opinion.
W. Edwads Deming