Viewing 15 posts - 13,111 through 13,125 (of 15,381 total)
Seems like too much effort to me. If you are using identity why do you care what number it is? What are you going to do when you 10k rows...
February 1, 2012 at 8:46 am
There are way too many possibilities and too few details provided to be of much help. Take a look at this article http://www.sqlservercentral.com/articles/SQLServerCentral/66909/%5B/url%5D.
February 1, 2012 at 8:41 am
This is called a PIVOT. Jeff wrote a couple of great articles about this very topic.
http://www.sqlservercentral.com/articles/T-SQL/63681/%5B/url%5D
http://www.sqlservercentral.com/articles/Crosstab/65048/%5B/url%5D
February 1, 2012 at 8:38 am
Good question and certainly a learning point for many people. For this reason alone the question was a good one.
It is unfortunate about the answers. I too was not sure...
February 1, 2012 at 8:30 am
Cadavre (2/1/2012)
Sean Lange (1/31/2012)
SELECT
CAST(((DATEDIFF(minute,StartTime,EndTime) - BreakPeriod) / 60) AS VARCHAR(5)) + ':'...
February 1, 2012 at 8:21 am
Eventually the connection will timeout and be reusable. You need to add some code to close your connection. The example I gave you for the footer is a great way...
February 1, 2012 at 8:15 am
If you simply want to remove the tab you can use replace.
replace(ColumnWithTabs, char(9), '')
That help?
February 1, 2012 at 8:07 am
You didn't really give anybody much to go on here. You select from a view and join to a function multiple times. My guess is whatever is causing this is...
January 31, 2012 at 2:31 pm
Now of course you still have the issue of timeouts. Do you have long running sql processes? Stored procs that take a few minutes, that sort of thing? You can...
January 31, 2012 at 1:25 pm
Yes pooling will reuse a connection that is not being used. You should (as you pointed out) explicitly close your connections. It sounds like your environment uses a number of...
January 31, 2012 at 1:13 pm
Well you were correct that you wouldn't be able to explain it clearly. 🙂 I certainly got lost three of four time through the explanation. However there is hope. The...
January 31, 2012 at 12:49 pm
Like I said I suspect you have carriage returns in your data. Did you evaluate your data to see?
select * from table where address like '%' + char(13) + '%'...
January 31, 2012 at 8:09 am
You don't have to wrap every field in a function. If your queries are parameterized, which they should be anyway, then it is a non-issue.
January 31, 2012 at 7:57 am
I didn't think it was anything other just a 16 digit number but of course I could be wrong. I think he is just wanting this number to put on...
January 31, 2012 at 7:52 am
You could always just add a little string manipulation and still keeping is a lot easier to read.
SELECT
CAST(((DATEDIFF(minute,StartTime,EndTime) - BreakPeriod) / 60) AS VARCHAR(5)) + ':' +
LEFT(CAST(((DATEDIFF(minute,StartTime,EndTime) - BreakPeriod)...
January 31, 2012 at 7:50 am
Viewing 15 posts - 13,111 through 13,125 (of 15,381 total)