Viewing 15 posts - 7,171 through 7,185 (of 7,608 total)
Agreed.
For example:
ALTER TABLE dbo.tablename
DROP COLUMN Full_Name;
ALTER TABLE dbo.tablename
ADD Full_Name AS CAST(ISNULL(F_Name + ' ', '') + ISNULL(Lname, '') AS varchar(100))
-- change 100 to whatever max length you want for...
September 24, 2012 at 9:11 am
Jeff Moden (9/20/2012)
SomewhereSomehow (9/20/2012)
That a person is in wikipedia means that he is notorious enough that someone thought to write of him.
It is also possible that person wrote about themselves...
September 20, 2012 at 4:28 pm
SomewhereSomehow (9/20/2012)
Evil Kraig F (9/20/2012)
Perhaps, I've been accused of optimism before... rarely, but it's happened. I'm sorry to hear your political system is falling apart however.
Actually it is...
September 20, 2012 at 4:11 pm
GSquared (9/20/2012)
SomewhereSomehow (9/20/2012)
Nope. Not going to taint you with my personal opinions regard Mr. Celko. Too bad he is a co-author with Itzik on a book as I...
September 20, 2012 at 2:21 pm
sqlguy-736318 (9/19/2012)
September 19, 2012 at 4:37 pm
Lynn Pettis (9/19/2012)
Also, don't name your procedures with "sp_" as you may run afoul of a Microsoft system stored procedure of the same name.
Quite true! In fact, don't start...
September 19, 2012 at 3:52 pm
I think MS had that at one point but they dropped it.
In general, carefully determine rules among yourselves and
most of all, consistently follow them.
FWIW, here are my...
September 19, 2012 at 3:40 pm
If you want/need EXEC() (vs sp_executesql), then you can use a temp table to return the row total:
DECLARE @sql VARCHAR(2000)
CREATE TABLE #result ( total_rows int )
SET @sql = 'DECLARE...
September 19, 2012 at 3:19 pm
SQLKnowItAll (9/19/2012)
CREATE TABLE #test(id int identity (1,1), filler VARCHAR(1))
GO
INSERT INTO #test(filler)
SELECT 'a'
GO 5
DECLARE @sql VARCHAR(150)
SET @sql = 'BEGIN TRAN SELECT * FROM #test SELECT * FROM...
September 19, 2012 at 3:13 pm
Sean Lange (9/19/2012)
SQLKnowItAll (9/19/2012)
CREATE TABLE #test(id int identity (1,1), filler VARCHAR(1))
GO
INSERT INTO #test(filler)
SELECT 'a'
GO 5
DECLARE @sql VARCHAR(150)
SET @sql = 'BEGIN TRAN SELECT * FROM #test SELECT...
September 19, 2012 at 3:04 pm
Eugene Elutin (9/19/2012)
ScottPletcher (9/19/2012)
Eugene Elutin (9/19/2012)
...
ISO currency and Country codes are a prime example of an when the natural key (ISO Code) can be used as an Identity column and...
September 19, 2012 at 10:31 am
Eugene Elutin (9/19/2012)
...
ISO currency and Country codes are a prime example of an when the natural key (ISO Code) can be used as an Identity column and Primary Key.
...
You wouldn't...
September 19, 2012 at 8:26 am
I would use @@VERSION for that, because you can get the SQL version year, and then it's more self-evident about what you're checking:
DECLARE @isSqlServer2008 bit
SET @isSqlServer2008 = CASE WHEN...
September 18, 2012 at 12:56 pm
Definitely don't use a cursor.
But you could pass all the values at once as a table-valued parameter; you just need to modify the code of the sp to handle a...
September 18, 2012 at 8:46 am
Lowell (9/18/2012)
September 18, 2012 at 8:09 am
Viewing 15 posts - 7,171 through 7,185 (of 7,608 total)