Viewing 15 posts - 1 through 15 (of 98 total)
Thanks
Came from the 2005 version, and didnt know this functions...
July 9, 2016 at 9:48 am
Just add another athlete to the temp table:
UNION ALL
SELECT 1,3,'P1',3
UNION ALL
SELECT 1,3,'P2',4
UNION ALL
SELECT 1,3,'END',7
UNION ALL
SELECT 2,3,'P1',1
UNION ALL
SELECT 2,3,'P2',3
UNION ALL
SELECT 2,3,'END',9
Then using your code, with the order by
SELECT ...
March 19, 2016 at 4:40 pm
Thanks
But that doesn't work weel, because the rows must be order by time sofar, and the number 2 will have less time because it haven't completed the second stage...
March 19, 2016 at 12:33 pm
The table can be consulted at anytime, in this case the user is looking to it at the end of second stage. So i have only values for the first...
March 19, 2016 at 9:58 am
No, the values were made up... sorry
With the test data, after stage 2, with a total of 4 stages, should be:
1 | 10 | 15 | - | - |...
March 19, 2016 at 9:27 am
Posted at the end of the day yesterday...
Thanks everyone for all the replies.
@Jeff Moden
Yes, it always have two names separated by sloshes like the serial.
The question about the position, i...
March 15, 2016 at 6:27 am
No...
So my problem it's that the pivot function needs an aggregate function to work, but what i need it's the current field value...
In this case it could be anything, some...
December 1, 2015 at 8:00 am
In the "beginning" none of the persons will have formation in the jobs list, so the table will be empty...
When the persons get some kind of training in that job...
November 28, 2015 at 1:30 pm
So my problem it's that the pivot function needs an aggregate function to work, but what i need it's the current field value...
In this case it could be anything, some...
November 28, 2015 at 10:42 am
By the way, i came with this, but this only count/sums whatever for the column value, i need to get the original value from the possible relation between the tables
DECLARE...
November 28, 2015 at 10:12 am
NULL when there's no relation.
Here's some sample data:
IF OBJECT_ID('tempdb..#Person','U') IS NOT NULL
BEGIN
DROP TABLE #Person
DROP TABLE #Job
DROP TABLE #PersonalJobs
END
CREATE TABLE #Person(
id INT PRIMARY KEY,
name NVARCHAR(50)
)
CREATE TABLE #Job(
id INT,
descr NVARCHAR(50)
)
CREATE TABLE #PersonJobs(
idP...
November 28, 2015 at 9:55 am
Yes and no.
Yes, because i need everything, no because i also need to get partitions by the column pf with the row number.
BTW, there was an error in...
July 30, 2015 at 7:05 am
The time was the main problem here. 🙂
I decided to make some tests, the tests were in the table with the clustered index as you suggested, the first two with...
July 30, 2015 at 3:36 am
Viewing 15 posts - 1 through 15 (of 98 total)