Viewing 15 posts - 52,426 through 52,440 (of 59,091 total)
Ya gotta make one...
--===== Create and populate the Tally table on the fly
SELECT TOP 11000 --equates to more than 30 years of dates
...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 20, 2008 at 3:09 pm
Nicely done, Lynn!
--Jeff Moden
Change is inevitable... Change for the better is not.
February 20, 2008 at 3:05 pm
Matt Miller (2/20/2008)
Would this have anything to do with using Native format (as opposed to character format?)
Man, I can't wait to get off this cold medication... I totally missed that...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 20, 2008 at 2:49 pm
Dang... I was loading up the double-barreled pork-chop sling-shot. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
February 20, 2008 at 1:25 pm
I'm with Michaeal... I'm not sure anyone would have entries for, say, 1754, or even 1901 and certainly not for the year 2100 or 2200. What I'm trying to...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 20, 2008 at 1:12 pm
No... if you don't specify the database or the server, it assumes the "default" database for the user (which has been nicely overcome by the 3 part naming convention) and...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 20, 2008 at 1:09 pm
I've never seen BCP do such a thing... what are you using to call the BCP with?
--Jeff Moden
Change is inevitable... Change for the better is not.
February 20, 2008 at 12:46 pm
I don't know what it is... everything in the command you printed looks fine. I even tried it with substitution of colums, etc, and it works just fine on...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 20, 2008 at 12:42 pm
Huh... looks like you've done everything correctly... what are the clunky characters and are they always the same or not?
--Jeff Moden
Change is inevitable... Change for the better is not.
February 20, 2008 at 12:05 pm
Susane, Matt is spot on... you won't find a faster way to do that especially in light of a million rows or so, in my humble opinion.
Undoubtedly, you will run...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 20, 2008 at 11:57 am
Lynn is spot on.
Just to expose another conversion method that's all math and nothing character based...
[font="Courier New"]UPDATE MyTable SET xyz_new = SELECT DATEADD(yy,XYX-1900,0)[/font]
Sounds obvious, but make sure that step 2...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 20, 2008 at 11:33 am
It seems there's a bit of confusion here...
First, when you create the text file, do you want it done automatically as part of a stored procedure or do you...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 20, 2008 at 11:23 am
sqluser (2/20/2008)
try this one also ....DECLARE @s1 varchar(16)
DECLARE @s2 varchar(16)
SET @s1 = '1232'
SET @s2 = 'tete,1232'
SELECT @s1,@s2
SELECT SUBSTRING(@s2,CHARINDEX(@s1,@s2,1),LEN(@s1))
---
Careful!!!! You must still include the delimiter wrapping or you will get...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 20, 2008 at 11:04 am
Adam Haines (2/20/2008)
declare @filter varchar(25)
set @filter = 'test|test2'
DECLARE @x XML
SET @x =...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 20, 2008 at 7:43 am
Ok... I'm a bit new to 2k5... just installed it a couple of months ago and still coming up to speed on how some of the new features work.
Can someone...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 20, 2008 at 6:35 am
Viewing 15 posts - 52,426 through 52,440 (of 59,091 total)