Thomas Stockbruegger
asked on
Need some help with DATEPART DATEDIFF
sql.Format("SELECT DATEPART(year,A.Liefersche indatum)AS year,\
DATEPART(month,A.Liefersch eindatum)A S month,\
SUM(B.Einheitbez13wert)AS Gewicht\
FROM Lieferscheine AS A , Lieferscheinpositionen AS B\
WHERE A.LieferscheinNr=B.Liefers cheinNr AND A.LieferscheinNr<200000\
GROUP BY DATEPART(month,A.Liefersch eindatum), \
DATEPART(year,A.Liefersche indatum)\
ORDER by DATEPART(year,A.Liefersche indatum)AS C,\
DATEPART(month,A.Liefersch eindatum)A SC");
Hello,
I just want to get values of my SQL Table starting May 2006 till today.
How can I do this, please help.
Thank you.
Best regards,
Thomas
DATEPART(month,A.Liefersch
SUM(B.Einheitbez13wert)AS Gewicht\
FROM Lieferscheine AS A , Lieferscheinpositionen AS B\
WHERE A.LieferscheinNr=B.Liefers
GROUP BY DATEPART(month,A.Liefersch
DATEPART(year,A.Liefersche
ORDER by DATEPART(year,A.Liefersche
DATEPART(month,A.Liefersch
Hello,
I just want to get values of my SQL Table starting May 2006 till today.
How can I do this, please help.
Thank you.
Best regards,
Thomas
ASKER
sql.Format("SELECT DATEPART(year,A.Liefersche indatum)AS year,\
DATEPART(month,A.Liefersch eindatum)A S month,\
SUM(B.Einheitbez13wert)AS Gewicht\
FROM Lieferscheine AS A , Lieferscheinpositionen AS B\
WHERE A.LieferscheinNr=B.Liefers cheinNr AND A.LieferscheinNr<200000\
AND WHERE A.LIeferscheindatum>='1.5. 2006'\
GROUP BY DATEPART(month,A.Liefersch eindatum), \
DATEPART(year,A.Liefersche indatum)\
ORDER by DATEPART(year,A.Liefersche indatum)AS C,\
DATEPART(month,A.Liefersch eindatum)A SC");
Will not work error
DATEPART(month,A.Liefersch
SUM(B.Einheitbez13wert)AS Gewicht\
FROM Lieferscheine AS A , Lieferscheinpositionen AS B\
WHERE A.LieferscheinNr=B.Liefers
AND WHERE A.LIeferscheindatum>='1.5.
GROUP BY DATEPART(month,A.Liefersch
DATEPART(year,A.Liefersche
ORDER by DATEPART(year,A.Liefersche
DATEPART(month,A.Liefersch
Will not work error
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you ..... very much that will work
Best regards,
Thomas
Best regards,
Thomas
select * from table_name where your_date_field >= '5/1/2006'