Viewing 15 posts - 31 through 45 (of 209 total)
Jeff Moden (9/20/2010)
steve-893342 (9/20/2010)
Jeff Moden (9/19/2010)
September 20, 2010 at 6:25 am
Jeff Moden (9/19/2010)
September 20, 2010 at 6:07 am
Jeff Moden (9/19/2010)[hr
Hi Steve. Thanks for your involvement on this thread. Any chance of your running the code and returning the results for some extra data points for...
September 19, 2010 at 2:34 pm
A CROSS APPLY variation. Thanks Cold Coffee for the @PhoneNumbers:-)
SELECT COUNT(Z.TEL)
FROM @PhoneNumbers
CROSS APPLY
(VALUES
(TEL1),
(TEL2),
(TEL3)
) AS Z (TEL)
September 19, 2010 at 12:17 pm
Paul White NZ (9/19/2010)
steve-893342 (9/19/2010)
Yes, but if you compare the two to shift data either with a SELECT INTO or INSERT query you won't see that sort of difference
I think...
September 19, 2010 at 11:07 am
Paul White NZ (9/19/2010)
Tally:
Table 'Tally'. Scan count 10000, logical reads 30000, physical reads 0
Table 'CsvTest'. Scan count 1, logical reads 774, physical reads 0
CPU...
September 19, 2010 at 7:20 am
And thanks for the feedback, much appreciated:-)
September 17, 2010 at 11:20 am
Can't you just add an INSERT statement to your process? Something like
INSERT [MTHLY_XREF]
(
[NAME]
,[REL]
,[ESTNO]
,[DTFILD]
,[PUB]
,[TYPEOFDOCUMENT]
,[BTYP]
,[BKNO]
,[PGNO]
,[DISP]
,[DISPDT]
)
SELECT
SUBSTRING(BulkColumn, 3, 31) AS NAME
,SUBSTRING(BulkColumn,37, 6) AS REL
,SUBSTRING(BulkColumn, 46, 8) AS ESTNO
,SUBSTRING(BulkColumn, 57, 6) AS DTFILD
,SUBSTRING(BulkColumn, 68,...
September 16, 2010 at 12:40 pm
One approach you could try is to first BULK INSERT the file into a single column staging table. Then using the SUBSTRING function you can resolve each individual column, cleaning...
September 15, 2010 at 4:42 pm
simflex-897410 (9/13/2010)
IDNAMERELESTATE NODATE FILLEDPUBTYPE OF DOCUMENTBOOK TYPEBOOK NOPAGE NODISPOSITIONDISP DATE
1NULLNULL 090903 N PETITION TO TERM GDNSHP MINOR MIN 2962146GRANTED 90903
2ALBA, LOUIS R DEC 147112 080191 Y APPN YEAR'S...
September 15, 2010 at 12:42 pm
TheSQLGuru (9/13/2010)
Can I ask why everyone is putting their code inside a UDF? Can't the code just be inlined as necessary?
Not sure, I almost invariably bring my splitter code...
September 14, 2010 at 1:39 am
I think there are several things wrong here. Firstly you won't be able to SELECT or ORDER BY ContractID in your final SELECT statement because ContractID is consumed in the...
September 13, 2010 at 1:47 pm
WayneS (9/13/2010)
SET NOCOUNT ON;
print replicate('*',30);
Print 'Jeff''s function';
print replicate('*',30);
SET STATISTICS IO,TIME ON;
select
count(*)
from
CsvTest
cross apply
dbo.Split8KX(CsvParameter, ',');
SET STATISTICS IO,TIME OFF;
print replicate('*',30);
print 'Inline table valued function';
print replicate('*',30);
SET STATISTICS...
September 13, 2010 at 6:56 am
Peter Brinkhaus (9/13/2010)
set statistics io on
set statistics time on
print 'Inline table valued function'
select
count(*)
from
...
September 13, 2010 at 4:28 am
WayneS (9/12/2010)
steve-893342 (9/11/2010)
A variation using CROSS APPLYThis is a SQL 7/2000 forum... the cross apply won't work unless posted in the wrong forum.
shell_l_d (9/10/2010)
September 12, 2010 at 1:46 pm
Viewing 15 posts - 31 through 45 (of 209 total)