Viewing 15 posts - 2,866 through 2,880 (of 3,543 total)
xp_fileexist will wait for file to be free but could cause you problems if the file is never released.
December 18, 2003 at 6:57 am
or
SELECT
SUBSTRING(SUBSTRING(textcol,1,CHARINDEX(' ',textcol,CHARINDEX('@', textcol))-1),
CHARINDEX('@', textcol) - CHARINDEX(' ',
REVERSE(SUBSTRING(textcol,1,CHARINDEX('@', textcol)-1))) + 1,255)
FROM
December 18, 2003 at 6:42 am
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...
December 18, 2003 at 6:38 am
Create a temp table #temp with the following columns
ROWID int IDENTITY(1,1), BRANID, DIVID, SALESMAN, CUSTID, CUSTNAME, GS, DISC
INSERT INTO #temp...
December 18, 2003 at 5:49 am
quote:
Hey guys! Lighten up its just a game to help us learn and mistakes happen.
Yeh...
December 18, 2003 at 2:10 am
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.
December 17, 2003 at 9:25 am
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...
December 17, 2003 at 6:49 am
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...
December 17, 2003 at 6:26 am
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...
December 17, 2003 at 6:16 am
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...
December 16, 2003 at 10:46 am
Check if the key exists before inserting.
December 16, 2003 at 6:51 am
Is there anything common between the two recordsets? Can you post the queries?
December 16, 2003 at 6:49 am
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...
December 16, 2003 at 6:43 am
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...
December 16, 2003 at 5:26 am
Viewing 15 posts - 2,866 through 2,880 (of 3,543 total)