Viewing 15 posts - 2,326 through 2,340 (of 3,489 total)
Since this is a guessing game without the CREATE TABLE and INSERT scripts and the expected results, please provide them. I'm just not a fan of pin the tail...
August 25, 2015 at 7:52 pm
Can't remember if this works in 2008. I think it works in R2
WITH SampleData (PERSON,TRANSACTDATE, STARTDATE, END_DATE, IN_PUNCH,OUT_PUNCH,HOURS) AS
(
SELECT 1234,'08/03/2015','08/03/2015','08/03/2015', '06:00','09:00','3' ...
August 25, 2015 at 4:39 pm
Welcome to SSC...
For a first timer, pretty good post. Two things that would help us to help you are:
1. CREATE TABLE scripts
2. INSERT scripts to populate the table(s)
so...
August 24, 2015 at 9:35 pm
MM,
Any idea why the parameters button would be grayed out? I'm using Integrated Security, and the SQL Instance is on my local PC.
So I can't specify a parameter as (?).
(Oh,...
August 23, 2015 at 6:46 pm
Please include the description of the problem in the body of the message. Putting it in the title makes it hard to read.
August 22, 2015 at 11:50 pm
Snce you're new here, here's how to post your data so that people here can help. Here's your data...
use tempdb;
GO
CREATE TABLE Data (
ID INT NOT NULL,
JoiningDate DATE,
Placement CHAR(1),
pID INT,
cID...
August 22, 2015 at 9:32 pm
What version of SQL Server are you using? If you have 2012 or later then you can use Windowing functions.
For the benefit of those trying to help, here are the...
August 21, 2015 at 2:26 pm
August 20, 2015 at 10:05 pm
One option is to modify the Connection properties that are being used to execute the stored procedure.
I'm assuming you're using Excel 2013... if not, I don't know - haven't used...
August 20, 2015 at 7:56 pm
Install a version of SQL Server. SSMS should be included. You can download the databases from here[/url]
Then you just move the databases to the DATA folder and then attach...
August 19, 2015 at 1:55 pm
something like this?
SELECT jobnbr, tasknbr
FROM dataTable
EXCEPT
(SELECT d1.jobnbr, d1.tasknbr
FROM dataTable d1
WHERE d1.item_Type = 'TASK'
INTERSECT
SELECT d2.jobnbr, d2.tasknbr
FROM dataTable d2
WHERE d2.item_Type = 'HOLD');
(I may be missing the weekNbr, though...)
I have to...
August 19, 2015 at 1:21 pm
One option might be to create two separate matrices with the same grouping and stack them.
got any dummy data for us to play with? (either create table and insert scripts...
August 19, 2015 at 12:40 pm
How about...
SELECT EmpName, SwipeDate, Time_In, Time_Out, DATEDIFF(minute,Time_In,Time_Out) AS WorkTimeMins
FROM
(SELECT TOP 100 PERCENT EmpName, SwipeDate, MIN(SwipeTime) AS Time_In, MAX(SwipeTime) AS Time_Out
FROM #EmpHours
GROUP BY EmpName, SwipeDate
ORDER BY EmpName, SwipeDate) x;
August 19, 2015 at 2:16 am
Viewing 15 posts - 2,326 through 2,340 (of 3,489 total)