Viewing 15 posts - 46 through 60 (of 98 total)
Hehhehe
The cursor code:
DECLARE curD CURSOR FOR
SELECT pac,st,ed,qt,idpac
FROM @TabelaPACS
ORDER BY pac
OPEN curD
FETCH NEXT FROM curD INTO @PAC,@st,@ed,@Qt,@id
WHILE @@FETCH_STATUS = 0
BEGIN
-- Retrieve workingdays
SELECT @Diff = dbo.workingDays(@st,@ed,0,0)
January 17, 2013 at 10:17 am
Never used ITVF before, so how do i replace my function by the ITVF? 😀
January 17, 2013 at 10:11 am
Thanks for the quick reply.
I'll give it a try with the ITVF, and see if it solves my problem!? 🙂
BTW, the @st it a datetime var used by the cursor,...
January 17, 2013 at 9:59 am
I think that i get what i need...
SELECT DISTINCT
MA.Def,
MAD.Reference,
MAD.Quantity,
[Movs] = COUNT(MO.ID),
[Deliver] = SUM(MD.QuantityDelv),
[Remain] = MAD.Quantity -SUM(MD.QuantityDelv)
FROM #myMaster MA
INNER JOIN #myMasterDetails MAD ON MA.ID = MAD.tblMASTER
LEFT OUTER JOIN #myMov MO...
March 27, 2012 at 9:15 am
Thanks for the tip, but i know that i should added some sample data, but my tables are a little bigger than the fields that i refer here, to do...
March 15, 2012 at 10:57 am
Oh Sh*** :blush:
I just changed the date time in the first var forgot the second one, so i didn't see any difference! The code that i posted here was the...
November 24, 2011 at 9:19 am
Thanks for the answer, i didn't know the name of this to search in google.
I have the employees/users in another table, i didn't realize that i didn't explained that. 🙂
I'm...
October 28, 2011 at 3:32 pm
Now i'm stuck again....
I had to add more three columns, and now i need to make a combination of them all and i don't see an easy way to do...
August 19, 2011 at 11:41 am
I forgot the Having clause for the groups... :Whistling:
Just need to add this:
HAVING (GROUPING(PRSS.ReadyPr)=0) OR (GROUPING(PRSS.ReadyPr)=1 AND GROUPING(Project)=1)
August 18, 2011 at 7:06 am
Thanks for both answers.
I have to leave this problem to other time, now i have other priorities.
July 22, 2011 at 11:28 am
Thanks
I'll try this later, now i have to leave.
July 22, 2011 at 11:05 am
Thanks
I thought that i can't declare the top value as a variable, in the 2k it wasn't possible so once again i didn't try it... :blush:
July 14, 2011 at 10:18 am
Now i have another problem, i totally forgot that i can't call sp's inside functions...
I need to add X days to a date, this days must be working days, i...
July 14, 2011 at 9:32 am
Viewing 15 posts - 46 through 60 (of 98 total)