Showing posts with label contains. Show all posts
Showing posts with label contains. Show all posts

Thursday, March 22, 2012

Adding unique tags to associate records

Hello,
Is there anyway to embed tags that use puctuation into a coulmn of an FTS
table and be able to serach for these tags using the Contains predicate? For
example, I would like to add the tag,"CDL=Y", to a column and search for this
value using the Contains predicate. I'm not sure how this tag gets indexed
but there are a couple of problems using the Contains predicate. The First
problem is puncuation is ignored. The next problem is "Y" is noise. This
means that "CDL=Y" is equal to "CDL". I would like to have the entire
word/tag ("CDL=Y") be a unique value so I could identify records with this
specific feature. Thanks in advance.
Dave
You will have to use underscores for this as SQL FTS does not index
properties and their values. So replace this CDL=Y with this CDL_Y in your
content and queries.
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
"DaveS" <DaveS@.discussions.microsoft.com> wrote in message
news:4B924102-F70F-4300-8CFF-7901722B35C0@.microsoft.com...
> Hello,
> Is there anyway to embed tags that use puctuation into a coulmn of an FTS
> table and be able to serach for these tags using the Contains predicate?
For
> example, I would like to add the tag,"CDL=Y", to a column and search for
this
> value using the Contains predicate. I'm not sure how this tag gets
indexed
> but there are a couple of problems using the Contains predicate. The
First
> problem is puncuation is ignored. The next problem is "Y" is noise. This
> means that "CDL=Y" is equal to "CDL". I would like to have the entire
> word/tag ("CDL=Y") be a unique value so I could identify records with this
> specific feature. Thanks in advance.
> Dave
>
|||Another option is to use XQuery in SQL 2005 and store the doc in an XML data
type column. You could do a contains query against the document and then
refine the search to an particular element or attribute having this value.
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
"DaveS" <DaveS@.discussions.microsoft.com> wrote in message
news:4B924102-F70F-4300-8CFF-7901722B35C0@.microsoft.com...
> Hello,
> Is there anyway to embed tags that use puctuation into a coulmn of an FTS
> table and be able to serach for these tags using the Contains predicate?
For
> example, I would like to add the tag,"CDL=Y", to a column and search for
this
> value using the Contains predicate. I'm not sure how this tag gets
indexed
> but there are a couple of problems using the Contains predicate. The
First
> problem is puncuation is ignored. The next problem is "Y" is noise. This
> means that "CDL=Y" is equal to "CDL". I would like to have the entire
> word/tag ("CDL=Y") be a unique value so I could identify records with this
> specific feature. Thanks in advance.
> Dave
>
|||Dave,
To understand your environment and to help troubleshoot this issue, could
you reply with the results of the following T-SQL code?
use <your_database_name_here>
go
SELECT @.@.language
SELECT @.@.version
sp_configure 'default full-text language'
EXEC sp_help_fulltext_catalogs
EXEC sp_help_fulltext_tables
EXEC sp_help_fulltext_columns
EXEC sp_help <your_FT-enable_table_name_here>
go
The OS platform that you have SQL Server installed on as well as the
OS-supplied wordbreaker is an important aspect of understanding this issue,
for more details see: http://groups.google.com/groups?q=langwrbk+infosoft
Thanks,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"DaveS" <DaveS@.discussions.microsoft.com> wrote in message
news:4B924102-F70F-4300-8CFF-7901722B35C0@.microsoft.com...
> Hello,
> Is there anyway to embed tags that use puctuation into a coulmn of an FTS
> table and be able to serach for these tags using the Contains predicate?
For
> example, I would like to add the tag,"CDL=Y", to a column and search for
this
> value using the Contains predicate. I'm not sure how this tag gets
indexed
> but there are a couple of problems using the Contains predicate. The
First
> problem is puncuation is ignored. The next problem is "Y" is noise. This
> means that "CDL=Y" is equal to "CDL". I would like to have the entire
> word/tag ("CDL=Y") be a unique value so I could identify records with this
> specific feature. Thanks in advance.
> Dave
>
sql

Adding to the Toolbar

Is there a way to add text to the toolbar (that contains the export choices,
refresh button, paging, etc)? I would just like to put a line that says
"You must export before you can print".
Thanks in advance,
MelissaSP1 allows some modifications to the HTML Viewer toolbar through a style
sheet. Check out
http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm
for details.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Melissa" <a@.a.com> wrote in message
news:e3EDhsJgEHA.3192@.tk2msftngp13.phx.gbl...
> Is there a way to add text to the toolbar (that contains the export
choices,
> refresh button, paging, etc)? I would just like to put a line that says
> "You must export before you can print".
> Thanks in advance,
> Melissa
>

Tuesday, March 20, 2012

Adding subreport values

I have a _very_ simple table with just one row and three columns.
The first column of the row contains a subreport that retrieves a single
value.
The second column of the row contains a subreport that retrieves a single
value.
...and heres where I lose it... :-)
The third column should contain the sum of column1 and column2. Period.
Please help. Thanks :-)
jdjespersenIf all you are doing is returning one value from the sub-report then why
use the sub-report at all in the first place?
Secondly, you can't add two sub-reports together. Just because your
sub-reports only return one value does not mean that the main report will
see it as such. If you plugged a sub-report in to that area that returned
40 rows of data and then tried to add those together with another
sub-reports output what would you expect to see?
So in essence you can't do what you are trying to do since you can't
reference the subreport the way you are trying.
--
Chris Alton, Microsoft Corp.
SQL Server Developer Support Engineer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
> Reply-To: "Jeppe Jespersen" <jdj@.jdj.dk>
> From: "Jeppe Jespersen" <jdj@.jdj.dk>
> Subject: Adding subreport values
> Date: Fri, 26 Oct 2007 13:41:07 +0200
> Lines: 17
> Message-ID: <50E85932-E653-4C37-A096-567C497B9B78@.microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> format=flowed;
> charset="iso-8859-1";
> reply-type=original
> Content-Transfer-Encoding: 7bit
> I have a _very_ simple table with just one row and three columns.
> The first column of the row contains a subreport that retrieves a single
> value.
> The second column of the row contains a subreport that retrieves a single
> value.
> ...and heres where I lose it... :-)
> The third column should contain the sum of column1 and column2. Period.
> Please help. Thanks :-)
> jdjespersen
>
>|||Hi Chris, and thanks for replying...
> If all you are doing is returning one value from the sub-report then why
> use the sub-report at all in the first place?
In short, 'cause i suck. :-( I'll try to explain.
Data is in an Analysis Services database, and MDX is not my strongpoint.
I was hoping that by splitting my queries into seperate datasources, I could
get away with much simpler queries. But, not being able to use data from
two datasets within a single table control, i figured i could do it with
subreports.
Imagine a desired report table layout like this. Not the most complex, i
admit:
Company Last Years Sales Current Sales
Total
Adv.Works 10000 4000
14000
Northwind 3200 2000
5200
Designing the above query may not be rocket science, but as far as MDX goes,
i'm more of a soapbox-car scientist. And not even a good one... :-/
FYI, I do have a time dimension on my datasource.
Any help greatly appreciated.
Jeppe Jespersen
Denmark
> Secondly, you can't add two sub-reports together. Just because your
> sub-reports only return one value does not mean that the main report will
> see it as such. If you plugged a sub-report in to that area that returned
> 40 rows of data and then tried to add those together with another
> sub-reports output what would you expect to see?
> So in essence you can't do what you are trying to do since you can't
> reference the subreport the way you are trying.
> --
> Chris Alton, Microsoft Corp.
> SQL Server Developer Support Engineer
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> --
>> Reply-To: "Jeppe Jespersen" <jdj@.jdj.dk>
>> From: "Jeppe Jespersen" <jdj@.jdj.dk>
>> Subject: Adding subreport values
>> Date: Fri, 26 Oct 2007 13:41:07 +0200
>> Lines: 17
>> Message-ID: <50E85932-E653-4C37-A096-567C497B9B78@.microsoft.com>
>> MIME-Version: 1.0
>> Content-Type: text/plain;
>> format=flowed;
>> charset="iso-8859-1";
>> reply-type=original
>> Content-Transfer-Encoding: 7bit
>> I have a _very_ simple table with just one row and three columns.
>> The first column of the row contains a subreport that retrieves a single
>> value.
>> The second column of the row contains a subreport that retrieves a single
>> value.
>> ...and heres where I lose it... :-)
>> The third column should contain the sum of column1 and column2. Period.
>> Please help. Thanks :-)
>> jdjespersen
>>
>|||Trust me Analysis Services is something I try to stay away from so I feel
your pain. When it comes to MDX I have almost no idea. Try the analysis
services newsgroup and see if they can give you a hand on creating a query
that will pull back the data you need in one dataset. That way you can
avoid the subreports altogether.
Good luck. You'll need it writing those queries ;)
--
Chris Alton, Microsoft Corp.
SQL Server Developer Support Engineer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
> From: "Jeppe Jespersen" <jdj@.jdj.dk>
> References: <50E85932-E653-4C37-A096-567C497B9B78@.microsoft.com>
<FQVdkw$FIHA.360@.TK2MSFTNGHUB02.phx.gbl>
> Subject: Re: Adding subreport values
> Date: Fri, 26 Oct 2007 21:31:32 +0200
> Lines: 87
>
> Hi Chris, and thanks for replying...
> > If all you are doing is returning one value from the sub-report then why
> > use the sub-report at all in the first place?
> In short, 'cause i suck. :-( I'll try to explain.
> Data is in an Analysis Services database, and MDX is not my strongpoint.
> I was hoping that by splitting my queries into seperate datasources, I
could
> get away with much simpler queries. But, not being able to use data from
> two datasets within a single table control, i figured i could do it with
> subreports.
> Imagine a desired report table layout like this. Not the most complex, i
> admit:
> Company Last Years Sales Current Sales
> Total
> Adv.Works 10000 4000
> 14000
> Northwind 3200 2000
> 5200
> Designing the above query may not be rocket science, but as far as MDX
goes,
> i'm more of a soapbox-car scientist. And not even a good one... :-/
> FYI, I do have a time dimension on my datasource.
> Any help greatly appreciated.
> Jeppe Jespersen
> Denmark
>
>
> >
> > Secondly, you can't add two sub-reports together. Just because your
> > sub-reports only return one value does not mean that the main report
will
> > see it as such. If you plugged a sub-report in to that area that
returned
> > 40 rows of data and then tried to add those together with another
> > sub-reports output what would you expect to see?
> >
> > So in essence you can't do what you are trying to do since you can't
> > reference the subreport the way you are trying.
> >
> > --
> > Chris Alton, Microsoft Corp.
> > SQL Server Developer Support Engineer
> > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > --
> >> Reply-To: "Jeppe Jespersen" <jdj@.jdj.dk>
> >> From: "Jeppe Jespersen" <jdj@.jdj.dk>
> >> Subject: Adding subreport values
> >> Date: Fri, 26 Oct 2007 13:41:07 +0200
> >> Lines: 17
> >> Message-ID: <50E85932-E653-4C37-A096-567C497B9B78@.microsoft.com>
> >> MIME-Version: 1.0
> >> Content-Type: text/plain;
> >> format=flowed;
> >> charset="iso-8859-1";
> >> reply-type=original
> >> Content-Transfer-Encoding: 7bit
> >>
> >> I have a _very_ simple table with just one row and three columns.
> >>
> >> The first column of the row contains a subreport that retrieves a
single
> >> value.
> >>
> >> The second column of the row contains a subreport that retrieves a
single
> >> value.
> >>
> >> ...and heres where I lose it... :-)
> >>
> >> The third column should contain the sum of column1 and column2. Period.
> >>
> >> Please help. Thanks :-)
> >>
> >> jdjespersen
> >>
> >>
> >>
> >
>
>|||> Trust me Analysis Services is something I try to stay away from so I feel
> your pain. When it comes to MDX I have almost no idea. Try the analysis
> services newsgroup and see if they can give you a hand on creating a query
> that will pull back the data you need in one dataset. That way you can
> avoid the subreports altogether.
> Good luck. You'll need it writing those queries ;)
Eeeek. And this is one of the simpler queries I'll need.
Thanks for trying to help.
Jeppe Jespersen
Denmark

Sunday, March 11, 2012

Adding pictures to my Database

Hello everyone!,
I'm a new user of SQL 2000 and I would like to build a database that contains pictures. This database will be used to store information regarding my products and of course I would like to show the user what I'm referring to. Any and
replies are welcomed!
Santiago Ortiz
Santiago,
many people just hold the image paths in varchar fields and the actual files
on the OS, but if you do ant to do this programatically, these articles will
help:
HOWTO: Retrieve and Update a SQL Server Text Field Using ADO
http://support.microsoft.com/?kbid=180368
HOWTO: Access and Modify SQL Server BLOB Data by Using the ADO Stream Object
http://support.microsoft.com/?kbid=258038
Using Textcopy.exe
http://www.databasejournal.com/featu...le.php/1443521
HTH,
PAul Ibison
|||Santiago,
many people just hold the image paths in varchar fields and the actual files
on the OS, but if you do ant to do this programatically, these articles will
help:
HOWTO: Retrieve and Update a SQL Server Text Field Using ADO
http://support.microsoft.com/?kbid=180368
HOWTO: Access and Modify SQL Server BLOB Data by Using the ADO Stream Object
http://support.microsoft.com/?kbid=258038
Using Textcopy.exe
http://www.databasejournal.com/featu...le.php/1443521
HTH,
PAul Ibison

Adding pictures to my Database

Hello everyone!,
I'm a new user of SQL 2000 and I would like to build a database that contain
s pictures. This database will be used to store information regarding my pro
ducts and of course I would like to show the user what I'm referring to. Any
and
replies are welcomed!
Santiago OrtizSantiago,
many people just hold the image paths in varchar fields and the actual files
on the OS, but if you do ant to do this programatically, these articles will
help:
HOWTO: Retrieve and Update a SQL Server Text Field Using ADO
http://support.microsoft.com/?kbid=180368
HOWTO: Access and Modify SQL Server BLOB Data by Using the ADO Stream Object
http://support.microsoft.com/?kbid=258038
Using Textcopy.exe
http://www.databasejournal.com/feat...cle.php/1443521
HTH,
PAul Ibison

Adding pictures to my Database

Hello everyone!,
I'm a new user of SQL 2000 and I would like to build a database that contains pictures. This database will be used to store information regarding my products and of course I would like to show the user what I'm referring to. Any and replies are welcomed!
Santiago OrtizSantiago,
many people just hold the image paths in varchar fields and the actual files
on the OS, but if you do ant to do this programatically, these articles will
help:
HOWTO: Retrieve and Update a SQL Server Text Field Using ADO
http://support.microsoft.com/?kbid=180368
HOWTO: Access and Modify SQL Server BLOB Data by Using the ADO Stream Object
http://support.microsoft.com/?kbid=258038
Using Textcopy.exe
http://www.databasejournal.com/features/mssql/article.php/1443521
HTH,
PAul Ibison

Thursday, March 8, 2012

adding new volume and swapping drive letters....

Hello - I have a SQL 2000 server which has a D: drive that contains all of my databases (system and user). I am running out of space on this volume and need to migrate the contents of this volume to a larger one. My initial plan was to introduce a new volume to the server (say a K: drive). Backup all databases (of course), and then stop all SQL services. Copy all data from D: to K:. Once data is copied, swap drive letter names (D: to I: and then K: to DSmile. Then restart SQL services. SQL should not know any better since everything was on the D: drive when it went down, and everythiing is still on the D: drive when it came back up, correct?

The other option mentioned is to detatch the databases, copy the data and then reattach them in their new locations. I understand this method, but it seems more involved (and riskier) than just renaming the drives. Does anyone have an opinion regarding these two migration methods? Thanks for your help.

Chris
I would use the attach / detach method, would be the best solution for me in this case.

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||As you indicated, the drive rename method may be less effort. As long as you are using the Disk Management applet -and not just mapping drives, it should work just fine.

Saturday, February 25, 2012

adding identifier number to records

I have a table already created and need to add an autonumber/ unique identif
ier
field.
If the table already contains records can I just add the new autonumber fiel
d
and run a query to populate this field for all records with unique values?
how do I do this?
are their other ways of doing this ? and how?
thanks
ChrisChris,
When you add and identity column to your table, SQL Server automatically
populates the column. You can not update an identity column.
Example:
use northwind
go
create table t (
colA char(1) not null unique
)
go
insert into t values('a')
insert into t values('b')
insert into t values('c')
go
select * from t
go
alter table t
add colB int not null identity
go
select * from t
go
drop table t
go
AMB
"Chris" wrote:

> I have a table already created and need to add an autonumber/ unique ident
ifier
> field.
> If the table already contains records can I just add the new autonumber fi
eld
> and run a query to populate this field for all records with unique values?
> how do I do this?
> are their other ways of doing this ? and how?
> thanks
> Chris|||I added the unique identifier column using table design.
However when I queried the database the values were all null.
Also since there are a lot of records in the table and generating the
alpha-numeric values does take processing time, I noticed adding the column
did not require any processing, (i.e. no hour glass).
Also I would prefer to just use a big int as it will take up less space and
be faster.
How can I use @.@.identity to update each record? is this possible?
Gracias Alejandro,
Tu eres muy asusto. He vido muchas siertos y respuestas de usted en los
forums.
Perdone mi espanol, estoy apprendiendo.
Por favor, constesta en ingles :)
"Alejandro Mesa" wrote:
> Chris,
> When you add and identity column to your table, SQL Server automatically
> populates the column. You can not update an identity column.
> Example:
> use northwind
> go
> create table t (
> colA char(1) not null unique
> )
> go
> insert into t values('a')
> insert into t values('b')
> insert into t values('c')
> go
> select * from t
> go
> alter table t
> add colB int not null identity
> go
> select * from t
> go
> drop table t
> go
>
> AMB
>
> "Chris" wrote:
>|||As I told you, you can not update an identity column.
AMB
"Chris" wrote:
> I added the unique identifier column using table design.
> However when I queried the database the values were all null.
> Also since there are a lot of records in the table and generating the
> alpha-numeric values does take processing time, I noticed adding the colum
n
> did not require any processing, (i.e. no hour glass).
> Also I would prefer to just use a big int as it will take up less space an
d
> be faster.
> How can I use @.@.identity to update each record? is this possible?
> Gracias Alejandro,
> Tu eres muy asusto. He vido muchas siertos y respuestas de usted en los
> forums.
> Perdone mi espanol, estoy apprendiendo.
> Por favor, constesta en ingles :)
> "Alejandro Mesa" wrote:
>|||okay, so a big int field that has been filled with a value using @.@.identity
can not be edited?
"Alejandro Mesa" wrote:
> As I told you, you can not update an identity column.
>
> AMB
> "Chris" wrote:
>|||I need to create a table with unique primary key on only one field.
How does one create or load a table with unique values in a primary key
field if
you have not been been provided unique values.
I'm happy to use just a big int data type to hold my unique values
"Chris" wrote:

> I have a table already created and need to add an autonumber/ unique ident
ifier
> field.
> If the table already contains records can I just add the new autonumber fi
eld
> and run a query to populate this field for all records with unique values?
> how do I do this?
> are their other ways of doing this ? and how?
> thanks
> Chris|||Correct.
Example:
use northwind
go
create table t (
colA char(1) not null unique
)
go
insert into t values('a')
insert into t values('b')
insert into t values('c')
go
select * from t
go
alter table t
add colB int not null identity
go
select * from t
go
-- this will give an error
update t
set colB = 4
where colB = 2
go
drop table t
go
AMB
"Chris" wrote:
> okay, so a big int field that has been filled with a value using @.@.identit
y
> can not be edited?
>
> "Alejandro Mesa" wrote:
>

Friday, February 24, 2012

Adding Foreach container programmatically and setting the enumerator properties

Hi

I have a package which contains a foreach container. Can anyone help me in setting the properties for the enumerators programmatically? I am trying to set the properties for the enumerator "ForEach File Enumerator"

The properties which i need to set are

1. Folder

2. File Type

3. Traverse Subfolder

4. Retrieve File Name

Thanks in Advance

Suganya

Can anyone help me..?Am still searching for a solution

-Suganya

Monday, February 13, 2012

adding column in resultset from SP

I have a sp: mysp_getstuff
it contains the following:

SELECT Adress,City FROM tblUserData WHERE UserName='john'

as you can see it returns 2 columns.
I also have another SP: mysp_GetNr. This sp returns an integer.

I want to call mysp_getnr from mysp_getstuff and add the result to the 2 columns in a column named 'Number'
So the resultset from mysp_getstuff should be:
Adress, City, Number (in which the number column contains the result from mysp_GetNr)

How can I do that?

Use an OUTPUT Parameter to get the value from mysp_getnr.

Declare @.num int

EXEC mysp_getnr @.params... @.num OUTPUT

Then, in your mysp_getstuff you can either return @.num as its OUTPUT param or along with the result set.

SELECT Adress,City,Number=@.num FROM tblUserData WHERE UserName='john'.