We currently are saving WordML (Word 2003's XML format rather than binary
format) docs into a column of our SQL Server 2005 database and full text
indexing on it. Works okay, but not great. For example, all the XML tags
are indexed... so you find many words that are not in the document (from the
user persepctive).
The fix for that is clear... use an XML filter. (Though how to do that is
not so clear... we tried moving the WordML from a Text column to an XML
column, but it gives errors on illegal characters in the Word doc.)
However, it would seem that even an XML filter will not do nearly as well as
a filter designed for WordML.
Can anyone point me to a WordML full-text-search filter for SQL Server
2005?
Thanks,
Brian
Have you tried storing them as doc's in varbinary (max) or image columns and
indexing them with the Word iFilter.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Brian" <TargetedConvergence@.newsgroup.nospam> wrote in message
news:%23bHGZ5idHHA.4616@.TK2MSFTNGP03.phx.gbl...
> We currently are saving WordML (Word 2003's XML format rather than binary
> format) docs into a column of our SQL Server 2005 database and full text
> indexing on it. Works okay, but not great. For example, all the XML tags
> are indexed... so you find many words that are not in the document (from
> the user persepctive).
> The fix for that is clear... use an XML filter. (Though how to do that is
> not so clear... we tried moving the WordML from a Text column to an XML
> column, but it gives errors on illegal characters in the Word doc.)
> However, it would seem that even an XML filter will not do nearly as well
> as a filter designed for WordML.
> Can anyone point me to a WordML full-text-search filter for SQL Server
> 2005?
> Thanks,
> Brian
>
|||"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:u2u%23lFjdHHA.4656@.TK2MSFTNGP06.phx.gbl...
> Have you tried storing them as doc's in varbinary (max) or image columns
> and indexing them with the Word iFilter.
No, for our app we need to keep them as .xml files, not .doc files.
But we could put the Word .xml file in a varbinary column if there is a
WordML iFilter out there that would act on the .xml file.
Thanks,
Brian
|||Hi Brian,
have you tried storying your WordML files in an a column of type XML? That
should invoke the XML filter.
Best regards,
-Denis.
"Brian" wrote:
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:u2u%23lFjdHHA.4656@.TK2MSFTNGP06.phx.gbl...
>
> No, for our app we need to keep them as .xml files, not .doc files.
> But we could put the Word .xml file in a varbinary column if there is a
> WordML iFilter out there that would act on the .xml file.
> Thanks,
> Brian
>
>
|||"denistc" <denistc@.discussions.microsoft.com> wrote in message
news:64C9346C-881C-4FC5-928C-1C7751ACECA6@.microsoft.com...
> have you tried storying your WordML files in an a column of type XML? That
> should invoke the XML filter.
Yes, though we've had trouble with some WordML files being rejected.
We've narrowed the issue on that front... any WordML file that has "UTF-8"
in the docheader gets rejected... not sure why though. Also not sure why
Word is creating some files with that encoding. Simply removing the tag
from the docheader (without any other re-encoding) seems to work fine, oddly
enough.
We're a bit nervous to move to the XML column until we understand what
conditions might cause XML to reject a WordML doc coming out of Word...
because without that understanding, we can't be sure it won't happen to our
customers.
Thanks for the suggestion,
Brian
|||"Brian" <TargetedConvergence@.newsgroup.nospam> wrote in message
news:%23OqdVzFgHHA.2396@.TK2MSFTNGP04.phx.gbl...
> Yes, though we've had trouble with some WordML files being rejected.
> We've narrowed the issue on that front... any WordML file that has "UTF-8"
> in the docheader gets rejected... not sure why though. Also not sure why
> Word is creating some files with that encoding. Simply removing the tag
> from the docheader (without any other re-encoding) seems to work fine,
> oddly
> enough.
Haven't done much with WordML myself, but assuming the WordML file has
"UTF-8" in the docheader, I'd be interested to know if it actually is a
UTF-8 file? Or is it possible it is being saved with an incorrect BOM or
invalid (non-UTF-8-encoded) characters in the doc? One of those two would
be my first guess. If so, that might be a bug that needs to be reported to
MS. You might try opening that WordML file in a hex editor to verify what
is actually being stored.
Showing posts with label format. Show all posts
Showing posts with label format. Show all posts
Thursday, March 29, 2012
filter for SQL commad ?
I dont know to write SQL command filter.
m_strQueryDelete.Format("DELETE FROM tab WHERE (Col1 = abc AND Col2
= abc AND ??)"
example: ODBC found 100 records.
I need to delete first 90 records and to leave last 10 records.
Thank you
Joseph
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/Client-filte...ict259609.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=894697
Is there a unique field in the table, where you could write a query
like:
DELETE FROM TAB WHERE UNIQUE_FIELD IN
(SELECT TOP 90 UNIQUE_FIELD FROM TAB WHERE (COL1= 'ABC' AND COL2='ABC'
AND ??))
Good luck,
Tony Sebion
"Joseph" <UseLinkToEmail@.dbForumz.com> wrote in message
news:4_894697_c2b2ed0878532c267d72ee72a1e9aff5@.dbf orumz.com:
> I don't know to write SQL command filter.
> m_strQueryDelete.Format("DELETE FROM tab WHERE (Col1 = 'abc' AND Col2
> = 'abc' AND ??)"
> example: ODBC found 100 records.
> I need to delete first 90 records and to leave last 10 records.
> Thank you
> Joseph
> --
> Posted using the http://www.dbforumz.com interface, at author's request
> Articles individually checked for conformance to usenet standards
> Topic URL: http://www.dbforumz.com/Client-filte...ict259609.html
> Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=894697
sql
m_strQueryDelete.Format("DELETE FROM tab WHERE (Col1 = abc AND Col2
= abc AND ??)"
example: ODBC found 100 records.
I need to delete first 90 records and to leave last 10 records.
Thank you
Joseph
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/Client-filte...ict259609.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=894697
Is there a unique field in the table, where you could write a query
like:
DELETE FROM TAB WHERE UNIQUE_FIELD IN
(SELECT TOP 90 UNIQUE_FIELD FROM TAB WHERE (COL1= 'ABC' AND COL2='ABC'
AND ??))
Good luck,
Tony Sebion
"Joseph" <UseLinkToEmail@.dbForumz.com> wrote in message
news:4_894697_c2b2ed0878532c267d72ee72a1e9aff5@.dbf orumz.com:
> I don't know to write SQL command filter.
> m_strQueryDelete.Format("DELETE FROM tab WHERE (Col1 = 'abc' AND Col2
> = 'abc' AND ??)"
> example: ODBC found 100 records.
> I need to delete first 90 records and to leave last 10 records.
> Thank you
> Joseph
> --
> Posted using the http://www.dbforumz.com interface, at author's request
> Articles individually checked for conformance to usenet standards
> Topic URL: http://www.dbforumz.com/Client-filte...ict259609.html
> Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=894697
sql
Tuesday, March 27, 2012
Filling out missing data in subsequent records?
Hi
I receive several datafiles from another system that are more or less in a Excel pivot table like format.
That is the first row representing the current data is fully filled, while subsequent rows, representing historic data are left partly empty.
Current rows and historic rows have different identifiers, e.g. rectype=0 or 1
Filling out the missing data on the historic record should be simple, if only all current rows would be filled.
Some current rows aren't filled, so the stuff like the following doesn't work:
update t1
set t1.colA =
(
select top 1 t2.colA
from mytable AS t2
where t2.rowid <= t1.rowid
and t2.cola <> 0
order by t2.rowid desc
)
from mytable AS t1
Somehow I need to check for the rectype, so I don't fill out rows with data from a previous entity
Any suggestions before I revert to using a cursor?
And while we are at it: I am in for an easy way to do this for all (about 60) colums in one move?
Before you ask:
After filling everything out we process the file to arrive at a few handy fromto tables, so we can use the correct data about the entity's status at a particular point in time elsewhere
I am using MS SQL Server 2005, and solutions are allowd to use any specific trickery that MSSQL allows.
Many thanks for any constructive thoughts
Cheers
DrioWould this do the job? My changes are highlighted
UPDATE t1
SET t1.colA =
(
SELECT TOP 1 t2.colA
FROM MyTable AS t2
WHERE t2.rowid < t1.rowid
AND t2.colA <> 0
ORDER BY t2.rowid DESC
)
FROM mytable AS t1
WHERE rectype = 0
I havn't tested this code - it's only in my head (/on the screen) so don't use it on your live data ;)|||Thnak you georgev:
for the tagline (I won't do it again; a real eye-opener)
for the small correction in my code and for the direction.
It goes wrong where there are history record after the current reccord with no data.Obvioulsy they get filled from the previous current record that hadd data.
My interim solution
1. update all current records wh data with a dummy value
2. use the fill out query
We then have to check the marked records and see if we can find a pattern that allows us the handle them in code (otherwise someone has to go through them manually; only .25% of total)
Thanks for you swift response
Cheers
Drio
I receive several datafiles from another system that are more or less in a Excel pivot table like format.
That is the first row representing the current data is fully filled, while subsequent rows, representing historic data are left partly empty.
Current rows and historic rows have different identifiers, e.g. rectype=0 or 1
Filling out the missing data on the historic record should be simple, if only all current rows would be filled.
Some current rows aren't filled, so the stuff like the following doesn't work:
update t1
set t1.colA =
(
select top 1 t2.colA
from mytable AS t2
where t2.rowid <= t1.rowid
and t2.cola <> 0
order by t2.rowid desc
)
from mytable AS t1
Somehow I need to check for the rectype, so I don't fill out rows with data from a previous entity
Any suggestions before I revert to using a cursor?
And while we are at it: I am in for an easy way to do this for all (about 60) colums in one move?
Before you ask:
After filling everything out we process the file to arrive at a few handy fromto tables, so we can use the correct data about the entity's status at a particular point in time elsewhere
I am using MS SQL Server 2005, and solutions are allowd to use any specific trickery that MSSQL allows.
Many thanks for any constructive thoughts
Cheers
DrioWould this do the job? My changes are highlighted
UPDATE t1
SET t1.colA =
(
SELECT TOP 1 t2.colA
FROM MyTable AS t2
WHERE t2.rowid < t1.rowid
AND t2.colA <> 0
ORDER BY t2.rowid DESC
)
FROM mytable AS t1
WHERE rectype = 0
I havn't tested this code - it's only in my head (/on the screen) so don't use it on your live data ;)|||Thnak you georgev:
for the tagline (I won't do it again; a real eye-opener)
for the small correction in my code and for the direction.
It goes wrong where there are history record after the current reccord with no data.Obvioulsy they get filled from the previous current record that hadd data.
My interim solution
1. update all current records wh data with a dummy value
2. use the fill out query
We then have to check the marked records and see if we can find a pattern that allows us the handle them in code (otherwise someone has to go through them manually; only .25% of total)
Thanks for you swift response
Cheers
Drio
Friday, March 9, 2012
Filegroup & .NDF Question
This is a multi-part message in MIME format.
--=_NextPart_000_0008_01C68EFB.3FF73960
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
How can I change the FILEGROUP on database properties?
SQL Server 2000
I restored one database to create a new database, but the .ndf filegroup = of the restored db has the name of the restored db.
For example;
DB 1 =3D TestDB1.mdf TestINDX1.ndf TestLog1.ldf
Backup this db & restore as Test2
DB 2 =3D TestDB2.mdf TestINDX2.ndf (BUT in EM Properties under = filegroup it has "TestINDX1"
I tried dbcc shrinkfile(TestIndx2, emptyfile), so that I could just = delete the .NDF & recreate it in EM with the correct filegroup name, but = it keeps telling me I can't drop the .ndf because it is NOT empty.
Where am I going wrong?
Also, am I missing something in my restore? Is there T-Sql in the = restore that designates the .ndf filegroup name & I am missing it?
Any instruction/suggestions will be appreciated!!!
thanx!
--=_NextPart_000_0008_01C68EFB.3FF73960
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
How can I change the FILEGROUP on database properties?
SQL Server 2000
I restored one database to create a new = database, but the .ndf filegroup of the restored db has the name of the restored db.
For example;
DB 1 =3D TestDB1.mdf TestINDX1.ndf TestLog1.ldf
Backup this db & restore as = Test2
DB 2 =3D TestDB2.mdf = TestINDX2.ndf (BUT in EM Properties under filegroup it has "TestINDX1"
I tried dbcc shrinkfile(TestIndx2, = emptyfile), so that I could just delete the .NDF & recreate it in EM with the correct = filegroup name, but it keeps telling me I can't drop the .ndf because it is NOT empty.
Where am I going wrong?
Also, am I missing something in my = restore? Is there T-Sql in the restore that designates the .ndf filegroup name = & I am missing it?
Any instruction/suggestions will be appreciated!!!
thanx!
--=_NextPart_000_0008_01C68EFB.3FF73960--Jude,
1 - You can change the name of the physical files during restore operation
using "with move" option.
2 - You can change the logical name of the files, using the statement "alter
database".
alter database northwind
modify file (name = 'northwind', newname = 'northwind1')
exec sp_helpdb northwind
go
See BOL for more info.
AMB
"Jude" wrote:
> How can I change the FILEGROUP on database properties?
> SQL Server 2000
> I restored one database to create a new database, but the .ndf filegroup of the restored db has the name of the restored db.
> For example;
> DB 1 = TestDB1.mdf TestINDX1.ndf TestLog1.ldf
> Backup this db & restore as Test2
> DB 2 = TestDB2.mdf TestINDX2.ndf (BUT in EM Properties under filegroup it has "TestINDX1"
> I tried dbcc shrinkfile(TestIndx2, emptyfile), so that I could just delete the .NDF & recreate it in EM with the correct filegroup name, but it keeps telling me I can't drop the .ndf because it is NOT empty.
> Where am I going wrong?
> Also, am I missing something in my restore? Is there T-Sql in the restore that designates the .ndf filegroup name & I am missing it?
> Any instruction/suggestions will be appreciated!!!
> thanx!
>|||"With Move", I'll look it up in BOL.
thanx!
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:509ED16F-2201-4D31-835E-B5EAE48C53B0@.microsoft.com...
> Jude,
> 1 - You can change the name of the physical files during restore operation
> using "with move" option.
> 2 - You can change the logical name of the files, using the statement
> "alter
> database".
> alter database northwind
> modify file (name = 'northwind', newname = 'northwind1')
> exec sp_helpdb northwind
> go
> See BOL for more info.
>
> AMB
> "Jude" wrote:
>> How can I change the FILEGROUP on database properties?
>> SQL Server 2000
>> I restored one database to create a new database, but the .ndf filegroup
>> of the restored db has the name of the restored db.
>> For example;
>> DB 1 = TestDB1.mdf TestINDX1.ndf TestLog1.ldf
>> Backup this db & restore as Test2
>> DB 2 = TestDB2.mdf TestINDX2.ndf (BUT in EM Properties under filegroup
>> it has "TestINDX1"
>> I tried dbcc shrinkfile(TestIndx2, emptyfile), so that I could just
>> delete the .NDF & recreate it in EM with the correct filegroup name, but
>> it keeps telling me I can't drop the .ndf because it is NOT empty.
>> Where am I going wrong?
>> Also, am I missing something in my restore? Is there T-Sql in the
>> restore that designates the .ndf filegroup name & I am missing it?
>> Any instruction/suggestions will be appreciated!!!
>> thanx!
>>
--=_NextPart_000_0008_01C68EFB.3FF73960
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
How can I change the FILEGROUP on database properties?
SQL Server 2000
I restored one database to create a new database, but the .ndf filegroup = of the restored db has the name of the restored db.
For example;
DB 1 =3D TestDB1.mdf TestINDX1.ndf TestLog1.ldf
Backup this db & restore as Test2
DB 2 =3D TestDB2.mdf TestINDX2.ndf (BUT in EM Properties under = filegroup it has "TestINDX1"
I tried dbcc shrinkfile(TestIndx2, emptyfile), so that I could just = delete the .NDF & recreate it in EM with the correct filegroup name, but = it keeps telling me I can't drop the .ndf because it is NOT empty.
Where am I going wrong?
Also, am I missing something in my restore? Is there T-Sql in the = restore that designates the .ndf filegroup name & I am missing it?
Any instruction/suggestions will be appreciated!!!
thanx!
--=_NextPart_000_0008_01C68EFB.3FF73960
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
How can I change the FILEGROUP on database properties?
SQL Server 2000
I restored one database to create a new = database, but the .ndf filegroup of the restored db has the name of the restored db.
For example;
DB 1 =3D TestDB1.mdf TestINDX1.ndf TestLog1.ldf
Backup this db & restore as = Test2
DB 2 =3D TestDB2.mdf = TestINDX2.ndf (BUT in EM Properties under filegroup it has "TestINDX1"
I tried dbcc shrinkfile(TestIndx2, = emptyfile), so that I could just delete the .NDF & recreate it in EM with the correct = filegroup name, but it keeps telling me I can't drop the .ndf because it is NOT empty.
Where am I going wrong?
Also, am I missing something in my = restore? Is there T-Sql in the restore that designates the .ndf filegroup name = & I am missing it?
Any instruction/suggestions will be appreciated!!!
thanx!
--=_NextPart_000_0008_01C68EFB.3FF73960--Jude,
1 - You can change the name of the physical files during restore operation
using "with move" option.
2 - You can change the logical name of the files, using the statement "alter
database".
alter database northwind
modify file (name = 'northwind', newname = 'northwind1')
exec sp_helpdb northwind
go
See BOL for more info.
AMB
"Jude" wrote:
> How can I change the FILEGROUP on database properties?
> SQL Server 2000
> I restored one database to create a new database, but the .ndf filegroup of the restored db has the name of the restored db.
> For example;
> DB 1 = TestDB1.mdf TestINDX1.ndf TestLog1.ldf
> Backup this db & restore as Test2
> DB 2 = TestDB2.mdf TestINDX2.ndf (BUT in EM Properties under filegroup it has "TestINDX1"
> I tried dbcc shrinkfile(TestIndx2, emptyfile), so that I could just delete the .NDF & recreate it in EM with the correct filegroup name, but it keeps telling me I can't drop the .ndf because it is NOT empty.
> Where am I going wrong?
> Also, am I missing something in my restore? Is there T-Sql in the restore that designates the .ndf filegroup name & I am missing it?
> Any instruction/suggestions will be appreciated!!!
> thanx!
>|||"With Move", I'll look it up in BOL.
thanx!
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:509ED16F-2201-4D31-835E-B5EAE48C53B0@.microsoft.com...
> Jude,
> 1 - You can change the name of the physical files during restore operation
> using "with move" option.
> 2 - You can change the logical name of the files, using the statement
> "alter
> database".
> alter database northwind
> modify file (name = 'northwind', newname = 'northwind1')
> exec sp_helpdb northwind
> go
> See BOL for more info.
>
> AMB
> "Jude" wrote:
>> How can I change the FILEGROUP on database properties?
>> SQL Server 2000
>> I restored one database to create a new database, but the .ndf filegroup
>> of the restored db has the name of the restored db.
>> For example;
>> DB 1 = TestDB1.mdf TestINDX1.ndf TestLog1.ldf
>> Backup this db & restore as Test2
>> DB 2 = TestDB2.mdf TestINDX2.ndf (BUT in EM Properties under filegroup
>> it has "TestINDX1"
>> I tried dbcc shrinkfile(TestIndx2, emptyfile), so that I could just
>> delete the .NDF & recreate it in EM with the correct filegroup name, but
>> it keeps telling me I can't drop the .ndf because it is NOT empty.
>> Where am I going wrong?
>> Also, am I missing something in my restore? Is there T-Sql in the
>> restore that designates the .ndf filegroup name & I am missing it?
>> Any instruction/suggestions will be appreciated!!!
>> thanx!
>>
Labels:
_nextpart_000_0008_01c68efb,
3ff73960,
charset,
content-type,
database,
filegroup,
format,
iso-8859-1,
message,
microsoft,
mime,
multi-part,
mysql,
ndf,
oracle,
plain,
server,
sql,
text
Sunday, February 26, 2012
File size big when download report
Hi
I download my report using SQL Server Reporting service export function
(excel format), The file size is very big, when compare to my previous asp
download function.
Note: The no of rec is same.
Ex: Using ASP, the file size is about 1000 kb
Using RS, the file size is about 23,000 kb.
Pls help me, what should I do to reduce the file size to normal.
Thanks
Regards
Kumar.Are you using SP1 version of RS? SP1 introduced excel using its native
store, while RTM used MHTML which was much larger.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Kumar" <Kumar@.discussions.microsoft.com> wrote in message
news:5126C810-2785-4B32-A46C-6FB085FCAADD@.microsoft.com...
> Hi
> I download my report using SQL Server Reporting service export function
> (excel format), The file size is very big, when compare to my previous asp
> download function.
> Note: The no of rec is same.
> Ex: Using ASP, the file size is about 1000 kb
> Using RS, the file size is about 23,000 kb.
> Pls help me, what should I do to reduce the file size to normal.
> Thanks
> Regards
> Kumar.
>
I download my report using SQL Server Reporting service export function
(excel format), The file size is very big, when compare to my previous asp
download function.
Note: The no of rec is same.
Ex: Using ASP, the file size is about 1000 kb
Using RS, the file size is about 23,000 kb.
Pls help me, what should I do to reduce the file size to normal.
Thanks
Regards
Kumar.Are you using SP1 version of RS? SP1 introduced excel using its native
store, while RTM used MHTML which was much larger.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Kumar" <Kumar@.discussions.microsoft.com> wrote in message
news:5126C810-2785-4B32-A46C-6FB085FCAADD@.microsoft.com...
> Hi
> I download my report using SQL Server Reporting service export function
> (excel format), The file size is very big, when compare to my previous asp
> download function.
> Note: The no of rec is same.
> Ex: Using ASP, the file size is about 1000 kb
> Using RS, the file size is about 23,000 kb.
> Pls help me, what should I do to reduce the file size to normal.
> Thanks
> Regards
> Kumar.
>
Subscribe to:
Posts (Atom)