Viewing 15 posts - 961 through 975 (of 2,007 total)
ashutosh.kumarpandey (2/3/2012)
February 3, 2012 at 9:53 am
Sean Lange (2/3/2012)
February 3, 2012 at 8:52 am
Laura_SqlNovice (2/3/2012)
I have an SP which has table column names as input parameters. The proc uses dynamic query and uses column names from input parameter to update the columns......
February 3, 2012 at 8:47 am
Make sure you read Jeff Moden's running total article, what I'm about to show you is not even nearly as good.
BEGIN TRAN
IF object_id('tempdb..#testEnvironment') IS NOT NULL
BEGIN
DROP TABLE #testEnvironment
END
--100 Random rows...
February 3, 2012 at 8:12 am
You could get rid of that cursor as well, if you use something like this: -
DECLARE @sql AS NVARCHAR(MAX)
SELECT @sql = COALESCE(@SQL,'') + ';' + CHAR(13) + CHAR(10) +
'SELECT a.name,...
February 3, 2012 at 7:24 am
Jamie Ashton (2/3/2012)
I have a situation where I am trying to do a bulk insert of a file that's on a network share. It's failing with:
Cannot bulk load because the...
February 3, 2012 at 3:53 am
DECLARE @sql NVARCHAR(2000), @Where NVARCHAR(1000), @mande BIGINT
SET @mande=0
SET @sql = 'UPDATE balance' +CHAR(13)+CHAR(10)+
'SET @mande = bal = @innerMande + (bad - bas),' +CHAR(13)+CHAR(10)+
'tash = (CASE WHEN bal > 0' +CHAR(13)+CHAR(10)+
...
February 3, 2012 at 3:38 am
raotor (2/3/2012)
I am using SQL Server 2008R2 SP1 and have a problem when it comes to getting SSMS to script certain tables.
If I right-click on a table within SSMS and...
February 3, 2012 at 3:30 am
Brandie Tarvin (2/2/2012)
I couldn't help myself. I responded to the awkward responder. Maybe if we talk to him, he might start paying more attention to what he's doing.
I made a...
February 2, 2012 at 10:04 am
Stewart "Arturius" Campbell (2/2/2012)
Could kick myself, forgot about UNPIVOT, thanks Cadavre
In fairness, there's not much difference in execution times.
BEGIN TRAN
SET NOCOUNT ON
--1,000,000 Random rows of data
SELECT TOP 1000000 ABS(CHECKSUM(NEWID())) AS...
February 2, 2012 at 7:37 am
"diLip" (2/2/2012)
insert into Table1(ID1,ID2,ID3)
select 1,2,3
union all
select 4,5,6
union all
select 7,8,9
How can I display just the number 9 as the highest value from all...
February 2, 2012 at 2:35 am
BenWard (2/2/2012)
DATE is not a valid data type... ?
It was introduced for SQL Server 2008, so I guess the question should read "On SQL Server 2008 and above, what is...
February 2, 2012 at 2:25 am
BEGIN TRAN
CREATE TABLE t1 (marks INT)
CREATE TABLE t2 (comments VARCHAR(10))
INSERT INTO t1
VALUES (100)
INSERT INTO t1
VALUES (200)
INSERT INTO t2
VALUES ('d')
INSERT INTO t2
VALUES ('i')
--The results here can't be guaranteed because SQL Server...
February 2, 2012 at 2:22 am
Sean Lange (2/1/2012)
You take the RIGHT road and I'll take the LEFT road, and I'll be in Scotland before ye. :Whistling:
Oh dear. . . has it been a long day?...
February 1, 2012 at 10:06 am
Paul Morris-1011726 (2/1/2012)
I apologize I am still a bit of a NOOB with this... I was trying to read up on what you provided to understand what it is doing......
February 1, 2012 at 9:39 am
Viewing 15 posts - 961 through 975 (of 2,007 total)