Forum Replies Created

Viewing 15 posts - 376 through 390 (of 429 total)

  • RE: Insert dummy records

    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...

  • RE: Identify postcode from multiple fields

    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...

  • RE: So I got this .dbf file...

    pambrian (6/5/2013)


    If you manually prepend the 19 or 20 to make it a 4 digit year you can set any cutoff. The code below makes it work setting the...

  • RE: So I got this .dbf file...

    Lynn Pettis (6/4/2013)


    Temporary fix, right click on the server instance in Object Explorer, select properties. Go to the Advanced page and change Two Digit Year Cutoff from 2049 to...

  • RE: BCP Utility to output contents into CSV

    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

  • RE: OPENROWSET() Intermittently Fails to Read Excel File

    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...

  • RE: SSIS only shows MS VB .Net for available language

    Lynn Pettis (5/17/2013)


    erikd (5/17/2013)


    Hi,

    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...

  • RE: Adding text to Rank

    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 ' +

    ...

  • RE: LEFT and RIGHT of Delimiter

    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...

  • RE: Name Parser

    People seem to like this tool.

    There's a free trial, so it can't hurt to try. I've never used it, personally.

  • RE: Check String for some chacters

    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,...

  • RE: Email validation question

    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...

  • RE: nested left and right query?

    Son of a gun, it did not occur to me to use a RIGHT inside the charindex. That's pretty sweet.

    Thanks, Geoff.

  • RE: Email validation question

    Before I get started, do you know if it's compatible with 2005?

Viewing 15 posts - 376 through 390 (of 429 total)