Viewing 15 posts - 376 through 390 (of 429 total)
Luis Cazares (6/14/2013)
Something like this?http://www.sqlservercentral.com/articles/Data+Generation/87901/
I'm not totally sure I follow that article, but it didn't seem like IDs were generated in order? My example was just adding 200 rows to...
June 14, 2013 at 1:50 pm
I'm not sure how fashionable this method is around here, but you could create a look up table of zip codes, and match your columns to it.
If you're expecting only...
June 13, 2013 at 9:38 am
pambrian (6/5/2013)
June 5, 2013 at 1:05 pm
Lynn Pettis (6/4/2013)
June 4, 2013 at 11:53 am
Wouldn't you have to do something like:
EXECUTE @RESULT = 'MASTER..xp_cmdshell '+ @sql +'_1, NO_OUTPUT'
or
SET @RESULT = EXECUTE MASTER..xp_cmdshell [sql]_1, NO_OUTPUT
set @result = replace(@result, '[sql]', '@sql')
exec @result
May 23, 2013 at 9:08 am
rmechaber (7/22/2011)
SwePeso (7/22/2011)
Use IMEX=1 in your extended properties for the driver.
Thanks, but that's not the issue here.
The same query on the same Excel file works fine immediately after...
May 20, 2013 at 7:28 am
Lynn Pettis (5/17/2013)
erikd (5/17/2013)
I'm trying to follow the instructions for this article:
http://www.sqlservercentral.com/articles/Integration+Services+(SSIS)/91665/
I got to the part where I'm setting up the script task. The article says to use...
May 17, 2013 at 1:29 pm
Mark-101232 (5/15/2013)
SELECT AdDate, AdTime, FK_StationId, CAST(rank() over(partition by fk_stationid order by addate,adtime) AS VARCHAR(10)) + ' of ' +
...
May 16, 2013 at 8:42 am
I picked up this parsename trick on here and have been loving it for ad hoc queries.
with data(col) as (
SELECT '0222~Banana' UNION ALL
SELECT '0333~Carrot' UNION ALL
SELECT '0444~Danish' UNION ALL
SELECT '0555~Eclair'
)
select...
May 9, 2013 at 6:34 am
I think you'll find this article helpful:
http://sqlandme.com/2011/07/07/sql-server-tsql-group-by-with-rollup/
April 30, 2013 at 2:26 pm
People seem to like this tool.
There's a free trial, so it can't hurt to try. I've never used it, personally.
April 25, 2013 at 11:12 am
If you want something big, slow, and ugly, there's this:
with t1 as (
select
ltrim(rtrim(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace
(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace
(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace
(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace
(replace(replace(replace(replace(replace(replace(
[phonenumber]
,'-',''),'(',''),')',''),'*',''),'/',''),'\',''),'.',''),'+','')
,'@',''),'#',''),'$',''),'%',''),'^',''),'&',''),',',''),'~','')
,'`',''),'_',''),'=',''),'{',''),'}',''),'[',''),']',''),'|','')
,':',''),';',''),'<',''),'>',''),'?',''),'a',''),'b',''),'c','')
,'d',''),'e',''),'f',''),'g',''),'h',''),'i',''),'j',''),'k','')
,'l',''),'m',''),'n',''),'o',''),'p',''),'q',''),'r',''),'s','')
,'t',''),'u',''),'v',''),'w',''),'x',''),'y',''),'z',''),' ',''))) as phonenumber
from YOURTABLE
)
select case
when len(phonenumber) = 10 and phonenumber not like '1%' then stuff(stuff(phonenumber,4,0,'-'), 8,0,...
April 23, 2013 at 1:05 pm
When I click on any of the files to open them, they default to Visual Studio, which gives me an error saying it doesn't support files of this type. When...
April 23, 2013 at 11:29 am
Son of a gun, it did not occur to me to use a RIGHT inside the charindex. That's pretty sweet.
Thanks, Geoff.
April 23, 2013 at 8:26 am
Before I get started, do you know if it's compatible with 2005?
April 23, 2013 at 8:07 am
Viewing 15 posts - 376 through 390 (of 429 total)