Viewing 15 posts - 10,261 through 10,275 (of 15,381 total)
Do yourself a favor... never store date related data as char data.
+100000000000000
There are VERY few absolutes when it comes to sql server but "NEVER store related data as char data"...
October 24, 2012 at 7:57 am
raghuveer126 (10/24/2012)
October 24, 2012 at 7:54 am
????
SELECT
ROW_NUMBER() OVER(PARTITION BY x.cStudentId ORDER BY dtEnrollmentDate desc ) AS DaySeq,
x.*
from #x1 x
where cAbsenceCode <> 'u'
order by dtEnrollmentDate
October 24, 2012 at 7:36 am
nitinuniyal (10/23/2012)
We are using nolock only in select statement as recommended by our Application vendor, Our OLTP is too high and any lock even for milisecond can cause major...
October 23, 2012 at 7:59 am
nitinuniyal (10/22/2012)
Thanks Sean,I got my answer now mt query is running and export is also working fine.
I was just missing the double quotes in inner query.
Regards
NU
Since you didn't answer...
October 23, 2012 at 7:30 am
yuvipoy (10/23/2012)
Any suggestions how can we optimize the query.
Can you do the pivot in the front end? That would release the pressure from sql and put it in a system...
October 23, 2012 at 7:27 am
sdhanpaul (10/23/2012)
October 23, 2012 at 7:24 am
managed to get both methods working...10006 rows later, update was faster..by 11 seconds!
means I can do away with the cursor for now...I will still keep it though as it might...
October 22, 2012 at 4:18 pm
what's a cte? confusing technical extra?
NOW THAT IS FUNNY!!!!
A cte is a common table expression. They were introduced in sql 2005. They are basically an inline view.
http://msdn.microsoft.com/en-us/library/ms190766%28v=sql.105%29.aspx
October 22, 2012 at 4:13 pm
ksharpe (10/22/2012)
I do apologize, I did think that I had copied the whole thing, not just the inserts, I certainly intended to post it all. and also thought that...
October 22, 2012 at 3:39 pm
it sounds like the exact oposite is true (again it depends) but take the examples below
True that it depends. If the parameters can be declared inside or something then it...
October 22, 2012 at 3:28 pm
I modified what you did with the cursor...and it works:
I posted that to show you what you had missed. I would HIGHLY recommend you NOT use the cursor approach for...
October 22, 2012 at 3:21 pm
sdhanpaul (10/22/2012)
/*************************************************************************************
Pseduo-cursor Running Total update...
October 22, 2012 at 3:03 pm
You still never posted the last table, only the inserts for it. So I had to make some more assumptions about your tables.
Then what you posted as sample data did...
October 22, 2012 at 2:33 pm
sdhanpaul (10/22/2012)
no ddls
sample data:
rawtrxid forcount emppin RunningTotal
----------- ----------- ----------- ------------
7 ...
October 22, 2012 at 2:09 pm
Viewing 15 posts - 10,261 through 10,275 (of 15,381 total)