Viewing 15 posts - 32,221 through 32,235 (of 59,102 total)
ByronOne (10/21/2011)
Cheers Geoff - always great to see different ways of doing things...
You're welcome but my name is "Jeff". It's hard enough of me to keep track of myself...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 21, 2011 at 6:50 am
Scott Levy (10/20/2011)
Andre, both PC's are connecting to the same database on the server and as far as I know they are both running the same version of Management Studio.
Are...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2011 at 9:00 pm
jasonkellington (10/20/2011)
Any ideas of how to approach this?
Yep... first, you need a splitter. See the following article for that... the actual functions are listed as files in...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2011 at 8:56 pm
That's essentially the same as the UNPIVOT solution already posted, Eric. I've not tested it but I'm pretty sure the CASE statement that Drew wrote will beat it fairly...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2011 at 8:43 pm
Kabelo. (10/20/2011)
try the following script
regards,
Kabelo
CREATE TABLE #Fruits(FruitID INT,FruitName VARCHAR(10))
INSERT INTO #Fruits
VALUES('1001','Apple')
INSERT INTO #Fruits
VALUES('1002','Orange')
INSERT INTO #Fruits
VALUES('1003','Mango')
INSERT INTO #Fruits
VALUES('1004','Banana')
INSERT INTO #Fruits
VALUES('1005','Grape')
--SELECT *FROM #Fruits
DECLARE @FruitNames VARCHAR(8000)
SELECT @FruitNames = COALESCE(@FruitNames + ', ',...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2011 at 8:40 pm
I believe we can shorten up the code just a bit... it probably won't make much of a difference in performance... (shamelessly leveraging Chris' test data)
-- CTE mimics real table
;
WITH...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2011 at 8:35 pm
I've found that the only things that most DBA's are "risk adverse" about are safety of the data and the safety of "the system". I know many that ride...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2011 at 8:14 pm
Chiang (10/20/2011)
I used
sqlcmd -U dbName -P password -S hostName -y 0 -u -d dbSchema -i C:\MyLargeScriptFile.sql
Is there a limit for the file size for MyLargeScriptFile.sql?
The reason is that...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2011 at 7:57 pm
I've run into similar problems and was loath to grant any privs to any login other than PUBLIC. The way I've solved the problem was very simple. I...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2011 at 7:53 pm
brad.woody (10/19/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2011 at 7:41 pm
OCTom (10/19/2011)
I hope you don't mind a bit of criticism about your blog. I find it difficult to read. I don't know if it's the grey background, the font, or...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 19, 2011 at 9:52 pm
Lowell (10/14/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
October 18, 2011 at 10:28 pm
[font="Arial Black"]Danger!!!! DO NOT USE RECURSIVE CTES FOR COUNTING!!!! PERIOD!!!![/font]
See the following article for why...
http://www.sqlservercentral.com/articles/T-SQL/74118/
[font="Arial Black"]Danger!!!! DO NOT USE ANY FORM OF CONCATENATION WHEN SHREDDING CSVS!!!! PERIOD!!!![/font]
See the...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 18, 2011 at 10:22 pm
Conversly, I'd also like to see them stop deprecating useful features such as sp_MakeWebTask, etc, etc.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 18, 2011 at 10:14 pm
jared-709193 (10/18/2011)
GilaMonster (10/18/2011)
Be honest, don't exaggerate your skills, don't claim to know stuff you don't.
The job that I took in April of this year was one of these types of...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 18, 2011 at 10:11 pm
Viewing 15 posts - 32,221 through 32,235 (of 59,102 total)