HI all
Quick one
I pulling details from tabel and one the parts is to select the first time and last time in a day that a user writes to the tabel
Example
ID Time User Ext
1 08:00 1 A
2 08:30 1 A
3 08:45 1 A
4 09:00 1 A
5 10:00...
i am using the DatePart function to do the following
"Sum(CASE DATEPART(dw,pdate) When 1 Then 1 ELSE 0 END) AS Sunday"
But would liek break sunday into morning and evening
have tried (Ftiem been the tiem field on my table)
"Sum(CASE DATEPART(dw,pdate) When 1 And Ftime between '01:00:00' And...
Hi, All
Wondering if someone one could help me on how to
after i have written my select statement how do i send the records returned to excel
So if i have "select f_Name,L_Name from table where L_name="Murphy" from Details", what do i need to do next to export the result to excel
Cheers,
Mick
Cheers for help coco
got working by chainging 2 query option method a little
Query1
SELECT DISTINCT partnum, ponum, count(partnum) AS pocount
FROM PoMov GROUP BY partnum, ponum;
Query2
SELECT partnum, count(PONum) AS PoNumbCount,sum(Pocount)
FROM query1
GROUP BY partnum;
Super stuff thanks again
Thansk For Help Coco
The first method gives me an error
"cannot find table or query 'select distinct partnum,ponum
from tablenum'. make sure it exist
the secound method using two queries
Gives me the "PoNum" count but left out in my question that also need the PartNum count sorry about this...
I have follwoing table showing part number M1 with 5 entries
PONum PartNum
5331 M1
5331 M1
5332 M1
5332 M1
5332 M1
what i need help with is to be able to write a query that return that there are 5 entries for M1 and that its on two seperate PoNum's
Part Num...
i have follwoing table showing part number M1 with 5 entries
PONum PartNum
5331 M1
5331 M1
5332 M1
5332 M1
5332 M1
what i need help with is to be able to qrite a query that return that even though there are 5 entries for M1 that it is only on two seperate...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.