Viewing 15 posts - 21,376 through 21,390 (of 59,098 total)
SQL-DBA-01 (3/4/2015)
declare @sql nvarchar(4000)
select @sql = 'bcp [DBNAME].[dbo].[servertable] in C:\folder\serverlist.txt -SLaptop-01 -T -E -n '
exec master..xp_cmdshell @sql
Getting the below error: Please suggest.
NULL
Starting copy...
SQLState = S1000, NativeError =...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2015 at 8:14 pm
I have to agree with Chris. Use ISNULL or COALESCE instead. The code will be a lot faster than using a scalar function this way.
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2015 at 8:05 pm
Herpington_McDerpington (3/4/2015)
Download FTP File with naming convention of "YESTERDAYSFILE_YESTERDAYSDATE_VARIABLETIMESTAMP.msg"
I've got this part working fine using a wildcard to select the file...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2015 at 7:53 pm
DaveK2014 (3/4/2015)
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2015 at 7:47 pm
theboyholty (3/4/2015)
It might be worth adding that Facebook runs on MySQL and PHP with in excess of 50 million transactions per second (as of a couple of years ago anyway).
But...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2015 at 6:59 pm
SQL_NuB (3/4/2015)
Jeff Moden (3/4/2015)
What's wrong with just doing a replacement?
UPDATE tgt
SET Family = REPLACE(Family,'--','')
FROM dbo.yourtable
WHERE Family LIKE '%--%'
;
there are other...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2015 at 4:26 pm
What's wrong with just doing a replacement?
UPDATE tgt
SET Family = REPLACE(Family,'--','')
FROM dbo.yourtable
WHERE Family LIKE '%--%'
;
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2015 at 3:18 pm
The 0% rollbacks will never end because there's nothing to do. If the SPID isn't consuming CPU or a shedload of data, you might leave it for the next...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2015 at 1:52 pm
JeeTee (3/4/2015)
This is NOT a question about when to or not to use loops and cursors, but I have heard from several places that using cursors seems "more intuitive"....
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2015 at 1:40 pm
jitendra.padhiyar (3/4/2015)
First go with Query execution plan, that is your query should be executed in minimum time. You can make your query better to have good execution time of...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2015 at 8:54 am
below86 (3/4/2015)
Here is what I came up with:
SELECT l.ID, l.Name, l.YrMnth, l.Enrollment
FROM (SELECT ID, Name, [201401],[201402],[201403],[201404],[201405],[201406]
FROM #Table1) p
UNPIVOT (Enrollment FOR YrMnth IN ([201401],[201402],[201403],[201404],[201405],[201406])
)...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2015 at 8:30 am
Thanks for the notes, Gosta.
This isn't actually for any application. It was actually an example spreadsheet that I saw on one of the threads that I've modified a bit....
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2015 at 8:26 am
jwiseh (3/4/2015)
Jeff Moden (3/4/2015)
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2015 at 2:20 am
Heh... the correct answer is @j-2. 😛
Great question, BTW.
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2015 at 1:38 am
It's 3:30 AM here. I've gotta be up-and-at-em in a little over 3 hours. I'll be back but I need to know the answers to my questions about...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 4, 2015 at 1:36 am
Viewing 15 posts - 21,376 through 21,390 (of 59,098 total)