Viewing 15 posts - 1,486 through 1,500 (of 3,011 total)
Nested REPLACE works just fine:
print 'Load Test data with all strings of Commas from 1 to 8000'
select
NUMBER,
Commas = convert(varchar(8000),replicate(',',NUMBER))
into
#t
from
-- Number Table Function available here:
-- http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=47685
F_TABLE_NUMBER_RANGE(1,8000)
order by
NUMBER
go
print 'Test Replaces'
select
*
from
(
select
NUMBER,
Commas =
replace(replace(replace(replace(replace(replace(replace(Commas
,',,,,,,,,,,',',')
,',,,,,,,,,,',',')
,',,,,,,,,,,',',')
,',,',',')
,',,',',')
,',,',',')
,',,',',')
from
#t
)...
February 25, 2010 at 12:56 pm
In a public forum like SSC, I think it is more important to correct errors in the thread directly than to worry about someone’s feelings. The damage that can...
February 25, 2010 at 10:26 am
Noman Tariq (2/15/2010)
February 15, 2010 at 10:23 am
Jeffrey Williams-493691 (2/11/2010)
Michael Valentine Jones (2/11/2010)[h]I was aware of that potential problem, and that is why I used the REPLACE to remove the - characters from the date to change...
February 11, 2010 at 4:13 pm
Jeffrey Williams-493691 (2/11/2010)
Michael Valentine Jones (2/11/2010)
This will verify the correct format and ensure that it is a...
February 11, 2010 at 3:41 pm
As other people have suggested, you would be better off using a datetime column.
This will verify the correct format and ensure that it is a valid date.
ALTER TABLE dbo.MyTable
CONSTRAINT CHK_MyTable__MyDateCol
CHECK
(
case
when...
February 11, 2010 at 1:58 pm
An additional thing I always look at is maintenance windows.
If you need down time to install OS patches, run diagnostics, etc., you don't want a mix of applcations on a...
February 11, 2010 at 1:43 pm
We have about 50 SQL Servers on VMs, mostly production, but some are development. We do not generally put highly loaded servers on VMs, but they are great for...
February 10, 2010 at 3:31 pm
You should check to make sure the location you are backing up to has space available.
February 10, 2010 at 10:20 am
I think you are ignoring the cost of what happens when you insert the data.
I think it would cause intense fragmentation of the index if you inserted a sequentially increasing...
February 9, 2010 at 6:42 pm
I'm not sure you clearly explained your requirements.
Do you want to push to next Monday at 9:00 am always, or only when it is Saturday or Sunday?
The code...
February 9, 2010 at 6:20 pm
You should be aware that you cannot use a file or filegroup backup to recover a table to a different point in time than the rest of the database.
February 9, 2010 at 5:52 pm
Has anyone figured out the parameter sequence to restore a database that doesn’t exist from an alternate timeline where it would have existed if the development project hadn’t failed?
February 8, 2010 at 10:02 am
If you really need to do something like this, you don't need to worry about transactions if you use the OUTPUT clause of the UPDATE statement to return the new...
February 5, 2010 at 3:02 pm
Prakash Heda (2/3/2010)
Michael Valentine Jones (2/2/2010)
February 3, 2010 at 8:21 pm
Viewing 15 posts - 1,486 through 1,500 (of 3,011 total)