Ver Mensaje Individual
  #11 (permalink)  
Antiguo 22/05/2013, 13:56
Avatar de Libras
Libras
Colaborador
 
Fecha de Ingreso: agosto-2006
Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 18 años, 7 meses
Puntos: 774
Respuesta: Duda al usar variables en consultas

i got it :)


Código SQL:
Ver original
  1. SELECT Producto, precio, cantidad, tienda
  2. FROM ventas_tienda
  3. WHERE fecha > '12042013'
  4. AND tienda_id = 123
  5. AND cat_prod = 'dulces'
  6. AND (SELECT region_id FROM Tienda WITH (Nolock) WHERE  Tienda_Id= 12) = 9

y porque usas el nolock?
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me