1
추출 할 항목을 찾고 있지만 문제가 있습니다. 열이 형 NTEXT로 저장하고 RTF 문서 때문에이 같은 모습이 포함되어 있습니다 : 나는했습니다 RTF Extract from SQL Server 2008
{\rtf1\ansi\ansicpg1252\uc1\deff0{\fonttbl {\f0\fnil\fcharset0\fprq2 Arial;} {\f1\fswiss\fcharset0\fprq2 Arial;} {\f2\froman\fcharset2\fprq2 Symbol;}} {\colortbl;\red0\green0\blue0;\red255\green255\blue255;} {\stylesheet{\s0\itap0\nowidctlpar\f0\fs24 [Normal];}{\*\cs10\additive Default Paragraph Font;}} {\*\generator TX_RTF32 15.0.530.502;} \deftab1134\paperw11909\paperh16834\margl1138\margt1138\margr1138\margb1138\widowctrl\formshade\sectd \headery720\footery720\pgwsxn11909\pghsxn16834\marglsxn1134\margtsxn1134\margrsxn1134\margbsxn1134\pard\itap0\nowidctlpar\plain\f1\fs20 Stephan Bos 28/11/2011 11:19:55\par\par Sold in guy. He likes him, feedback this afternoon.\par Will send him the CV and also our terms.\par Made him aware of our fees.\par }
을하지만 다시 (난 정말 상관 없어 RTF 또는 TXT)이 점을 추출하기 위해 찾고 있어요
Stephan Bos 28/11/2011 11:19:55
Sold in guy. He likes him, feedback this afternoon.
Will send him the CV and also our terms.
Made him aware of our fees.
: 문서를 추출에 성공했지만, 그들은 열로하지만 (예를 들어 위처럼 뭔가를 읽고 끝낼 것이라고 기대하지 않고 같은보다 각 문자 사이에 공백과 동일 결국시킨 BCP를 사용하여 시도
내가 사용하고있는 (추출하고있는) BCP 추출물은 다음과 같습니다 :
set nocount on;
Declare @sql varchar(1000);
declare @noteid int;
declare xx1 cursor for select nic.NotebookItemId from NotebookItemContent nic
inner join NotebookLinks nl on nl.NotebookItemId = nic.NotebookItemId
inner join NotebookItems ni on ni.NotebookItemId = nic.NotebookItemId
where nl.clientid = 1235074
AND ni.NotebookTypeId = 56;
open xx1;
fetch xx1 into @noteid;
while (@@fetch_status = 0)
begin
set @sql = 'BCP "SELECT memo FROM Monarch_Pronet_ITOIL.dbo.notebookitemcontent where notebookitemid=' + cast(@noteid as varchar) +
'" QUERYOUT \\bhamws475\docs\' + cast(@noteid as varchar) + '.rtf -T -f \\bhamws475\docs\bcp.fmt -S ' + @@SERVERNAME
EXEC master.dbo.xp_CmdShell @sql
fetch xx1 into @noteid;
end;
close xx1;
deallocate xx1;
누구나 올바른 방향으로 나를 가리킬 수 있습니까?
그래서 문제는 출력에 끝 줄이 없다는 것입니다 (큰 줄 하나). 데이터를 가져 왔을 때 어떻게 든 사라 졌다고 말하고 싶습니다. '메모 선택 '을 실행하면. . . 'SQL 쿼리 창에서 출력을 텍스트로 설정하면 한 줄 또는 여러 줄만 표시됩니까? – MiMo
문제점에 대한 스크린 샷 (http://i.imgur.com/kGMYO.png)을 살펴 보았습니다. – franglais
죄송합니다. 어떤 스크린 샷이 표시되는지 알 수 없습니다. 위에서 제안한대로하려고하면 여러 줄이 보입니까? (이것이 문제라고 가정) – MiMo