I have a Text field in my database that has data along with the HTML tags.
I dont want to search these HTML tags on my FUll text Search.
Example Data
< Font color='red'> Blah</Font>
I want to ignore the font tages on my search.
How do i do it?
save the content in the text data type columns into columns of the image
data type, and use the document type column with a value of htm so that only
the content of these files will be indexed.
"Bruce" <Bruce@.discussions.microsoft.com> wrote in message
news:3BF3659B-E3EB-495F-8D17-75DDD996E323@.microsoft.com...
>I have a Text field in my database that has data along with the HTML tags.
> I dont want to search these HTML tags on my FUll text Search.
> Example Data
> < Font color='red'> Blah</Font>
> I want to ignore the font tages on my search.
> How do i do it?
>
|||Can you please be more elaborate.I am indexing almost 9 columns of Text data
type.How do I save all these columns into columns of the image data type?
How do I use document type columns?
"Hilary Cotter" wrote:
> save the content in the text data type columns into columns of the image
> data type, and use the document type column with a value of htm so that only
> the content of these files will be indexed.
> "Bruce" <Bruce@.discussions.microsoft.com> wrote in message
> news:3BF3659B-E3EB-495F-8D17-75DDD996E323@.microsoft.com...
>
>
|||for the document type column you must
1) ensure you have a column which is char(3) or char(4) and contains the
value htm or .htm
2) store your html content in an image data type column
3) use sp_fulltext_column to specify that the document type is specified in
the document type column you created above in 1)
here is an example
sp_fulltext_column 'MyTable','ImageColumn', 'add', 1033,
'DocumentTypeColumn'
where MyTable is the table you are full text indexing, ImageColumn is a
column of the image datatype, and DocumentTypeColumn is the char(3) or
char(4) column which tells what the native type of the document you are
storing is.
Now, if you also might want to convert your docs to pure text. Using
FiltDump -b myhtmldoc.htm > myhtmldoc.txt is one way of doing it.
To convert your columns from html to text or from the text datatype to image
you should spit them out to the file system, and then convert them and push
them back.
Let me know if you need code samples to do this.
"Bruce" <Bruce@.discussions.microsoft.com> wrote in message
news:604B02B0-2741-402F-AE62-318452B9BDF0@.microsoft.com...
> Can you please be more elaborate.I am indexing almost 9 columns of Text
data[vbcol=seagreen]
> type.How do I save all these columns into columns of the image data type?
> How do I use document type columns?
>
> "Hilary Cotter" wrote:
only[vbcol=seagreen]
tags.[vbcol=seagreen]
|||Hilary,
"Now, if you also might want to convert your docs to pure text. Using
FiltDump -b myhtmldoc.htm > myhtmldoc.txt is one way of doing it."
Is the use of FiltDump in the above scenario a violation of Microsoft's
licensing agreement?
Thanks,
John
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:uIB1eqrtEHA.2596@.TK2MSFTNGP10.phx.gbl...
> for the document type column you must
> 1) ensure you have a column which is char(3) or char(4) and contains the
> value htm or .htm
> 2) store your html content in an image data type column
> 3) use sp_fulltext_column to specify that the document type is specified
in
> the document type column you created above in 1)
> here is an example
> sp_fulltext_column 'MyTable','ImageColumn', 'add', 1033,
> 'DocumentTypeColumn'
>
> where MyTable is the table you are full text indexing, ImageColumn is a
> column of the image datatype, and DocumentTypeColumn is the char(3) or
> char(4) column which tells what the native type of the document you are
> storing is.
> Now, if you also might want to convert your docs to pure text. Using
> FiltDump -b myhtmldoc.htm > myhtmldoc.txt is one way of doing it.
> To convert your columns from html to text or from the text datatype to
image
> you should spit them out to the file system, and then convert them and
push[vbcol=seagreen]
> them back.
> Let me know if you need code samples to do this.
>
> "Bruce" <Bruce@.discussions.microsoft.com> wrote in message
> news:604B02B0-2741-402F-AE62-318452B9BDF0@.microsoft.com...
> data
type?[vbcol=seagreen]
image[vbcol=seagreen]
that
> only
> tags.
>
|||That's in interesting question. I'll have to check into it.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"John Kane" <jt-kane@.comcast.net> wrote in message
news:OEpwKoFuEHA.2624@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> Hilary,
> "Now, if you also might want to convert your docs to pure text. Using
> FiltDump -b myhtmldoc.htm > myhtmldoc.txt is one way of doing it."
> Is the use of FiltDump in the above scenario a violation of Microsoft's
> licensing agreement?
> Thanks,
> John
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:uIB1eqrtEHA.2596@.TK2MSFTNGP10.phx.gbl...
> in
> image
> push
Text[vbcol=seagreen]
> type?
> image
> that
HTML
>
|||Yes, as you had indicated in the past that any such use was not allowed by a
non-publicly available license policy for these files in another thread. If
you or Microsoft would make this licensing policy public, then there would
be less confusion on this issue.
Best Regards,
John
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:#SNgrgWuEHA.3320@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> That's in interesting question. I'll have to check into it.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> "John Kane" <jt-kane@.comcast.net> wrote in message
> news:OEpwKoFuEHA.2624@.TK2MSFTNGP11.phx.gbl...
the[vbcol=seagreen]
specified[vbcol=seagreen]
a[vbcol=seagreen]
are
> Text
> HTML
>
|||Specifically what I said in the past was that I had been advised by
Microsoft that you could not use the word breakers for your own purposes, ie
to roll your own hit highlighting solution.
Filtdump may be another matter, as it is a diagnostic tool.
"John Kane" <jt-kane@.comcast.net> wrote in message
news:%2344qClXuEHA.2828@.TK2MSFTNGP12.phx.gbl...
> Yes, as you had indicated in the past that any such use was not allowed by
> a
> non-publicly available license policy for these files in another thread.
> If
> you or Microsoft would make this licensing policy public, then there would
> be less confusion on this issue.
> Best Regards,
> John
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:#SNgrgWuEHA.3320@.TK2MSFTNGP15.phx.gbl...
> the
> specified
> a
> are
>
|||You also "generalized" response to include ALL .dll and .exe files in
addition to the wordbreaker dll files, if memory servers me correctly. I
also asked you (or Microsoft) at that time to make public (and now again)
the specific licensing policy from Microsoft that you are referring to. If
it is a secret or under NDA, then how can anyone judge whether or not he or
she is violating a non-public licensing agreement.
Best Regards,
John
PS: Feel free to contact me off-line.
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:eyNhvefuEHA.3456@.TK2MSFTNGP10.phx.gbl...
> Specifically what I said in the past was that I had been advised by
> Microsoft that you could not use the word breakers for your own purposes,
ie[vbcol=seagreen]
> to roll your own hit highlighting solution.
> Filtdump may be another matter, as it is a diagnostic tool.
>
> "John Kane" <jt-kane@.comcast.net> wrote in message
> news:%2344qClXuEHA.2828@.TK2MSFTNGP12.phx.gbl...
by[vbcol=seagreen]
would[vbcol=seagreen]
Microsoft's[vbcol=seagreen]
contains[vbcol=seagreen]
is[vbcol=seagreen]
Using[vbcol=seagreen]
of[vbcol=seagreen]
data[vbcol=seagreen]
[vbcol=seagreen]
the
>
|||Please review the pertinent posts:
http://groups.google.com/groups?hl=e...ver .fulltext
http://groups.google.com/groups?hl=e...ver .fulltext
I am not trying to hide anything and AFAIK the communication was not under
NDA. I do not have the communication I had with the Microsoft developer, nor
do I have the response I received from the link I posted as I posted above.
The link I posted is regarding distributing dlls and exes, as you correctly
point out. When I asked another question about tapping into services exposed
by another Microsoft product for my commercial use, I was directed to this
link by a PSS engineer who explained this was the forum to ask these
questions to.
I'll follow up on filtdump and post back here with the response I get. I
will ask that it can be made public.
Please stop mischaracterizing what I say, or check the original posts before
commenting on them.
"John Kane" <jt-kane@.comcast.net> wrote in message
news:#dD0fKhuEHA.2632@.TK2MSFTNGP10.phx.gbl...
> You also "generalized" response to include ALL .dll and .exe files in
> addition to the wordbreaker dll files, if memory servers me correctly. I
> also asked you (or Microsoft) at that time to make public (and now again)
> the specific licensing policy from Microsoft that you are referring to. If
> it is a secret or under NDA, then how can anyone judge whether or not he
or[vbcol=seagreen]
> she is violating a non-public licensing agreement.
> Best Regards,
> John
> PS: Feel free to contact me off-line.
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:eyNhvefuEHA.3456@.TK2MSFTNGP10.phx.gbl...
purposes,[vbcol=seagreen]
> ie
allowed[vbcol=seagreen]
> by
thread.[vbcol=seagreen]
> would
Using[vbcol=seagreen]
> Microsoft's
> contains
ImageColumn[vbcol=seagreen]
> is
char(3)[vbcol=seagreen]
you[vbcol=seagreen]
> Using
datatype[vbcol=seagreen]
them[vbcol=seagreen]
> of
> data
of[vbcol=seagreen]
htm[vbcol=seagreen]
> the
Search.
>
Showing posts with label field. Show all posts
Showing posts with label field. Show all posts
Thursday, March 29, 2012
filter expression "LIKE" together with report paramter in RS
Hi there
I have a text field that I would like to filter with a LIKE expression, i.e.:
WHERE (dbo.TBL_SchiBeriBeso.Bemerkung LIKE '%BSK%')
When I use this filter expression in the data query of Reporting Services
everything goes well.
But when I try to use this filter expression in the the report item (table)
I don't get this filter expression working. How do I write this filter
expression in the filter definition in the properties of my table? How
exactly is the right way to write the filter value (BSK) so that the filter
gets me every text field that has BSK somewhere in its contents?
Thanks a lot for your help!
Judith.If you are using a parameter in the Like expression with a wild card try it
like this:
WHERE (dbo.TBL_SchiBeriBeso.Bemerkung LIKE '%' + @.BSK + '%')
"j schuetz" <jschuetz@.discussions.microsoft.com> wrote in message
news:52BC887E-C77F-4FC7-9DDE-ED5B20826EAF@.microsoft.com...
> Hi there
> I have a text field that I would like to filter with a LIKE expression,
> i.e.:
> WHERE (dbo.TBL_SchiBeriBeso.Bemerkung LIKE '%BSK%')
> When I use this filter expression in the data query of Reporting Services
> everything goes well.
> But when I try to use this filter expression in the the report item
> (table)
> I don't get this filter expression working. How do I write this filter
> expression in the filter definition in the properties of my table? How
> exactly is the right way to write the filter value (BSK) so that the
> filter
> gets me every text field that has BSK somewhere in its contents?
> Thanks a lot for your help!
> Judith.|||Thank you for your input. I know now how to solve the problem. The thing is
that the syntax of the filter expression in the table properties window is
different from the syntax in the query.
The value field in the filter expression of the table properties has to have
the following syntax: [= "*" & Parameters!Stichwort.Value & "*"], i.e. the
wild card symbol is * instead of %.
With this syntax the LIKE operator in the table properties window works just
fine!
"Steve Dearman" wrote:
> If you are using a parameter in the Like expression with a wild card try it
> like this:
> WHERE (dbo.TBL_SchiBeriBeso.Bemerkung LIKE '%' + @.BSK + '%')
>
> "j schuetz" <jschuetz@.discussions.microsoft.com> wrote in message
> news:52BC887E-C77F-4FC7-9DDE-ED5B20826EAF@.microsoft.com...
> > Hi there
> >
> > I have a text field that I would like to filter with a LIKE expression,
> > i.e.:
> > WHERE (dbo.TBL_SchiBeriBeso.Bemerkung LIKE '%BSK%')
> >
> > When I use this filter expression in the data query of Reporting Services
> > everything goes well.
> >
> > But when I try to use this filter expression in the the report item
> > (table)
> > I don't get this filter expression working. How do I write this filter
> > expression in the filter definition in the properties of my table? How
> > exactly is the right way to write the filter value (BSK) so that the
> > filter
> > gets me every text field that has BSK somewhere in its contents?
> >
> > Thanks a lot for your help!
> >
> > Judith.
>
>
I have a text field that I would like to filter with a LIKE expression, i.e.:
WHERE (dbo.TBL_SchiBeriBeso.Bemerkung LIKE '%BSK%')
When I use this filter expression in the data query of Reporting Services
everything goes well.
But when I try to use this filter expression in the the report item (table)
I don't get this filter expression working. How do I write this filter
expression in the filter definition in the properties of my table? How
exactly is the right way to write the filter value (BSK) so that the filter
gets me every text field that has BSK somewhere in its contents?
Thanks a lot for your help!
Judith.If you are using a parameter in the Like expression with a wild card try it
like this:
WHERE (dbo.TBL_SchiBeriBeso.Bemerkung LIKE '%' + @.BSK + '%')
"j schuetz" <jschuetz@.discussions.microsoft.com> wrote in message
news:52BC887E-C77F-4FC7-9DDE-ED5B20826EAF@.microsoft.com...
> Hi there
> I have a text field that I would like to filter with a LIKE expression,
> i.e.:
> WHERE (dbo.TBL_SchiBeriBeso.Bemerkung LIKE '%BSK%')
> When I use this filter expression in the data query of Reporting Services
> everything goes well.
> But when I try to use this filter expression in the the report item
> (table)
> I don't get this filter expression working. How do I write this filter
> expression in the filter definition in the properties of my table? How
> exactly is the right way to write the filter value (BSK) so that the
> filter
> gets me every text field that has BSK somewhere in its contents?
> Thanks a lot for your help!
> Judith.|||Thank you for your input. I know now how to solve the problem. The thing is
that the syntax of the filter expression in the table properties window is
different from the syntax in the query.
The value field in the filter expression of the table properties has to have
the following syntax: [= "*" & Parameters!Stichwort.Value & "*"], i.e. the
wild card symbol is * instead of %.
With this syntax the LIKE operator in the table properties window works just
fine!
"Steve Dearman" wrote:
> If you are using a parameter in the Like expression with a wild card try it
> like this:
> WHERE (dbo.TBL_SchiBeriBeso.Bemerkung LIKE '%' + @.BSK + '%')
>
> "j schuetz" <jschuetz@.discussions.microsoft.com> wrote in message
> news:52BC887E-C77F-4FC7-9DDE-ED5B20826EAF@.microsoft.com...
> > Hi there
> >
> > I have a text field that I would like to filter with a LIKE expression,
> > i.e.:
> > WHERE (dbo.TBL_SchiBeriBeso.Bemerkung LIKE '%BSK%')
> >
> > When I use this filter expression in the data query of Reporting Services
> > everything goes well.
> >
> > But when I try to use this filter expression in the the report item
> > (table)
> > I don't get this filter expression working. How do I write this filter
> > expression in the filter definition in the properties of my table? How
> > exactly is the right way to write the filter value (BSK) so that the
> > filter
> > gets me every text field that has BSK somewhere in its contents?
> >
> > Thanks a lot for your help!
> >
> > Judith.
>
>
Filter date for ToDay, some problem with time.
I all.
In a talbe I've a datatime field. for example it contain '16-4-2007 10:45'.
I like to write a SQL that return all record with the date field equals '16-4-2007' (it's not important the time). how to?
thank you.
Try this query to retrive data
select
*from clientswhere clientAddressbetween'2007-04-12 00:00:00.000'and'2007-04-12 23:59:59.999'The alternative query is
select
*from clientswhere clientAddress>='2007-04-12'and clientAddress<'2007-04-13'The time format is yyyy-MM-dd and time. Since you are saving time in DB the query should be framed as above
Hope this will help you
|||try this syntax
how it works: convert string to date time with correct format for date string and next convert date time back to string with format you need.
See help for CONVERT in T-SQL help for more format info.
Tuesday, March 27, 2012
Filter by concatenated field
How can I filter a query using a cocatenated field? For instance, I have a
query (for instance):
Select id,
ClientCity + ' ' + ClientState + ' ' + ClientZip as ClientInfo
from tblClients
I want to be able to say "where ClientInfo like '% ' + @.Parameter + '%'"
so that I can query by "Chicago" or "60001" as parameters
Thanks for your help.The where clause is parsed before the select list, so you can't do that
because the optimizer won't know what you're talking about (or in rare
cases, you will be filtering on the wrong column, e.g. if you actually had a
clientInfo column with different information). A couple of options:
SELECT
id,
ClientInfo = ClientCity + ' ' + ClientState + ' ' + ClientZip
FROM
tblClients
WHERE
ClientCity + ' ' + ClientState + ' ' + ClientZip LIKE '%'+@.Parameter+'%'
or
SELECT
id,
ClientInfo
FROM
(
SELECT id,
ClientInfo = ClientCity + ' ' + ClientState + ' ' + ClientZip
FROM
tblClients
) subquery
WHERE
ClientInfo LIKE '%'+@.Parameter+'%'
"et" <eagletender2001@.yahoo.com> wrote in message
news:e7MI72JEGHA.524@.TK2MSFTNGP09.phx.gbl...
> How can I filter a query using a cocatenated field? For instance, I have
> a query (for instance):
> Select id,
> ClientCity + ' ' + ClientState + ' ' + ClientZip as ClientInfo
> from tblClients
> I want to be able to say "where ClientInfo like '% ' + @.Parameter + '%'"
> so that I can query by "Chicago" or "60001" as parameters
> Thanks for your help.
>
>
query (for instance):
Select id,
ClientCity + ' ' + ClientState + ' ' + ClientZip as ClientInfo
from tblClients
I want to be able to say "where ClientInfo like '% ' + @.Parameter + '%'"
so that I can query by "Chicago" or "60001" as parameters
Thanks for your help.The where clause is parsed before the select list, so you can't do that
because the optimizer won't know what you're talking about (or in rare
cases, you will be filtering on the wrong column, e.g. if you actually had a
clientInfo column with different information). A couple of options:
SELECT
id,
ClientInfo = ClientCity + ' ' + ClientState + ' ' + ClientZip
FROM
tblClients
WHERE
ClientCity + ' ' + ClientState + ' ' + ClientZip LIKE '%'+@.Parameter+'%'
or
SELECT
id,
ClientInfo
FROM
(
SELECT id,
ClientInfo = ClientCity + ' ' + ClientState + ' ' + ClientZip
FROM
tblClients
) subquery
WHERE
ClientInfo LIKE '%'+@.Parameter+'%'
"et" <eagletender2001@.yahoo.com> wrote in message
news:e7MI72JEGHA.524@.TK2MSFTNGP09.phx.gbl...
> How can I filter a query using a cocatenated field? For instance, I have
> a query (for instance):
> Select id,
> ClientCity + ' ' + ClientState + ' ' + ClientZip as ClientInfo
> from tblClients
> I want to be able to say "where ClientInfo like '% ' + @.Parameter + '%'"
> so that I can query by "Chicago" or "60001" as parameters
> Thanks for your help.
>
>
Labels:
aquery,
clientcity,
clientstate,
cocatenated,
concatenated,
database,
field,
filter,
instance,
microsoft,
mysql,
oracle,
query,
select,
server,
sql
Filling out gaps in a date based select statement
Hi,
I have a query which simply returns a count of a particular field by w
number. My query as it works fine however for w
s where there are no data
it obviously doesn't return a row. My problem is that is I wish for the
statement to return a zero for those w
s with no data - I'm just not sure
how to do this.
I realise that I can achieve it by creating a table listing w
numbers and
joining my query on that table. However I'd rather not create a table like
that. Is there another approach that will let me achieve the same thing?
Currently my query is:
SELECT datepart(wk, datein) AS W
no , COUNT(movementno) AS ContainersIn
STOCK stock
WHERE year(datein) = '2005'
GROUP BY datepart(wk, datein)
which returns:
W
ContainersIn
29 3
31 1
34 5
35 4
36 8
37 6
38 3
39 1
40 12
Thanks,
Chris.See if this helps you
http://weblogs.sqlteam.com/jeffs/ar...09/12/7755.aspx
Madhivanan|||Why don't you want to create a table for this? I would recommend you
keep an auxiliary numbers table (a table integers from 0 to some
arbitrarily large number) for exactly such an application. A Calendar
table is also very useful to have around.
A SELECT statement can't create data out of nothing. Some other options
are: use a derived table in your query with a UNION of the numbers 1 -
52 ; create a view containing those numbers ; create a table-valued
function that returns a parameterized range of numbers ; extract the
numbers from system table(s) (not recommended). Creating the permanent
table would be my favourite - it's fast, easy, portable and much more
concise and transparent than any of the others.
David Portas
SQL Server MVP
--|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1128332658.694445.44410@.g47g2000cwa.googlegroups.com...
> Why don't you want to create a table for this? I would recommend you
> keep an auxiliary numbers table (a table integers from 0 to some
> arbitrarily large number) for exactly such an application. A Calendar
> table is also very useful to have around.
> A SELECT statement can't create data out of nothing. Some other options
> are: use a derived table in your query with a UNION of the numbers 1 -
> 52 ; create a view containing those numbers ; create a table-valued
> function that returns a parameterized range of numbers ; extract the
> numbers from system table(s) (not recommended). Creating the permanent
> table would be my favourite - it's fast, easy, portable and much more
> concise and transparent than any of the others.
> --
> David Portas
> SQL Server MVP
> --
>
Thank your for your help David - most appreciated. I guess I find the idea
of creating a new table "messy". No idea why - just something that has
always struck me as something to avoid. A habit I will have to get out of!
thanks again
Chris.
I have a query which simply returns a count of a particular field by w

number. My query as it works fine however for w
s where there are no datait obviously doesn't return a row. My problem is that is I wish for the
statement to return a zero for those w
s with no data - I'm just not surehow to do this.
I realise that I can achieve it by creating a table listing w
numbers andjoining my query on that table. However I'd rather not create a table like
that. Is there another approach that will let me achieve the same thing?
Currently my query is:
SELECT datepart(wk, datein) AS W
no , COUNT(movementno) AS ContainersInSTOCK stock
WHERE year(datein) = '2005'
GROUP BY datepart(wk, datein)
which returns:
W
ContainersIn29 3
31 1
34 5
35 4
36 8
37 6
38 3
39 1
40 12
Thanks,
Chris.See if this helps you
http://weblogs.sqlteam.com/jeffs/ar...09/12/7755.aspx
Madhivanan|||Why don't you want to create a table for this? I would recommend you
keep an auxiliary numbers table (a table integers from 0 to some
arbitrarily large number) for exactly such an application. A Calendar
table is also very useful to have around.
A SELECT statement can't create data out of nothing. Some other options
are: use a derived table in your query with a UNION of the numbers 1 -
52 ; create a view containing those numbers ; create a table-valued
function that returns a parameterized range of numbers ; extract the
numbers from system table(s) (not recommended). Creating the permanent
table would be my favourite - it's fast, easy, portable and much more
concise and transparent than any of the others.
David Portas
SQL Server MVP
--|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1128332658.694445.44410@.g47g2000cwa.googlegroups.com...
> Why don't you want to create a table for this? I would recommend you
> keep an auxiliary numbers table (a table integers from 0 to some
> arbitrarily large number) for exactly such an application. A Calendar
> table is also very useful to have around.
> A SELECT statement can't create data out of nothing. Some other options
> are: use a derived table in your query with a UNION of the numbers 1 -
> 52 ; create a view containing those numbers ; create a table-valued
> function that returns a parameterized range of numbers ; extract the
> numbers from system table(s) (not recommended). Creating the permanent
> table would be my favourite - it's fast, easy, portable and much more
> concise and transparent than any of the others.
> --
> David Portas
> SQL Server MVP
> --
>
Thank your for your help David - most appreciated. I guess I find the idea
of creating a new table "messy". No idea why - just something that has
always struck me as something to avoid. A habit I will have to get out of!
thanks again
Chris.
Filling a select box ...
...on an asp page with data from a sql server db. Can anyone give me a thumbnail as to how to do that?
I can collect the field data but I want to fill the select drop-down on page load.
Thanks!!Start an HTML FORM. Build an OPTION item for each row in the recordset. Iterate through the recordset, adding additional OPTION items for each row. Then at .EOF, close the connection and finish off the FORM.|||That was what I needed!sql
I can collect the field data but I want to fill the select drop-down on page load.
Thanks!!Start an HTML FORM. Build an OPTION item for each row in the recordset. Iterate through the recordset, adding additional OPTION items for each row. Then at .EOF, close the connection and finish off the FORM.|||That was what I needed!sql
Monday, March 26, 2012
Fill-factor 100 for a CLUSTERED UNIQUE IDENTITY field
hi,
i have a table with IDENTITY field.
i set a CLUSTERED UNIQUE index on this field.
i wonder whether is it right to set this index's Fill-
factor to 100?
i though that if the values of this field are always auto-
incremented so there would never be a need to split places
between records, so there is no need to save space for new
records(or updated records) that might need to be placed
between any other prior inserted records.
is it true?
is it the optimal choise for this case?
thanks,
edo.
Not quite true.
You're on the right track as far as inserts are concerned, but updates are
another matter.
Because clustered indexes contain ALL columns, any updates that increase the
width of the row might cause a page split.
Therefore, whether 100% is optimal or not depends on whether there are any
updates to the table.
HTH
Regards,
Greg Linwood
SQL Server MVP
"edo" <anonymous@.discussions.microsoft.com> wrote in message
news:1c2db01c4528a$671b1890$a601280a@.phx.gbl...
> hi,
> i have a table with IDENTITY field.
> i set a CLUSTERED UNIQUE index on this field.
> i wonder whether is it right to set this index's Fill-
> factor to 100?
> i though that if the values of this field are always auto-
> incremented so there would never be a need to split places
> between records, so there is no need to save space for new
> records(or updated records) that might need to be placed
> between any other prior inserted records.
> is it true?
> is it the optimal choise for this case?
> thanks,
> edo.
|||When you create a clustered index on a table, the actual data rows move into
the leaf level of the clustered index ( and are therefore stored in the
order specified by the index key.)
When there are variable length columns in the table, updating may increase
the length of the row. When a row length increases on a page which is
completely full, it will bump one or more of the rows following it off of
the current page, and onto the next page. This causes extra work...
Completely full pages are wonderful for readers, because the number of IOs
which has to be done decreases, and the amount of memory required to keep
the data is lower as well. But If you ever insert new rows into the middle
of the table, or update rows so that they grow in lenght, page splitting can
occur... If you wish to reduce the speed of some reads, while improving the
insert/update situation, you simply reduce the fillfactor somewhat...
So by setting the fill factor you are stating performance preferences (
readers vs updaters) on the table.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"edo" <anonymous@.discussions.microsoft.com> wrote in message
news:1c2db01c4528a$671b1890$a601280a@.phx.gbl...
> hi,
> i have a table with IDENTITY field.
> i set a CLUSTERED UNIQUE index on this field.
> i wonder whether is it right to set this index's Fill-
> factor to 100?
> i though that if the values of this field are always auto-
> incremented so there would never be a need to split places
> between records, so there is no need to save space for new
> records(or updated records) that might need to be placed
> between any other prior inserted records.
> is it true?
> is it the optimal choise for this case?
> thanks,
> edo.
i have a table with IDENTITY field.
i set a CLUSTERED UNIQUE index on this field.
i wonder whether is it right to set this index's Fill-
factor to 100?
i though that if the values of this field are always auto-
incremented so there would never be a need to split places
between records, so there is no need to save space for new
records(or updated records) that might need to be placed
between any other prior inserted records.
is it true?
is it the optimal choise for this case?
thanks,
edo.
Not quite true.
You're on the right track as far as inserts are concerned, but updates are
another matter.
Because clustered indexes contain ALL columns, any updates that increase the
width of the row might cause a page split.
Therefore, whether 100% is optimal or not depends on whether there are any
updates to the table.
HTH
Regards,
Greg Linwood
SQL Server MVP
"edo" <anonymous@.discussions.microsoft.com> wrote in message
news:1c2db01c4528a$671b1890$a601280a@.phx.gbl...
> hi,
> i have a table with IDENTITY field.
> i set a CLUSTERED UNIQUE index on this field.
> i wonder whether is it right to set this index's Fill-
> factor to 100?
> i though that if the values of this field are always auto-
> incremented so there would never be a need to split places
> between records, so there is no need to save space for new
> records(or updated records) that might need to be placed
> between any other prior inserted records.
> is it true?
> is it the optimal choise for this case?
> thanks,
> edo.
|||When you create a clustered index on a table, the actual data rows move into
the leaf level of the clustered index ( and are therefore stored in the
order specified by the index key.)
When there are variable length columns in the table, updating may increase
the length of the row. When a row length increases on a page which is
completely full, it will bump one or more of the rows following it off of
the current page, and onto the next page. This causes extra work...
Completely full pages are wonderful for readers, because the number of IOs
which has to be done decreases, and the amount of memory required to keep
the data is lower as well. But If you ever insert new rows into the middle
of the table, or update rows so that they grow in lenght, page splitting can
occur... If you wish to reduce the speed of some reads, while improving the
insert/update situation, you simply reduce the fillfactor somewhat...
So by setting the fill factor you are stating performance preferences (
readers vs updaters) on the table.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"edo" <anonymous@.discussions.microsoft.com> wrote in message
news:1c2db01c4528a$671b1890$a601280a@.phx.gbl...
> hi,
> i have a table with IDENTITY field.
> i set a CLUSTERED UNIQUE index on this field.
> i wonder whether is it right to set this index's Fill-
> factor to 100?
> i though that if the values of this field are always auto-
> incremented so there would never be a need to split places
> between records, so there is no need to save space for new
> records(or updated records) that might need to be placed
> between any other prior inserted records.
> is it true?
> is it the optimal choise for this case?
> thanks,
> edo.
Fill-factor 100 for a CLUSTERED UNIQUE IDENTITY field
hi,
i have a table with IDENTITY field.
i set a CLUSTERED UNIQUE index on this field.
i wonder whether is it right to set this index's Fill-
factor to 100?
i though that if the values of this field are always auto-
incremented so there would never be a need to split places
between records, so there is no need to save space for new
records(or updated records) that might need to be placed
between any other prior inserted records.
is it true?
is it the optimal choise for this case?
thanks,
edo.Not quite true.
You're on the right track as far as inserts are concerned, but updates are
another matter.
Because clustered indexes contain ALL columns, any updates that increase the
width of the row might cause a page split.
Therefore, whether 100% is optimal or not depends on whether there are any
updates to the table.
HTH
Regards,
Greg Linwood
SQL Server MVP
"edo" <anonymous@.discussions.microsoft.com> wrote in message
news:1c2db01c4528a$671b1890$a601280a@.phx
.gbl...
> hi,
> i have a table with IDENTITY field.
> i set a CLUSTERED UNIQUE index on this field.
> i wonder whether is it right to set this index's Fill-
> factor to 100?
> i though that if the values of this field are always auto-
> incremented so there would never be a need to split places
> between records, so there is no need to save space for new
> records(or updated records) that might need to be placed
> between any other prior inserted records.
> is it true?
> is it the optimal choise for this case?
> thanks,
> edo.|||When you create a clustered index on a table, the actual data rows move into
the leaf level of the clustered index ( and are therefore stored in the
order specified by the index key.)
When there are variable length columns in the table, updating may increase
the length of the row. When a row length increases on a page which is
completely full, it will bump one or more of the rows following it off of
the current page, and onto the next page. This causes extra work...
Completely full pages are wonderful for readers, because the number of IOs
which has to be done decreases, and the amount of memory required to keep
the data is lower as well. But If you ever insert new rows into the middle
of the table, or update rows so that they grow in lenght, page splitting can
occur... If you wish to reduce the speed of some reads, while improving the
insert/update situation, you simply reduce the fillfactor somewhat...
So by setting the fill factor you are stating performance preferences (
readers vs updaters) on the table.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"edo" <anonymous@.discussions.microsoft.com> wrote in message
news:1c2db01c4528a$671b1890$a601280a@.phx
.gbl...
> hi,
> i have a table with IDENTITY field.
> i set a CLUSTERED UNIQUE index on this field.
> i wonder whether is it right to set this index's Fill-
> factor to 100?
> i though that if the values of this field are always auto-
> incremented so there would never be a need to split places
> between records, so there is no need to save space for new
> records(or updated records) that might need to be placed
> between any other prior inserted records.
> is it true?
> is it the optimal choise for this case?
> thanks,
> edo.sql
i have a table with IDENTITY field.
i set a CLUSTERED UNIQUE index on this field.
i wonder whether is it right to set this index's Fill-
factor to 100?
i though that if the values of this field are always auto-
incremented so there would never be a need to split places
between records, so there is no need to save space for new
records(or updated records) that might need to be placed
between any other prior inserted records.
is it true?
is it the optimal choise for this case?
thanks,
edo.Not quite true.
You're on the right track as far as inserts are concerned, but updates are
another matter.
Because clustered indexes contain ALL columns, any updates that increase the
width of the row might cause a page split.
Therefore, whether 100% is optimal or not depends on whether there are any
updates to the table.
HTH
Regards,
Greg Linwood
SQL Server MVP
"edo" <anonymous@.discussions.microsoft.com> wrote in message
news:1c2db01c4528a$671b1890$a601280a@.phx
.gbl...
> hi,
> i have a table with IDENTITY field.
> i set a CLUSTERED UNIQUE index on this field.
> i wonder whether is it right to set this index's Fill-
> factor to 100?
> i though that if the values of this field are always auto-
> incremented so there would never be a need to split places
> between records, so there is no need to save space for new
> records(or updated records) that might need to be placed
> between any other prior inserted records.
> is it true?
> is it the optimal choise for this case?
> thanks,
> edo.|||When you create a clustered index on a table, the actual data rows move into
the leaf level of the clustered index ( and are therefore stored in the
order specified by the index key.)
When there are variable length columns in the table, updating may increase
the length of the row. When a row length increases on a page which is
completely full, it will bump one or more of the rows following it off of
the current page, and onto the next page. This causes extra work...
Completely full pages are wonderful for readers, because the number of IOs
which has to be done decreases, and the amount of memory required to keep
the data is lower as well. But If you ever insert new rows into the middle
of the table, or update rows so that they grow in lenght, page splitting can
occur... If you wish to reduce the speed of some reads, while improving the
insert/update situation, you simply reduce the fillfactor somewhat...
So by setting the fill factor you are stating performance preferences (
readers vs updaters) on the table.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"edo" <anonymous@.discussions.microsoft.com> wrote in message
news:1c2db01c4528a$671b1890$a601280a@.phx
.gbl...
> hi,
> i have a table with IDENTITY field.
> i set a CLUSTERED UNIQUE index on this field.
> i wonder whether is it right to set this index's Fill-
> factor to 100?
> i though that if the values of this field are always auto-
> incremented so there would never be a need to split places
> between records, so there is no need to save space for new
> records(or updated records) that might need to be placed
> between any other prior inserted records.
> is it true?
> is it the optimal choise for this case?
> thanks,
> edo.sql
Fill-factor 100 for a CLUSTERED UNIQUE IDENTITY field
hi,
i have a table with IDENTITY field.
i set a CLUSTERED UNIQUE index on this field.
i wonder whether is it right to set this index's Fill-
factor to 100?
i though that if the values of this field are always auto-
incremented so there would never be a need to split places
between records, so there is no need to save space for new
records(or updated records) that might need to be placed
between any other prior inserted records.
is it true?
is it the optimal choise for this case?
thanks,
edo.Not quite true.
You're on the right track as far as inserts are concerned, but updates are
another matter.
Because clustered indexes contain ALL columns, any updates that increase the
width of the row might cause a page split.
Therefore, whether 100% is optimal or not depends on whether there are any
updates to the table.
HTH
Regards,
Greg Linwood
SQL Server MVP
"edo" <anonymous@.discussions.microsoft.com> wrote in message
news:1c2db01c4528a$671b1890$a601280a@.phx.gbl...
> hi,
> i have a table with IDENTITY field.
> i set a CLUSTERED UNIQUE index on this field.
> i wonder whether is it right to set this index's Fill-
> factor to 100?
> i though that if the values of this field are always auto-
> incremented so there would never be a need to split places
> between records, so there is no need to save space for new
> records(or updated records) that might need to be placed
> between any other prior inserted records.
> is it true?
> is it the optimal choise for this case?
> thanks,
> edo.|||hi,
thanks for replying me.
increasing (decreasing too?) the WIDTH of a row because of
an update is a new information for me, and i would also
say it is quite shocking for me.
i allways thought table structure is a fixed-width, so the
space for all of the fields is allocated in the same time
and PLACE in advance for each inserted record.
or maybe do you mean that the index may be compuond by
varchar fields so changing the values may change the
lenght of the compound index-value, for example an index-
value coumpound by 2 fields may be changed from "X"+"A"
to "X"+"ABCDEF"
(so if, for example, the table contains integer fields
only, is Fill-factor 100 still be the optimal option even
when updates are concerned)
i guess it's a long story to explain why a clustered index
is actually needs to contain ALL fileds ...?
i probablly missing something (or a lot of things)...
thanks again.
edo.
>--Original Message--
>Not quite true.
>You're on the right track as far as inserts are
concerned, but updates are
>another matter.
>Because clustered indexes contain ALL columns, any
updates that increase the
>width of the row might cause a page split.
>Therefore, whether 100% is optimal or not depends on
whether there are any
>updates to the table.
>HTH
>Regards,
>Greg Linwood
>SQL Server MVP
>"edo" <anonymous@.discussions.microsoft.com> wrote in
message
>news:1c2db01c4528a$671b1890$a601280a@.phx.gbl...
>> hi,
>> i have a table with IDENTITY field.
>> i set a CLUSTERED UNIQUE index on this field.
>> i wonder whether is it right to set this index's Fill-
>> factor to 100?
>> i though that if the values of this field are always
auto-
>> incremented so there would never be a need to split
places
>> between records, so there is no need to save space for
new
>> records(or updated records) that might need to be placed
>> between any other prior inserted records.
>> is it true?
>> is it the optimal choise for this case?
>> thanks,
>> edo.
>
>.
>|||Hi Edo,
On Mon, 14 Jun 2004 21:40:34 -0700, edo wrote:
>hi,
>thanks for replying me.
>increasing (decreasing too?) the WIDTH of a row because of
>an update is a new information for me, and i would also
>say it is quite shocking for me.
>i allways thought table structure is a fixed-width, so the
>space for all of the fields is allocated in the same time
>and PLACE in advance for each inserted record.
This is only true if the row contains no varying length columns. Each
table that holds at least one varchar, nvarchar or varbinary column has
rows with varying length.
(snip)
>i guess it's a long story to explain why a clustered index
>is actually needs to contain ALL fileds ...?
Not at all. The clustered index determines the order in which rows are
stored in the data file. Suppose you have a clustered index on an integer
column, there are rows with values 1 and 3 for that column and you then
insert a row with value 2. In that case, the database will store the
entire row between the rows vor key value 1 and 3, not only the key value.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Hugo's answered most of your questions already here but I'll just answer
that qn you put about whether 100% fillfactor is optimal if all columns are
fixed width such as integer. I'd say that that answer to that is yes - if
the columns are fixed width, then the underlying storage requirements will
never grow for a given row, so there should not be any requirement to split
storage pages. Even if there is some obscure cause of page splits in this
scenario, I'd suggest that would be rare & therefore the 100% fillfactor
would still be optimal.
Regards,
Greg Linwood
SQL Server MVP
"Hugo Kornelis" <hugo@.pe_NO_rFact.in_SPAM_fo> wrote in message
news:aeatc0poos36e86c2tcthsforql0rbs5lk@.4ax.com...
> Hi Edo,
> On Mon, 14 Jun 2004 21:40:34 -0700, edo wrote:
> >hi,
> >
> >thanks for replying me.
> >
> >increasing (decreasing too?) the WIDTH of a row because of
> >an update is a new information for me, and i would also
> >say it is quite shocking for me.
> >
> >i allways thought table structure is a fixed-width, so the
> >space for all of the fields is allocated in the same time
> >and PLACE in advance for each inserted record.
> This is only true if the row contains no varying length columns. Each
> table that holds at least one varchar, nvarchar or varbinary column has
> rows with varying length.
>
> (snip)
> >i guess it's a long story to explain why a clustered index
> >is actually needs to contain ALL fileds ...?
> Not at all. The clustered index determines the order in which rows are
> stored in the data file. Suppose you have a clustered index on an integer
> column, there are rows with values 1 and 3 for that column and you then
> insert a row with value 2. In that case, the database will store the
> entire row between the rows vor key value 1 and 3, not only the key value.
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)|||When you create a clustered index on a table, the actual data rows move into
the leaf level of the clustered index ( and are therefore stored in the
order specified by the index key.)
When there are variable length columns in the table, updating may increase
the length of the row. When a row length increases on a page which is
completely full, it will bump one or more of the rows following it off of
the current page, and onto the next page. This causes extra work...
Completely full pages are wonderful for readers, because the number of IOs
which has to be done decreases, and the amount of memory required to keep
the data is lower as well. But If you ever insert new rows into the middle
of the table, or update rows so that they grow in lenght, page splitting can
occur... If you wish to reduce the speed of some reads, while improving the
insert/update situation, you simply reduce the fillfactor somewhat...
So by setting the fill factor you are stating performance preferences (
readers vs updaters) on the table.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"edo" <anonymous@.discussions.microsoft.com> wrote in message
news:1c2db01c4528a$671b1890$a601280a@.phx.gbl...
> hi,
> i have a table with IDENTITY field.
> i set a CLUSTERED UNIQUE index on this field.
> i wonder whether is it right to set this index's Fill-
> factor to 100?
> i though that if the values of this field are always auto-
> incremented so there would never be a need to split places
> between records, so there is no need to save space for new
> records(or updated records) that might need to be placed
> between any other prior inserted records.
> is it true?
> is it the optimal choise for this case?
> thanks,
> edo.
i have a table with IDENTITY field.
i set a CLUSTERED UNIQUE index on this field.
i wonder whether is it right to set this index's Fill-
factor to 100?
i though that if the values of this field are always auto-
incremented so there would never be a need to split places
between records, so there is no need to save space for new
records(or updated records) that might need to be placed
between any other prior inserted records.
is it true?
is it the optimal choise for this case?
thanks,
edo.Not quite true.
You're on the right track as far as inserts are concerned, but updates are
another matter.
Because clustered indexes contain ALL columns, any updates that increase the
width of the row might cause a page split.
Therefore, whether 100% is optimal or not depends on whether there are any
updates to the table.
HTH
Regards,
Greg Linwood
SQL Server MVP
"edo" <anonymous@.discussions.microsoft.com> wrote in message
news:1c2db01c4528a$671b1890$a601280a@.phx.gbl...
> hi,
> i have a table with IDENTITY field.
> i set a CLUSTERED UNIQUE index on this field.
> i wonder whether is it right to set this index's Fill-
> factor to 100?
> i though that if the values of this field are always auto-
> incremented so there would never be a need to split places
> between records, so there is no need to save space for new
> records(or updated records) that might need to be placed
> between any other prior inserted records.
> is it true?
> is it the optimal choise for this case?
> thanks,
> edo.|||hi,
thanks for replying me.
increasing (decreasing too?) the WIDTH of a row because of
an update is a new information for me, and i would also
say it is quite shocking for me.
i allways thought table structure is a fixed-width, so the
space for all of the fields is allocated in the same time
and PLACE in advance for each inserted record.
or maybe do you mean that the index may be compuond by
varchar fields so changing the values may change the
lenght of the compound index-value, for example an index-
value coumpound by 2 fields may be changed from "X"+"A"
to "X"+"ABCDEF"
(so if, for example, the table contains integer fields
only, is Fill-factor 100 still be the optimal option even
when updates are concerned)
i guess it's a long story to explain why a clustered index
is actually needs to contain ALL fileds ...?
i probablly missing something (or a lot of things)...
thanks again.
edo.
>--Original Message--
>Not quite true.
>You're on the right track as far as inserts are
concerned, but updates are
>another matter.
>Because clustered indexes contain ALL columns, any
updates that increase the
>width of the row might cause a page split.
>Therefore, whether 100% is optimal or not depends on
whether there are any
>updates to the table.
>HTH
>Regards,
>Greg Linwood
>SQL Server MVP
>"edo" <anonymous@.discussions.microsoft.com> wrote in
message
>news:1c2db01c4528a$671b1890$a601280a@.phx.gbl...
>> hi,
>> i have a table with IDENTITY field.
>> i set a CLUSTERED UNIQUE index on this field.
>> i wonder whether is it right to set this index's Fill-
>> factor to 100?
>> i though that if the values of this field are always
auto-
>> incremented so there would never be a need to split
places
>> between records, so there is no need to save space for
new
>> records(or updated records) that might need to be placed
>> between any other prior inserted records.
>> is it true?
>> is it the optimal choise for this case?
>> thanks,
>> edo.
>
>.
>|||Hi Edo,
On Mon, 14 Jun 2004 21:40:34 -0700, edo wrote:
>hi,
>thanks for replying me.
>increasing (decreasing too?) the WIDTH of a row because of
>an update is a new information for me, and i would also
>say it is quite shocking for me.
>i allways thought table structure is a fixed-width, so the
>space for all of the fields is allocated in the same time
>and PLACE in advance for each inserted record.
This is only true if the row contains no varying length columns. Each
table that holds at least one varchar, nvarchar or varbinary column has
rows with varying length.
(snip)
>i guess it's a long story to explain why a clustered index
>is actually needs to contain ALL fileds ...?
Not at all. The clustered index determines the order in which rows are
stored in the data file. Suppose you have a clustered index on an integer
column, there are rows with values 1 and 3 for that column and you then
insert a row with value 2. In that case, the database will store the
entire row between the rows vor key value 1 and 3, not only the key value.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Hugo's answered most of your questions already here but I'll just answer
that qn you put about whether 100% fillfactor is optimal if all columns are
fixed width such as integer. I'd say that that answer to that is yes - if
the columns are fixed width, then the underlying storage requirements will
never grow for a given row, so there should not be any requirement to split
storage pages. Even if there is some obscure cause of page splits in this
scenario, I'd suggest that would be rare & therefore the 100% fillfactor
would still be optimal.
Regards,
Greg Linwood
SQL Server MVP
"Hugo Kornelis" <hugo@.pe_NO_rFact.in_SPAM_fo> wrote in message
news:aeatc0poos36e86c2tcthsforql0rbs5lk@.4ax.com...
> Hi Edo,
> On Mon, 14 Jun 2004 21:40:34 -0700, edo wrote:
> >hi,
> >
> >thanks for replying me.
> >
> >increasing (decreasing too?) the WIDTH of a row because of
> >an update is a new information for me, and i would also
> >say it is quite shocking for me.
> >
> >i allways thought table structure is a fixed-width, so the
> >space for all of the fields is allocated in the same time
> >and PLACE in advance for each inserted record.
> This is only true if the row contains no varying length columns. Each
> table that holds at least one varchar, nvarchar or varbinary column has
> rows with varying length.
>
> (snip)
> >i guess it's a long story to explain why a clustered index
> >is actually needs to contain ALL fileds ...?
> Not at all. The clustered index determines the order in which rows are
> stored in the data file. Suppose you have a clustered index on an integer
> column, there are rows with values 1 and 3 for that column and you then
> insert a row with value 2. In that case, the database will store the
> entire row between the rows vor key value 1 and 3, not only the key value.
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)|||When you create a clustered index on a table, the actual data rows move into
the leaf level of the clustered index ( and are therefore stored in the
order specified by the index key.)
When there are variable length columns in the table, updating may increase
the length of the row. When a row length increases on a page which is
completely full, it will bump one or more of the rows following it off of
the current page, and onto the next page. This causes extra work...
Completely full pages are wonderful for readers, because the number of IOs
which has to be done decreases, and the amount of memory required to keep
the data is lower as well. But If you ever insert new rows into the middle
of the table, or update rows so that they grow in lenght, page splitting can
occur... If you wish to reduce the speed of some reads, while improving the
insert/update situation, you simply reduce the fillfactor somewhat...
So by setting the fill factor you are stating performance preferences (
readers vs updaters) on the table.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"edo" <anonymous@.discussions.microsoft.com> wrote in message
news:1c2db01c4528a$671b1890$a601280a@.phx.gbl...
> hi,
> i have a table with IDENTITY field.
> i set a CLUSTERED UNIQUE index on this field.
> i wonder whether is it right to set this index's Fill-
> factor to 100?
> i though that if the values of this field are always auto-
> incremented so there would never be a need to split places
> between records, so there is no need to save space for new
> records(or updated records) that might need to be placed
> between any other prior inserted records.
> is it true?
> is it the optimal choise for this case?
> thanks,
> edo.
Wednesday, March 21, 2012
Files sizes in a OLE bmp field
I have a database which stores word documents into tables as BLOB fields.
I need to work out what size each WORD document is.
Do you know how can I work out the individual size of each word document?
__________
'sp_spaceused worddoc_attached' only gives me the overall size of the data
in the table.
__________
Thank you for any help in advance
JAD
You can use the datalength function to do this. You can find more
information in books online under datalength.
-Sue
On Fri, 15 Oct 2004 16:05:27 +0100, "JAD" <listgrove@.yahoo.co.uk>
wrote:
>I have a database which stores word documents into tables as BLOB fields.
>I need to work out what size each WORD document is.
>Do you know how can I work out the individual size of each word document?
>__________
>'sp_spaceused worddoc_attached' only gives me the overall size of the data
>in the table.
>__________
>
>Thank you for any help in advance
>JAD
>
I need to work out what size each WORD document is.
Do you know how can I work out the individual size of each word document?
__________
'sp_spaceused worddoc_attached' only gives me the overall size of the data
in the table.
__________
Thank you for any help in advance
JAD
You can use the datalength function to do this. You can find more
information in books online under datalength.
-Sue
On Fri, 15 Oct 2004 16:05:27 +0100, "JAD" <listgrove@.yahoo.co.uk>
wrote:
>I have a database which stores word documents into tables as BLOB fields.
>I need to work out what size each WORD document is.
>Do you know how can I work out the individual size of each word document?
>__________
>'sp_spaceused worddoc_attached' only gives me the overall size of the data
>in the table.
>__________
>
>Thank you for any help in advance
>JAD
>
Files PDF into sql table.
I have 5 millions of file PDF (acrobat) to save into a sql table.
Wich type of field can i use into a table ?
Thank you, Checco.
You can use an IMAGE column. Why do you want to do this though?
Wouldn't it be easier just to store the file name? I don't think a PDF
could be very useful in a database.
This issue is discussed here:
http://www.aspfaq.com/show.asp?id=2149
David Portas
SQL Server MVP
|||There is a transform in DTS which will load the files into the database (
Search for Textcopy I think it is).
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Checco" <CheccoTogliLaForka@.Box.it> wrote in message
news:392pnnF5tn0h9U1@.individual.net...
>I have 5 millions of file PDF (acrobat) to save into a sql table.
> Wich type of field can i use into a table ?
> Thank you, Checco.
>
|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> ha scritto nel
messaggio news:1110195059.693757.152650@.g14g2000cwa.googlegr oups.com...
> You can use an IMAGE column. Why do you want to do this though?
> Wouldn't it be easier just to store the file name? I don't think a PDF
> could be very useful in a database.
>
I can save the files PDF in a file server... and access it by an URL like:
\\FileServer\Location\FileName but
i think that the access to a sqlserver is more fast than an access to a file
system, so, the files that i need is very much...
or not ?
Checco.
|||No. Keep your files in a filesystem instead, and save the path to them in a
table. Access to a filesystem is much faster. You might want to create
subfolders following some criteria, since keeping 5 million files in one
folder would be a little costly performance wise. You might want to create a
hash function for the subfolder name. That discussion is outside of the
scope of this group.
-Argenis
"Checco" <CheccoTogliLaForka@.Box.it> wrote in message
news:393299F5tg5j0U1@.individual.net...
> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> ha scritto nel
> messaggio news:1110195059.693757.152650@.g14g2000cwa.googlegr oups.com...
> I can save the files PDF in a file server... and access it by an URL
like:
> \\FileServer\Location\FileName but
> i think that the access to a sqlserver is more fast than an access to a
file
> system, so, the files that i need is very much...
> or not ?
> Checco.
>
|||Thank you.
Checco.
"Argenis Fernandez" <argenis@.spam.sucks.gmail.com> ha scritto nel messaggio
news:eZMNvqyIFHA.1860@.TK2MSFTNGP15.phx.gbl...
> No. Keep your files in a filesystem instead, and save the path to them in
> a
> table. Access to a filesystem is much faster. You might want to create
> subfolders following some criteria, since keeping 5 million files in one
> folder would be a little costly performance wise. You might want to create
> a
> hash function for the subfolder name. That discussion is outside of the
> scope of this group.
> -Argenis
> "Checco" <CheccoTogliLaForka@.Box.it> wrote in message
> news:393299F5tg5j0U1@.individual.net...
> like:
> file
>
Wich type of field can i use into a table ?
Thank you, Checco.
You can use an IMAGE column. Why do you want to do this though?
Wouldn't it be easier just to store the file name? I don't think a PDF
could be very useful in a database.
This issue is discussed here:
http://www.aspfaq.com/show.asp?id=2149
David Portas
SQL Server MVP
|||There is a transform in DTS which will load the files into the database (
Search for Textcopy I think it is).
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Checco" <CheccoTogliLaForka@.Box.it> wrote in message
news:392pnnF5tn0h9U1@.individual.net...
>I have 5 millions of file PDF (acrobat) to save into a sql table.
> Wich type of field can i use into a table ?
> Thank you, Checco.
>
|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> ha scritto nel
messaggio news:1110195059.693757.152650@.g14g2000cwa.googlegr oups.com...
> You can use an IMAGE column. Why do you want to do this though?
> Wouldn't it be easier just to store the file name? I don't think a PDF
> could be very useful in a database.
>
I can save the files PDF in a file server... and access it by an URL like:
\\FileServer\Location\FileName but
i think that the access to a sqlserver is more fast than an access to a file
system, so, the files that i need is very much...
or not ?
Checco.
|||No. Keep your files in a filesystem instead, and save the path to them in a
table. Access to a filesystem is much faster. You might want to create
subfolders following some criteria, since keeping 5 million files in one
folder would be a little costly performance wise. You might want to create a
hash function for the subfolder name. That discussion is outside of the
scope of this group.
-Argenis
"Checco" <CheccoTogliLaForka@.Box.it> wrote in message
news:393299F5tg5j0U1@.individual.net...
> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> ha scritto nel
> messaggio news:1110195059.693757.152650@.g14g2000cwa.googlegr oups.com...
> I can save the files PDF in a file server... and access it by an URL
like:
> \\FileServer\Location\FileName but
> i think that the access to a sqlserver is more fast than an access to a
file
> system, so, the files that i need is very much...
> or not ?
> Checco.
>
|||Thank you.
Checco.
"Argenis Fernandez" <argenis@.spam.sucks.gmail.com> ha scritto nel messaggio
news:eZMNvqyIFHA.1860@.TK2MSFTNGP15.phx.gbl...
> No. Keep your files in a filesystem instead, and save the path to them in
> a
> table. Access to a filesystem is much faster. You might want to create
> subfolders following some criteria, since keeping 5 million files in one
> folder would be a little costly performance wise. You might want to create
> a
> hash function for the subfolder name. That discussion is outside of the
> scope of this group.
> -Argenis
> "Checco" <CheccoTogliLaForka@.Box.it> wrote in message
> news:393299F5tg5j0U1@.individual.net...
> like:
> file
>
Files PDF into sql table.
I have 5 millions of file PDF (acrobat) to save into a sql table.
Wich type of field can i use into a table ?
Thank you, Checco.You can use an IMAGE column. Why do you want to do this though?
Wouldn't it be easier just to store the file name? I don't think a PDF
could be very useful in a database.
This issue is discussed here:
http://www.aspfaq.com/show.asp?id=2149
--
David Portas
SQL Server MVP
--|||There is a transform in DTS which will load the files into the database (
Search for Textcopy I think it is).
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Checco" <CheccoTogliLaForka@.Box.it> wrote in message
news:392pnnF5tn0h9U1@.individual.net...
>I have 5 millions of file PDF (acrobat) to save into a sql table.
> Wich type of field can i use into a table ?
> Thank you, Checco.
>|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> ha scritto nel
messaggio news:1110195059.693757.152650@.g14g2000cwa.googlegroups.com...
> You can use an IMAGE column. Why do you want to do this though?
> Wouldn't it be easier just to store the file name? I don't think a PDF
> could be very useful in a database.
>
I can save the files PDF in a file server... and access it by an URL like:
\\FileServer\Location\FileName but
i think that the access to a sqlserver is more fast than an access to a file
system, so, the files that i need is very much...
or not ?
Checco.|||No. Keep your files in a filesystem instead, and save the path to them in a
table. Access to a filesystem is much faster. You might want to create
subfolders following some criteria, since keeping 5 million files in one
folder would be a little costly performance wise. You might want to create a
hash function for the subfolder name. That discussion is outside of the
scope of this group.
-Argenis
"Checco" <CheccoTogliLaForka@.Box.it> wrote in message
news:393299F5tg5j0U1@.individual.net...
> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> ha scritto nel
> messaggio news:1110195059.693757.152650@.g14g2000cwa.googlegroups.com...
> > You can use an IMAGE column. Why do you want to do this though?
> > Wouldn't it be easier just to store the file name? I don't think a PDF
> > could be very useful in a database.
> >
> I can save the files PDF in a file server... and access it by an URL
like:
> \\FileServer\Location\FileName but
> i think that the access to a sqlserver is more fast than an access to a
file
> system, so, the files that i need is very much...
> or not ?
> Checco.
>|||Thank you.
Checco.
"Argenis Fernandez" <argenis@.spam.sucks.gmail.com> ha scritto nel messaggio
news:eZMNvqyIFHA.1860@.TK2MSFTNGP15.phx.gbl...
> No. Keep your files in a filesystem instead, and save the path to them in
> a
> table. Access to a filesystem is much faster. You might want to create
> subfolders following some criteria, since keeping 5 million files in one
> folder would be a little costly performance wise. You might want to create
> a
> hash function for the subfolder name. That discussion is outside of the
> scope of this group.
> -Argenis
> "Checco" <CheccoTogliLaForka@.Box.it> wrote in message
> news:393299F5tg5j0U1@.individual.net...
>> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> ha scritto nel
>> messaggio news:1110195059.693757.152650@.g14g2000cwa.googlegroups.com...
>> > You can use an IMAGE column. Why do you want to do this though?
>> > Wouldn't it be easier just to store the file name? I don't think a PDF
>> > could be very useful in a database.
>> >
>> I can save the files PDF in a file server... and access it by an URL
> like:
>> \\FileServer\Location\FileName but
>> i think that the access to a sqlserver is more fast than an access to a
> file
>> system, so, the files that i need is very much...
>> or not ?
>> Checco.
>>
>
Wich type of field can i use into a table ?
Thank you, Checco.You can use an IMAGE column. Why do you want to do this though?
Wouldn't it be easier just to store the file name? I don't think a PDF
could be very useful in a database.
This issue is discussed here:
http://www.aspfaq.com/show.asp?id=2149
--
David Portas
SQL Server MVP
--|||There is a transform in DTS which will load the files into the database (
Search for Textcopy I think it is).
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Checco" <CheccoTogliLaForka@.Box.it> wrote in message
news:392pnnF5tn0h9U1@.individual.net...
>I have 5 millions of file PDF (acrobat) to save into a sql table.
> Wich type of field can i use into a table ?
> Thank you, Checco.
>|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> ha scritto nel
messaggio news:1110195059.693757.152650@.g14g2000cwa.googlegroups.com...
> You can use an IMAGE column. Why do you want to do this though?
> Wouldn't it be easier just to store the file name? I don't think a PDF
> could be very useful in a database.
>
I can save the files PDF in a file server... and access it by an URL like:
\\FileServer\Location\FileName but
i think that the access to a sqlserver is more fast than an access to a file
system, so, the files that i need is very much...
or not ?
Checco.|||No. Keep your files in a filesystem instead, and save the path to them in a
table. Access to a filesystem is much faster. You might want to create
subfolders following some criteria, since keeping 5 million files in one
folder would be a little costly performance wise. You might want to create a
hash function for the subfolder name. That discussion is outside of the
scope of this group.
-Argenis
"Checco" <CheccoTogliLaForka@.Box.it> wrote in message
news:393299F5tg5j0U1@.individual.net...
> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> ha scritto nel
> messaggio news:1110195059.693757.152650@.g14g2000cwa.googlegroups.com...
> > You can use an IMAGE column. Why do you want to do this though?
> > Wouldn't it be easier just to store the file name? I don't think a PDF
> > could be very useful in a database.
> >
> I can save the files PDF in a file server... and access it by an URL
like:
> \\FileServer\Location\FileName but
> i think that the access to a sqlserver is more fast than an access to a
file
> system, so, the files that i need is very much...
> or not ?
> Checco.
>|||Thank you.
Checco.
"Argenis Fernandez" <argenis@.spam.sucks.gmail.com> ha scritto nel messaggio
news:eZMNvqyIFHA.1860@.TK2MSFTNGP15.phx.gbl...
> No. Keep your files in a filesystem instead, and save the path to them in
> a
> table. Access to a filesystem is much faster. You might want to create
> subfolders following some criteria, since keeping 5 million files in one
> folder would be a little costly performance wise. You might want to create
> a
> hash function for the subfolder name. That discussion is outside of the
> scope of this group.
> -Argenis
> "Checco" <CheccoTogliLaForka@.Box.it> wrote in message
> news:393299F5tg5j0U1@.individual.net...
>> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> ha scritto nel
>> messaggio news:1110195059.693757.152650@.g14g2000cwa.googlegroups.com...
>> > You can use an IMAGE column. Why do you want to do this though?
>> > Wouldn't it be easier just to store the file name? I don't think a PDF
>> > could be very useful in a database.
>> >
>> I can save the files PDF in a file server... and access it by an URL
> like:
>> \\FileServer\Location\FileName but
>> i think that the access to a sqlserver is more fast than an access to a
> file
>> system, so, the files that i need is very much...
>> or not ?
>> Checco.
>>
>
Files PDF into sql table.
I have 5 millions of file PDF (acrobat) to save into a sql table.
Wich type of field can i use into a table ?
Thank you, Checco.You can use an IMAGE column. Why do you want to do this though?
Wouldn't it be easier just to store the file name? I don't think a PDF
could be very useful in a database.
This issue is discussed here:
http://www.aspfaq.com/show.asp?id=2149
David Portas
SQL Server MVP
--|||There is a transform in DTS which will load the files into the database (
Search for Textcopy I think it is).
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Checco" <CheccoTogliLaForka@.Box.it> wrote in message
news:392pnnF5tn0h9U1@.individual.net...
>I have 5 millions of file PDF (acrobat) to save into a sql table.
> Wich type of field can i use into a table ?
> Thank you, Checco.
>|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> ha scritto nel
messaggio news:1110195059.693757.152650@.g14g2000cwa.googlegroups.com...
> You can use an IMAGE column. Why do you want to do this though?
> Wouldn't it be easier just to store the file name? I don't think a PDF
> could be very useful in a database.
>
I can save the files PDF in a file server... and access it by an URL like:
\\FileServer\Location\FileName but
i think that the access to a sqlserver is more fast than an access to a file
system, so, the files that i need is very much...
or not ?
Checco.|||No. Keep your files in a filesystem instead, and save the path to them in a
table. Access to a filesystem is much faster. You might want to create
subfolders following some criteria, since keeping 5 million files in one
folder would be a little costly performance wise. You might want to create a
hash function for the subfolder name. That discussion is outside of the
scope of this group.
-Argenis
"Checco" <CheccoTogliLaForka@.Box.it> wrote in message
news:393299F5tg5j0U1@.individual.net...
> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> ha scritto nel
> messaggio news:1110195059.693757.152650@.g14g2000cwa.googlegroups.com...
> I can save the files PDF in a file server... and access it by an URL
like:
> \\FileServer\Location\FileName but
> i think that the access to a sqlserver is more fast than an access to a
file
> system, so, the files that i need is very much...
> or not ?
> Checco.
>|||Thank you.
Checco.
"Argenis Fernandez" <argenis@.spam.sucks.gmail.com> ha scritto nel messaggio
news:eZMNvqyIFHA.1860@.TK2MSFTNGP15.phx.gbl...
> No. Keep your files in a filesystem instead, and save the path to them in
> a
> table. Access to a filesystem is much faster. You might want to create
> subfolders following some criteria, since keeping 5 million files in one
> folder would be a little costly performance wise. You might want to create
> a
> hash function for the subfolder name. That discussion is outside of the
> scope of this group.
> -Argenis
> "Checco" <CheccoTogliLaForka@.Box.it> wrote in message
> news:393299F5tg5j0U1@.individual.net...
> like:
> file
>
Wich type of field can i use into a table ?
Thank you, Checco.You can use an IMAGE column. Why do you want to do this though?
Wouldn't it be easier just to store the file name? I don't think a PDF
could be very useful in a database.
This issue is discussed here:
http://www.aspfaq.com/show.asp?id=2149
David Portas
SQL Server MVP
--|||There is a transform in DTS which will load the files into the database (
Search for Textcopy I think it is).
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Checco" <CheccoTogliLaForka@.Box.it> wrote in message
news:392pnnF5tn0h9U1@.individual.net...
>I have 5 millions of file PDF (acrobat) to save into a sql table.
> Wich type of field can i use into a table ?
> Thank you, Checco.
>|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> ha scritto nel
messaggio news:1110195059.693757.152650@.g14g2000cwa.googlegroups.com...
> You can use an IMAGE column. Why do you want to do this though?
> Wouldn't it be easier just to store the file name? I don't think a PDF
> could be very useful in a database.
>
I can save the files PDF in a file server... and access it by an URL like:
\\FileServer\Location\FileName but
i think that the access to a sqlserver is more fast than an access to a file
system, so, the files that i need is very much...
or not ?
Checco.|||No. Keep your files in a filesystem instead, and save the path to them in a
table. Access to a filesystem is much faster. You might want to create
subfolders following some criteria, since keeping 5 million files in one
folder would be a little costly performance wise. You might want to create a
hash function for the subfolder name. That discussion is outside of the
scope of this group.
-Argenis
"Checco" <CheccoTogliLaForka@.Box.it> wrote in message
news:393299F5tg5j0U1@.individual.net...
> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> ha scritto nel
> messaggio news:1110195059.693757.152650@.g14g2000cwa.googlegroups.com...
> I can save the files PDF in a file server... and access it by an URL
like:
> \\FileServer\Location\FileName but
> i think that the access to a sqlserver is more fast than an access to a
file
> system, so, the files that i need is very much...
> or not ?
> Checco.
>|||Thank you.
Checco.
"Argenis Fernandez" <argenis@.spam.sucks.gmail.com> ha scritto nel messaggio
news:eZMNvqyIFHA.1860@.TK2MSFTNGP15.phx.gbl...
> No. Keep your files in a filesystem instead, and save the path to them in
> a
> table. Access to a filesystem is much faster. You might want to create
> subfolders following some criteria, since keeping 5 million files in one
> folder would be a little costly performance wise. You might want to create
> a
> hash function for the subfolder name. That discussion is outside of the
> scope of this group.
> -Argenis
> "Checco" <CheccoTogliLaForka@.Box.it> wrote in message
> news:393299F5tg5j0U1@.individual.net...
> like:
> file
>
Sunday, February 26, 2012
File properties for files stored in IMAGE field
Is there a way (in SQL Server 2005 full-text search) to search the
properties (DocType, Keyword, etc) of files stored and indexed in image
fields? I'm searching the indexed contents with no problem but I also
want to search the properties. I know that this isn't possible in
versions prior to 2005 but I've seen referances that 2005 enables this,
I just can't find the details on how to do it. Was it maybe a feature
that got pulled before the finial release?
Hello,
Its not available directly. You would have to use index server and then your
performance will plummit
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
> Is there a way (in SQL Server 2005 full-text search) to search the
> properties (DocType, Keyword, etc) of files stored and indexed in
> image fields? I'm searching the indexed contents with no problem but
> I also want to search the properties. I know that this isn't possible
> in versions prior to 2005 but I've seen referances that 2005 enables
> this, I just can't find the details on how to do it. Was it maybe a
> feature that got pulled before the finial release?
>
|||Its possible, I'll post a repro later.
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
<ddaiker@.gmail.com> wrote in message
news:1166469151.256705.174690@.48g2000cwx.googlegro ups.com...
> Is there a way (in SQL Server 2005 full-text search) to search the
> properties (DocType, Keyword, etc) of files stored and indexed in image
> fields? I'm searching the indexed contents with no problem but I also
> want to search the properties. I know that this isn't possible in
> versions prior to 2005 but I've seen referances that 2005 enables this,
> I just can't find the details on how to do it. Was it maybe a feature
> that got pulled before the finial release?
>
|||try this - save this as createdocument.vbs, make sure you have a c:\temp
directory.
set wordobj=createobject("Word.application")
set activedoc=wordObj.documents.Add
activeDoc.BuiltInDocumentProperties.item(2)="summa ry info is written here"
set docProp=ActiveDoc.CustomDocumentProperties
docProp.add "Property1", 0,4,"Property1Value"
activedoc.saveAs "C:\temp\Document1.doc"
activedoc.close
wordobj.quit
set docprop=nothing
set activedoc=nothing
set wordobj=nothing
After this has run this script in your SQL 2005 database.
create database test
use test
sp_fulltext_database 'enable'
GO
Create table DocumentPropertyTest(pk int not null identity constraint
DocumentPropertyTestPK primary key, imagecol image, documenttype char(4))
GO
create fulltext catalog doc as default
GO
create fulltext index on DocumentPropertyTest(imagecol type column
documenttype) key index DocumentPropertyTestPK
GO
then run this, save it as loadme.vbs
Set objConn = CreateObject("ADODB.Connection")
Set objRS = CreateObject("ADODB.RecordSet")
Set objStream=CreateObject("ADODB.Stream")
objConn.Open
"Provider=SQLNCLI;Server=dev-hcotter;Database=fulltext;UID=sa;PWD=se1cure#;"
Set objFileSystem=createobject("Scripting.FileSystemOb ject")
Set objDir=objFileSystem.GetFolder("c:\temp")
for each objFile in objDir.Files
count=count+1
wscript.echo objFile.name
objConn.Execute "insert into DocumentPropertyTest (ImageCol,documenttype)
values ('Jibberish','doc')"
objRs.Open "select imagecol from DocumentPropertyTest where pk=" & count,
objConn, 1, 3
objStream.Type = 1
objStream.Open
objStream.LoadFromFile objFile.Path
objRs.Fields("ImageCol").Value=objStream.Read
objRs.Update
objRs.Close
objStream.Close
next
objConn.Close
Set objStream=nothing
Set objShell=nothing
Set objConn=nothing
Set objFileSystem=nothing
Set objDir=nothing
then try this
select * from DocumentPropertyTest where contains(*,'Property1Value') -- no
hit
select * from DocumentPropertyTest where contains(*,'summary') --hit
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
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:OgxTfxwIHHA.320@.TK2MSFTNGP06.phx.gbl...
> Its possible, I'll post a repro later.
> --
> 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
> <ddaiker@.gmail.com> wrote in message
> news:1166469151.256705.174690@.48g2000cwx.googlegro ups.com...
>
|||Wow, thank you for taking the time to write and post all that.
Unfortunatly I'm getting the same results with your sample as I got
with my own testing. The query with "summary" doesn't return a hit
either. I checked the poperties of the doc file from explorer and from
Word and the "Subject" and "Property1" properties are set correctly.
To make sure the indexing was working I put some content in the .doc
and added it agian. If I search for data in the file I get a hit, but
not for anything in the "Subject" property. I tried "summary" and
"written" with no luck.
Any idea what might be wrong?
Here is my setup of everything that I think could be relavant.
Windows XP SP2
IE7
SQL Server 2005 Developer Editition installed as second instance beside
SQL Server 2000 Developer Edition
Office 2003 SP2
Visual Studio 2003 and Visual Studio 2005
My Offfilt.dll version is 2003.5.28.0
|||So my sample does not work on your machine? It works on mine with the same
setup. It is the SQL 2005 instance you can't get it to work on right?
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
"ddaiker" <ddaiker@.gmail.com> wrote in message
news:1166535897.899606.47840@.73g2000cwn.googlegrou ps.com...
> Wow, thank you for taking the time to write and post all that.
> Unfortunatly I'm getting the same results with your sample as I got
> with my own testing. The query with "summary" doesn't return a hit
> either. I checked the poperties of the doc file from explorer and from
> Word and the "Subject" and "Property1" properties are set correctly.
> To make sure the indexing was working I put some content in the .doc
> and added it agian. If I search for data in the file I get a hit, but
> not for anything in the "Subject" property. I tried "summary" and
> "written" with no luck.
> Any idea what might be wrong?
> Here is my setup of everything that I think could be relavant.
> Windows XP SP2
> IE7
> SQL Server 2005 Developer Editition installed as second instance beside
> SQL Server 2000 Developer Edition
> Office 2003 SP2
> Visual Studio 2003 and Visual Studio 2005
> My Offfilt.dll version is 2003.5.28.0
>
|||Ok, it seems I'm having bigger problems. filtdump only brings back the
content of 2 Word and 1 Excel document that has properties on it. I
ran one of my files through an Index Server catalog and queried it on a
word in it's subject and it didn't get a hit either. I'm having issues
with the iFilter but I need to look into more. Do our versions of
offfilt.dll match?
|||Can you send me some of your problem docs?
My version has a date stamp of 8/18/2006 at 8:34, and has a version of
2006.0.5486.108.
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
"ddaiker" <ddaiker@.gmail.com> wrote in message
news:1166556861.260065.50920@.t46g2000cwa.googlegro ups.com...
> Ok, it seems I'm having bigger problems. filtdump only brings back the
> content of 2 Word and 1 Excel document that has properties on it. I
> ran one of my files through an Index Server catalog and queried it on a
> word in it's subject and it didn't get a hit either. I'm having issues
> with the iFilter but I need to look into more. Do our versions of
> offfilt.dll match?
>
|||There was an error in my repro. There were some pre-existing word docs in
the doc directory and one of them had the word summary in it.
I can't get it to work now either, except with html. Once upon a time it did
work on RTM.
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
"ddaiker" <ddaiker@.gmail.com> wrote in message
news:1166556861.260065.50920@.t46g2000cwa.googlegro ups.com...
> Ok, it seems I'm having bigger problems. filtdump only brings back the
> content of 2 Word and 1 Excel document that has properties on it. I
> ran one of my files through an Index Server catalog and queried it on a
> word in it's subject and it didn't get a hit either. I'm having issues
> with the iFilter but I need to look into more. Do our versions of
> offfilt.dll match?
>
|||I received word from Microsoft that SQL FTS 2005 does index and allow
querying of document properties should they be emitted by the iFilters as
strings.
The problem David and myself were having was that for the Word and Excel
documents the properties were not part of the Office documents themselves
but were stored in the file system.
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
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:%23FOeh9KJHHA.3936@.TK2MSFTNGP02.phx.gbl...
> There was an error in my repro. There were some pre-existing word docs in
> the doc directory and one of them had the word summary in it.
> I can't get it to work now either, except with html. Once upon a time it
> did work on RTM.
> --
> 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
>
> "ddaiker" <ddaiker@.gmail.com> wrote in message
> news:1166556861.260065.50920@.t46g2000cwa.googlegro ups.com...
>
properties (DocType, Keyword, etc) of files stored and indexed in image
fields? I'm searching the indexed contents with no problem but I also
want to search the properties. I know that this isn't possible in
versions prior to 2005 but I've seen referances that 2005 enables this,
I just can't find the details on how to do it. Was it maybe a feature
that got pulled before the finial release?
Hello,
Its not available directly. You would have to use index server and then your
performance will plummit
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
> Is there a way (in SQL Server 2005 full-text search) to search the
> properties (DocType, Keyword, etc) of files stored and indexed in
> image fields? I'm searching the indexed contents with no problem but
> I also want to search the properties. I know that this isn't possible
> in versions prior to 2005 but I've seen referances that 2005 enables
> this, I just can't find the details on how to do it. Was it maybe a
> feature that got pulled before the finial release?
>
|||Its possible, I'll post a repro later.
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
<ddaiker@.gmail.com> wrote in message
news:1166469151.256705.174690@.48g2000cwx.googlegro ups.com...
> Is there a way (in SQL Server 2005 full-text search) to search the
> properties (DocType, Keyword, etc) of files stored and indexed in image
> fields? I'm searching the indexed contents with no problem but I also
> want to search the properties. I know that this isn't possible in
> versions prior to 2005 but I've seen referances that 2005 enables this,
> I just can't find the details on how to do it. Was it maybe a feature
> that got pulled before the finial release?
>
|||try this - save this as createdocument.vbs, make sure you have a c:\temp
directory.
set wordobj=createobject("Word.application")
set activedoc=wordObj.documents.Add
activeDoc.BuiltInDocumentProperties.item(2)="summa ry info is written here"
set docProp=ActiveDoc.CustomDocumentProperties
docProp.add "Property1", 0,4,"Property1Value"
activedoc.saveAs "C:\temp\Document1.doc"
activedoc.close
wordobj.quit
set docprop=nothing
set activedoc=nothing
set wordobj=nothing
After this has run this script in your SQL 2005 database.
create database test
use test
sp_fulltext_database 'enable'
GO
Create table DocumentPropertyTest(pk int not null identity constraint
DocumentPropertyTestPK primary key, imagecol image, documenttype char(4))
GO
create fulltext catalog doc as default
GO
create fulltext index on DocumentPropertyTest(imagecol type column
documenttype) key index DocumentPropertyTestPK
GO
then run this, save it as loadme.vbs
Set objConn = CreateObject("ADODB.Connection")
Set objRS = CreateObject("ADODB.RecordSet")
Set objStream=CreateObject("ADODB.Stream")
objConn.Open
"Provider=SQLNCLI;Server=dev-hcotter;Database=fulltext;UID=sa;PWD=se1cure#;"
Set objFileSystem=createobject("Scripting.FileSystemOb ject")
Set objDir=objFileSystem.GetFolder("c:\temp")
for each objFile in objDir.Files
count=count+1
wscript.echo objFile.name
objConn.Execute "insert into DocumentPropertyTest (ImageCol,documenttype)
values ('Jibberish','doc')"
objRs.Open "select imagecol from DocumentPropertyTest where pk=" & count,
objConn, 1, 3
objStream.Type = 1
objStream.Open
objStream.LoadFromFile objFile.Path
objRs.Fields("ImageCol").Value=objStream.Read
objRs.Update
objRs.Close
objStream.Close
next
objConn.Close
Set objStream=nothing
Set objShell=nothing
Set objConn=nothing
Set objFileSystem=nothing
Set objDir=nothing
then try this
select * from DocumentPropertyTest where contains(*,'Property1Value') -- no
hit
select * from DocumentPropertyTest where contains(*,'summary') --hit
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
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:OgxTfxwIHHA.320@.TK2MSFTNGP06.phx.gbl...
> Its possible, I'll post a repro later.
> --
> 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
> <ddaiker@.gmail.com> wrote in message
> news:1166469151.256705.174690@.48g2000cwx.googlegro ups.com...
>
|||Wow, thank you for taking the time to write and post all that.
Unfortunatly I'm getting the same results with your sample as I got
with my own testing. The query with "summary" doesn't return a hit
either. I checked the poperties of the doc file from explorer and from
Word and the "Subject" and "Property1" properties are set correctly.
To make sure the indexing was working I put some content in the .doc
and added it agian. If I search for data in the file I get a hit, but
not for anything in the "Subject" property. I tried "summary" and
"written" with no luck.
Any idea what might be wrong?
Here is my setup of everything that I think could be relavant.
Windows XP SP2
IE7
SQL Server 2005 Developer Editition installed as second instance beside
SQL Server 2000 Developer Edition
Office 2003 SP2
Visual Studio 2003 and Visual Studio 2005
My Offfilt.dll version is 2003.5.28.0
|||So my sample does not work on your machine? It works on mine with the same
setup. It is the SQL 2005 instance you can't get it to work on right?
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
"ddaiker" <ddaiker@.gmail.com> wrote in message
news:1166535897.899606.47840@.73g2000cwn.googlegrou ps.com...
> Wow, thank you for taking the time to write and post all that.
> Unfortunatly I'm getting the same results with your sample as I got
> with my own testing. The query with "summary" doesn't return a hit
> either. I checked the poperties of the doc file from explorer and from
> Word and the "Subject" and "Property1" properties are set correctly.
> To make sure the indexing was working I put some content in the .doc
> and added it agian. If I search for data in the file I get a hit, but
> not for anything in the "Subject" property. I tried "summary" and
> "written" with no luck.
> Any idea what might be wrong?
> Here is my setup of everything that I think could be relavant.
> Windows XP SP2
> IE7
> SQL Server 2005 Developer Editition installed as second instance beside
> SQL Server 2000 Developer Edition
> Office 2003 SP2
> Visual Studio 2003 and Visual Studio 2005
> My Offfilt.dll version is 2003.5.28.0
>
|||Ok, it seems I'm having bigger problems. filtdump only brings back the
content of 2 Word and 1 Excel document that has properties on it. I
ran one of my files through an Index Server catalog and queried it on a
word in it's subject and it didn't get a hit either. I'm having issues
with the iFilter but I need to look into more. Do our versions of
offfilt.dll match?
|||Can you send me some of your problem docs?
My version has a date stamp of 8/18/2006 at 8:34, and has a version of
2006.0.5486.108.
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
"ddaiker" <ddaiker@.gmail.com> wrote in message
news:1166556861.260065.50920@.t46g2000cwa.googlegro ups.com...
> Ok, it seems I'm having bigger problems. filtdump only brings back the
> content of 2 Word and 1 Excel document that has properties on it. I
> ran one of my files through an Index Server catalog and queried it on a
> word in it's subject and it didn't get a hit either. I'm having issues
> with the iFilter but I need to look into more. Do our versions of
> offfilt.dll match?
>
|||There was an error in my repro. There were some pre-existing word docs in
the doc directory and one of them had the word summary in it.
I can't get it to work now either, except with html. Once upon a time it did
work on RTM.
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
"ddaiker" <ddaiker@.gmail.com> wrote in message
news:1166556861.260065.50920@.t46g2000cwa.googlegro ups.com...
> Ok, it seems I'm having bigger problems. filtdump only brings back the
> content of 2 Word and 1 Excel document that has properties on it. I
> ran one of my files through an Index Server catalog and queried it on a
> word in it's subject and it didn't get a hit either. I'm having issues
> with the iFilter but I need to look into more. Do our versions of
> offfilt.dll match?
>
|||I received word from Microsoft that SQL FTS 2005 does index and allow
querying of document properties should they be emitted by the iFilters as
strings.
The problem David and myself were having was that for the Word and Excel
documents the properties were not part of the Office documents themselves
but were stored in the file system.
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
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:%23FOeh9KJHHA.3936@.TK2MSFTNGP02.phx.gbl...
> There was an error in my repro. There were some pre-existing word docs in
> the doc directory and one of them had the word summary in it.
> I can't get it to work now either, except with html. Once upon a time it
> did work on RTM.
> --
> 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
>
> "ddaiker" <ddaiker@.gmail.com> wrote in message
> news:1166556861.260065.50920@.t46g2000cwa.googlegro ups.com...
>
Subscribe to:
Posts (Atom)