Ver Mensaje Individual
  #2 (permalink)  
Antiguo 14/05/2008, 01:10
quimfv
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Sabadell
Mensajes: 4.897
Antigüedad: 16 años, 2 meses
Puntos: 574
Re: Me Pueden Ayudar Con Algo Basico En Access

Supongamos que tu tabla se llama tabla y tiene los campos fecha y salariodiario

Cita:
Solamente registros del mes 2
select * from tabla where month(fecha)=2;

Cita:
Solamente registros de los meses 3 y 4
select * from tabla where month(fecha)>=3 and month(fecha)<=4;

Cita:
Solamente registros del mes 3 al mes 6
select * from tabla where month(fecha)>=3 and month(fecha)<=6;


Cita:
Registros en los que el salario diario sea mayor de 450 pesos y menor o igual a 500
select * from tabla where salariodiario>450 and salariodiario<500;


Cita:
Igual al anterior pero sólo del mes 3
select * from tabla where salariodiario>450 and salariodiario<500 and month(fecha)=3;

Cita:
Salarios diarios entre 500 y 600 pesos meses 3 al 6.
select * from tabla where salariodiario>=500 and salariodiario<=600 and month(fecha)>=3 and month(fecha)<=6;


Si o si?

Quim