Viewing 15 posts - 2,596 through 2,610 (of 8,731 total)
The moment that you can't trust a restore from Dev to Prod, the data is no longer production data. However, you might want to review the restores from to Dev...
June 27, 2016 at 1:37 pm
I'm sorry, but that doesn't help. I need the column definition, apparently you're using a char column, but that's just a guess. Read the articles linked in my signature to...
June 27, 2016 at 1:11 pm
Something like this?
SELECT CONVERT(date,CONVERT(char(6),'160627'),12)
Avoid storing dates as numbers or strings. Use date/time data types which will allow better performance and capabilities.
June 27, 2016 at 12:59 pm
Please post DDL and the values that give NULL as a result.
June 27, 2016 at 12:52 pm
If you don't have periods and the lengths of your strings are not over 128 chars per section, this can be an option.
SELECT PARSENAME(REPLACE('INV CRT IS15000467 1', ' ', '.'),...
June 27, 2016 at 12:20 pm
Go to the properties window for your columns. Go to the Number tab and select Time in Category as well as your preferred format.
You can also use the format function:
=Format(...
June 27, 2016 at 11:53 am
Not a big improvement, but might help.
SELECT STUFF( REPLACE( '/' + CONVERT(CHAR(10), @xx, 101 ), '/0', '/' ), 1, 1, '')
June 27, 2016 at 9:41 am
MadAdmin (6/24/2016)
drew.allen (6/24/2016)
I think that Luis' solution will perform faster than any looping solution, especially once the square root short circuit is added.Drew
surely the cte is faster, but they do...
June 24, 2016 at 6:08 pm
TomThomson (6/24/2016)
Ed Wagner (6/22/2016)
jasona.work (6/22/2016)
TomThomson (6/22/2016)
jasona.work (6/22/2016)
Sounds like the next couple weeks / months are...
June 24, 2016 at 2:19 pm
hmobasher (6/24/2016)
oops...I have overlooked that one. Now, it runs with no error but I get no records at all!
Did you remove the WHERE clause from the dynamic code?
June 24, 2016 at 1:40 pm
The error message tells you the problem. You didn't uncomment the TOP clause.
June 24, 2016 at 1:06 pm
Be sure to understand this and ask any questions that you might have.
DECLARE @serviceid int = 66;
DECLARE @sql nvarchar(max);
WITH
E(n) AS(
SELECT n FROM (VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0))E(n)
),
cteTally(n) AS(
...
June 24, 2016 at 12:12 pm
Eirikur Eiriksson (6/24/2016)
jasona.work (6/24/2016)
ChrisM@Work (6/24/2016)
Eirikur Eiriksson (6/24/2016)
Luis Cazares (6/24/2016)
June 24, 2016 at 10:22 am
Sean Lange (6/24/2016)
create view [dbo].[getNewID] as select newid() as new_id;
Really? A view to get a guid???
But wait...it gets even...
June 24, 2016 at 10:20 am
Viewing 15 posts - 2,596 through 2,610 (of 8,731 total)