Forum Replies Created

Viewing 15 posts - 2,866 through 2,880 (of 3,543 total)

  • RE: How to test DOS "file in use" status?

    xp_fileexist will wait for file to be free but could cause you problems if the file is never released.

  • RE: extract email address from text column

    or

    SELECT
    
    SUBSTRING(SUBSTRING(textcol,1,CHARINDEX(' ',textcol,CHARINDEX('@', textcol))-1),
    CHARINDEX('@', textcol) - CHARINDEX(' ',
    REVERSE(SUBSTRING(textcol,1,CHARINDEX('@', textcol)-1))) + 1,255)
    FROM
  • RE: extract email address from text column

    If your data conforms to Franks post.

    SELECT 
    
    STUFF(SUBSTRING(textcol,1,CHARINDEX(' ',textcol,CHARINDEX('@', textcol))-1),1,
    CHARINDEX('@', textcol) - CHARINDEX(' ',
    REVERSE(SUBSTRING(textcol,1,CHARINDEX('@', textcol)-1))),'')
    FROM

    Edited by - davidburrows on 12/18/2003...

  • RE: 20 % records

    Create a temp table #temp with the following columns
    
    ROWID int IDENTITY(1,1), BRANID, DIVID, SALESMAN, CUSTID, CUSTNAME, GS, DISC
    INSERT INTO #temp...
  • RE: QOD 12/17/03

    quote:


    Hey guys! Lighten up its just a game to help us learn and mistakes happen.


    Yeh...

  • RE: UNION problem

    Wow what a query, still trying to get my head round it. Suggest in this case to put results in temp tables and then check / union from there.

  • RE: QOD Suggestion

    Agree 100%

  • RE: QOD 12/17/03

    Wow! wot a lot of grumps. Read the newsletter and thought about answer, then had to do some work (boss is watching). Came back and thought, got caught like this...

  • RE: Cursor in ExecuteSQL task "drops" some values

    quote:


    I don't understand what this does though.

    select [dbname]=db_name(), * into #sysfiles from sysfiles where 1=2

    select [dbname]=db_name(), * into #sysindexes...

  • RE: Importing Zip Codes

    I think a join would be faster

    INSERT INTO ZipCodes 
    
    (ZIP, City, County, State)
    SELECT ZipCode City, CountyName, State)
    FROM ZIP_CODE_IMPORT i
    LEFT OUTER JOIN ZipCodes...
  • RE: concatenation of Records

    You can do it using a temp table

    CREATE TABLE #temp ([ID] datetime,Notes varchar(7000)) 
    
    INSERT INTO #temp SELECT DISTINCT [ID} from
    DECLARE @max smallint,@Sequence_No smallint...
  • RE: Traping SQL returning errors

    Check if the key exists before inserting.

  • RE: UNION problem

    Is there anything common between the two recordsets? Can you post the queries?

  • RE: Data Scrubbing

    This would convert the data specified and I know the data may be more complex. Whether you do the conversion pre, post or during load depends on available tools and...

  • RE: Uing BCP with multiple result sets

    bcp "SELECT col1,col2 FROM databasename..tablename" 
    
    queryout file1.csv -S server -u username -P password -c -t ","
    bcp "SELECT col1,col2 FROM databasename..tablename" queryout file2.csv -S server -u...

Viewing 15 posts - 2,866 through 2,880 (of 3,543 total)