Viewing 15 posts - 1,066 through 1,080 (of 8,416 total)
babak3334000 (1/17/2012)
Plz Download Attach Test Databace And Run Your Query
Done. Mine produces this script:
UPDATE [dbo].[Table_1]
SET [ch1] = CONVERT(bit, 0)
...
January 17, 2012 at 12:51 am
mic.con87 (1/16/2012)
please can you explain the CROSS APPLY...
See:
http://www.sqlservercentral.com/articles/APPLY/69953/
http://www.sqlservercentral.com/articles/APPLY/69954/
LEN
http://msdn.microsoft.com/en-us/library/ms190329.aspx
...and also why you used a CAST and not a CONVERT.
I tend to prefer CONVERT because it supports explicit styles. Cadavre may...
January 17, 2012 at 12:37 am
babak3334000 (1/17/2012)
Dont Work Both Query
Explain.
January 17, 2012 at 12:32 am
mhike2hale (1/17/2012)
Yeah you're right! Thanks for your observation ๐
No worries; I doubt mine is perfect either ๐
January 17, 2012 at 12:18 am
You will also need to alter each column definition to NOT NULL once each table has been 'fixed'.
January 17, 2012 at 12:06 am
mhike2hale (1/16/2012)
Have you tried my reply? I dont have to use CURSOR HECK to execute the command. And its pretty short and clear I think. ๐
It will try to update...
January 17, 2012 at 12:02 am
This will generate a script that takes into account the main things I can think of immediately. I would modify it to use a cursor, add error handling, possibly...
January 16, 2012 at 11:59 pm
Kingston Dhasian (1/16/2012)
But, I don't think a CURSOR is mandatory to script out the UPDATE'sYou can do it even without a CURSOR
It's not, but unless you have a well-tested set-based...
January 16, 2012 at 11:37 pm
SQLRNNR (1/16/2012)
babak3334000 (1/16/2012)
For every Column Data Type Is "Bit"Example :
select * from syscolumns where xtype = 104 --: bit
...I would seriously consider revising...
January 16, 2012 at 11:35 pm
Kingston Dhasian (1/16/2012)
In that case you can use the INFORMATION_SCHEMA.COLUMNS view, and create a Dynamic Script that will update all columns with bit data type...
January 16, 2012 at 11:33 pm
L' Eomot Inversรฉ (1/16/2012)
January 16, 2012 at 11:25 pm
Gianluca Sartori (1/16/2012)
Also, I don't find 2012 SSMS to be slow at all, even in a VM. I must admit that my laptop is a very fast machine though.
That must...
January 16, 2012 at 2:52 pm
WayneS (1/16/2012)
I was wondering if there would be one or two SSMS, due to the changes of it in 2012.
It's quite handy - after a reboot, I can use R2...
January 16, 2012 at 1:35 pm
Aren't all the cool kids using PowerShell these days?
January 16, 2012 at 1:30 pm
Jason Selburg (1/16/2012)
So what happens in the case of identical rows that chain longer than 5 minutes?
I took it to mean that we should divide the day into 5-minute slots...
January 16, 2012 at 1:28 pm
Viewing 15 posts - 1,066 through 1,080 (of 8,416 total)