Viewing 15 posts - 5,731 through 5,745 (of 8,731 total)
Not underestimating adaddio's solution which is the base for my solution, I just made some changes. Using a recursive query as a counter is a bad idea and can generate...
October 3, 2014 at 4:55 pm
I believe that I had the same problem once, but I can't be 100% percent sure.
Could you post the exact error message that you get?
October 3, 2014 at 9:05 am
The problem with your code, Don, is that it only handles scalar values.
October 2, 2014 at 5:55 pm
Other than using CAST instead of CONVERT, how is that different from what I posted?
I included the other way around to prevent using functions on the column used in the...
October 2, 2014 at 3:15 pm
DATE_FORMAT is from MySQL and MariaDB. What are you using?
For SQL Server most of us use CONVERT() along with the adequate format code. http://msdn.microsoft.com/en-us/library/ms187928.aspx
October 2, 2014 at 11:37 am
I feel your pain as I have to work in similar conditions. However, I felt that I needed to share the best option even if most times is not possible...
October 2, 2014 at 10:58 am
You can format your string with STUFF(). However, I wouldn't advice to convert your column. You should convert the GETDATE()-1 to string or even better, change the column data type...
October 2, 2014 at 10:13 am
There's no way that your ORDER BY will change the results, it must be something else.
Your query is full of UDFs that will affect performance in a severe way, specially...
October 2, 2014 at 9:59 am
Hi, welcome to the forums.
It's considered polite to post the sample data as DDL and insert statements as well as the expected output based on the sample data. This time,...
October 2, 2014 at 9:35 am
You used group by, but did you use the aggregate function? Are you sure you know what you're grouping by? No cursor is needed. In fact, the solution is so...
October 2, 2014 at 9:10 am
ORDER BY won't change the number of rows, it has to be something else. Could you post the queries that you're using?
October 2, 2014 at 9:07 am
You need to add an aggregate function to your CASE statements. It's all explained in the articles that I mentioned earlier this year.
October 2, 2014 at 8:17 am
You might be missing a space between your data file path and WITH keyword. Do you really don't have a row terminator?
October 2, 2014 at 8:03 am
Have you tried the Quirky Update? It's explained in the following article: http://www.sqlservercentral.com/articles/T-SQL/68467/
Be sure to understand it, follow the rules and test it correctly.
Here's an idea using your sample tables.
declare...
October 1, 2014 at 6:58 pm
doug.davidson (10/1/2014)
Luis Cazares (10/1/2014)
Why are you truncating the log file? You're only affecting performance. You should define an appropriate size to fulfill your needs and prevent autogrowth with normal operations.
I...
October 1, 2014 at 4:03 pm
Viewing 15 posts - 5,731 through 5,745 (of 8,731 total)