Showing posts with label column. Show all posts
Showing posts with label column. Show all posts

Wednesday, March 28, 2012

How to show progress bar in report column

Hi,

I have to show particular item progress status in a report column in graphical format.

For example, if item finish state is 60% then, column should display status in progress bar or similar to that.

Is this possible?

Any help would be appreciated.

Thanks

Hi,

you either make a graph showing 60 in the scale of 100 or use any thrid party tool from dundas to show gauges (or a different object)

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

sql

How to show line numbers in the first column of the report

Hi,
I want to show line numbers on report page in the first column of my
report. I am working on microsoft reporting services 2000.
How i can do this.
Regards
DineshOn Mar 9, 11:59 pm, "Dinesh" <dinesh...@.gmail.com> wrote:
> Hi,
> I want to show line numbers on report page in the first column of my
> report. I am working on microsoft reporting services 2000.
> How i can do this.
> Regards
> Dinesh
This should work: =RowNumber("DataSourceName") as an expression in the
Value property of the first column.
Regards,
Enrique Martinez
Sr. SQL Server Developer

How to show every second label in a chart

I have a stacked column chart shoving months from january 2004 to
december 2005 on the x-axis: (This is a Category Group.)
jan-04, feb-04, mar-04,apr-04.... oct-05-nov-05, dec-05
I want to show only every second month.
Any ideas how this is done? .......There are probably other ways to do it, but why not just create another
dataset that just contains the months of interest.
--
William Stacey [MVP]
<therese_gule@.hotmail.com> wrote in message
news:1137694813.606325.155960@.g14g2000cwa.googlegroups.com...
|I have a stacked column chart shoving months from january 2004 to
| december 2005 on the x-axis: (This is a Category Group.)
| jan-04, feb-04, mar-04,apr-04.... oct-05-nov-05, dec-05
|
| I want to show only every second month.
|
| Any ideas how this is done? .......
||||I need to show the trend of the data for a period of 2 years on the
same line.
A way is to implement code with MOD to do this, but that again requires
a counter.|||Assuming that in your dataset you have a row for every month returned, you
can enter an expression in the Label property of your category group for the
months that uses the month field value when the RowNumber() function returns
an odd number and uses a zero-length string when the RowNumber function
returns an even number.
"therese_gule@.hotmail.com" wrote:
> I need to show the trend of the data for a period of 2 years on the
> same line.
> A way is to implement code with MOD to do this, but that again requires
> a counter.
>

How to show distinct rows of the column of the dataset and number of distinct rows of that colum

suppose i have aDataset with 11 rows. field1 with 5 rows of aaa, 6 rows of "bbb"

I want's some thing like

field1 rowcount
aaa 5
bbb 6

Have a table and map it to the dataset. Insert a group (say table_Group1) to the table with the grouping column being "Fields!field1.Value". In the group header row of your table, use Fields!field1.Value and CountDistinct(FIelds!field1.Value, "table_Group1") to get your desired values.

Pls mark the post as answered if your problem is solved.

Shyam

How to setup two equal databases environment

Dear all,
I have an application running on a production database. And now, I
want to change a column of data to another of value and compare the result
between them. Since the data in production is changing. I need to
synchronize two set of data except the testing data. For do that, I build
replication on these two database. This is my first time using replication.
I found there's an initialize error on during synchronization job. Is there
any guideline on setup replication? Thanks
Rdgs
Ellis
Ellis,
can you explain this in a little more detail using column names and
explaining the relationship between the databases. Also, what type of
replication have you implemented.
TIA,
Paul Ibison
sql

Monday, March 26, 2012

how to show binary data in report

I want to display the content stored in image column. Can anyone tell me how?
The content is actually XML text, encoded and stored in a image type.This link should help you.
http://msdn2.microsoft.com/en-us/library/aa179439(SQL.80).aspx
Also if you have the Sample Reports installed the Product Catalog report
shows you how to do this.
--
Andy Potter
blog : http://sqlreportingservices.spaces.live.com
info@.(NOSPAM)lakeclaireenterprises.com
"Jason Wang" <JasonWang@.discussions.microsoft.com> wrote in message
news:2D1F3430-D9B7-499D-B77E-0CF6DC464F21@.microsoft.com...
>I want to display the content stored in image column. Can anyone tell me
>how?
> The content is actually XML text, encoded and stored in a image type.

How to show all field names and data in two columns i.e. Pivot / c

What we would like to do is to pivot a table with 300 columns into one that
is just two columns. The first column containing the field name and the
second column containing the value of that column.
This also includes a where clause to filter the recordset. e.g where id =
'123'
Hi
I think you are actually looking to UNPIVOT the data such as
http://www.umachandar.com/technical/...pts/Main25.htm
You will probably be better doing this client side.
John
"Smartbiz" <Smartbiz@.discussions.microsoft.com> wrote in message
news:35458430-363D-42C7-B3C0-879EE294ED1B@.microsoft.com...
> What we would like to do is to pivot a table with 300 columns into one
> that
> is just two columns. The first column containing the field name and the
> second column containing the value of that column.
> This also includes a where clause to filter the recordset. e.g where id =
> '123'
sql

How to show all field names and data in two columns i.e. Pivot / c

What we would like to do is to pivot a table with 300 columns into one that
is just two columns. The first column containing the field name and the
second column containing the value of that column.
This also includes a where clause to filter the recordset. e.g where id =
'123'Hi
I think you are actually looking to UNPIVOT the data such as
http://www.umachandar.com/technical...ipts/Main25.htm
You will probably be better doing this client side.
John
"Smartbiz" <Smartbiz@.discussions.microsoft.com> wrote in message
news:35458430-363D-42C7-B3C0-879EE294ED1B@.microsoft.com...
> What we would like to do is to pivot a table with 300 columns into one
> that
> is just two columns. The first column containing the field name and the
> second column containing the value of that column.
> This also includes a where clause to filter the recordset. e.g where id =
> '123'

How to show all field names and data in two columns i.e. Pivot / c

What we would like to do is to pivot a table with 300 columns into one that
is just two columns. The first column containing the field name and the
second column containing the value of that column.
This also includes a where clause to filter the recordset. e.g where id = '123'Hi
I think you are actually looking to UNPIVOT the data such as
http://www.umachandar.com/technical/SQL6x70Scripts/Main25.htm
You will probably be better doing this client side.
John
"Smartbiz" <Smartbiz@.discussions.microsoft.com> wrote in message
news:35458430-363D-42C7-B3C0-879EE294ED1B@.microsoft.com...
> What we would like to do is to pivot a table with 300 columns into one
> that
> is just two columns. The first column containing the field name and the
> second column containing the value of that column.
> This also includes a where clause to filter the recordset. e.g where id => '123'

How to show a line between table column headers and the details

I am using table object to present report.

table row1 has all the column names and table row2 has the data.

How can i put a horizontal line between column names and the data rows.

Thank you very much.

Would adding a solid border to the bottom of the row having the column headers in it work?

Jarret

How to shorten column length of nvarcha type in Transact-SQL?

When i use alter table alter column,i can lengthen the length of a column of nvarchar type.

But when i use the same way to shorten column length,it issue an error.

I know how to do this in Enterprise Manager,but not in Transact-SQL.If you make the change in Enterprise Manager but, innstead of saving your changes, click on the "Save Change Script" button on the toolbar and it will give you the T-SQL you need to make this change.

In this instance you will see that an ALTER COLUMN is not issued. Behind the scenes the table is actually dropped and recreated.

-Jamie|||You can use ALTER TABLE...ALTER COLUMN to reduce the length of the column as long as the data in your column will fit. See Books Online for more details. In general, you do not want to rely on the UI to make schema changes since it doesn't do the operation in the most efficient way and lot of cases it drops & recreates the table which is resource intensive.|||Thanksql

How to setup two equal databases environment

Dear all,
I have an application running on a production database. And now, I
want to change a column of data to another of value and compare the result
between them. Since the data in production is changing. I need to
synchronize two set of data except the testing data. For do that, I build
replication on these two database. This is my first time using replication.
I found there's an initialize error on during synchronization job. Is there
any guideline on setup replication? Thanks
Rdgs
EllisEllis,
can you explain this in a little more detail using column names and
explaining the relationship between the databases. Also, what type of
replication have you implemented.
TIA,
Paul Ibison

How to setup two equal databases environment

Dear all,
I have an application running on a production database. And now, I
want to change a column of data to another of value and compare the result
between them. Since the data in production is changing. I need to
synchronize two set of data except the testing data. For do that, I build
replication on these two database. This is my first time using replication.
I found there's an initialize error on during synchronization job. Is there
any guideline on setup replication? Thanks
Rdgs
Ellis
Ellis,
can you explain this in a little more detail using column names and
explaining the relationship between the databases. Also, what type of
replication have you implemented.
TIA,
Paul Ibison

How to setup two equal databases environment

Dear all,
I have an application running on a production database. And now, I
want to change a column of data to another of value and compare the result
between them. Since the data in production is changing. I need to
synchronize two set of data except the testing data. For do that, I build
replication on these two database. This is my first time using replication.
I found there's an initialize error on during synchronization job. Is there
any guideline on setup replication? Thanks
Rdgs
EllisEllis,
can you explain this in a little more detail using column names and
explaining the relationship between the databases. Also, what type of
replication have you implemented.
TIA,
Paul Ibison

Wednesday, March 21, 2012

How to set writable property to readonly

Hi all,
Is there any command to change writable property of database or table or
column to readonly.
Thanks in advance.
SupriyaBelow links will be helpful
http://sqlblogcasts.com/blogs/tonyrogerson/archive/2007/08/26/how-to-make-a-table-read-only-in-sql-server.aspx
http://sqlblogcasts.com/blogs/tonyrogerson/archive/2007/08/27/read-only-file-group-tables-are-not-really-read-only-in-the-strict-sense.aspx
-
Shiju Samuel
On Sep 11, 1:56 pm, "Supriya Pagadala" <supriya_...@.yahoo.com> wrote:
> Hi all,
> Is there any command to change writable property of database or table or
> column to readonly.
> Thanks in advance.
> Supriya|||Hi Samuel,
Thanks for your response.I think you misunderstood the question.I want
to make particular property to readonly. Not entire table or database.
for example Table has following properties..
Name,NoOfColumns...etc.
If "Name" property is writable , how to make it read only?
"Shiju Samuel" <shiju.samuel@.gmail.com> wrote in message
news:1189502014.158301.151010@.y42g2000hsy.googlegroups.com...
> Below links will be helpful
> http://sqlblogcasts.com/blogs/tonyrogerson/archive/2007/08/26/how-to-make-a-table-read-only-in-sql-server.aspx
> http://sqlblogcasts.com/blogs/tonyrogerson/archive/2007/08/27/read-only-file-group-tables-are-not-really-read-only-in-the-strict-sense.aspx
> -
> Shiju Samuel
> On Sep 11, 1:56 pm, "Supriya Pagadala" <supriya_...@.yahoo.com> wrote:
>> Hi all,
>> Is there any command to change writable property of database or table
>> or
>> column to readonly.
>> Thanks in advance.
>> Supriya
>sql

how to set up unique combinational constraint

Hi I have a table and I do not want to allow entries if two column value
match, for example
table 1
id type name value
int varchar20 varchar20 int
1 test paul 2
if name is paul and value is 3 allow insert
if name is paul and value is 2 do not allow insert.
I am trying to do this with under the index/keys menu, not quite sure how to
do it and if this is correct.
Thanks.
Paul G
Software engineer.
If you just want to prevent the combination from being inserted into the
table, you can use an INSERT trigger. If you want the condition to always
hold for all the rows in the table, you can create a CHECK constraint on the
table.
Linchi
"Paul" wrote:

> Hi I have a table and I do not want to allow entries if two column value
> match, for example
> table 1
> id type name value
> int varchar20 varchar20 int
> 1 test paul 2
> if name is paul and value is 3 allow insert
> if name is paul and value is 2 do not allow insert.
> I am trying to do this with under the index/keys menu, not quite sure how to
> do it and if this is correct.
> Thanks.
> --
> Paul G
> Software engineer.
|||Consider putting a UNIQUE constraint on (name, value)
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
news:23467935-67F3-418E-A24E-200CE74DD637@.microsoft.com...
If you just want to prevent the combination from being inserted into the
table, you can use an INSERT trigger. If you want the condition to always
hold for all the rows in the table, you can create a CHECK constraint on the
table.
Linchi
"Paul" wrote:

> Hi I have a table and I do not want to allow entries if two column value
> match, for example
> table 1
> id type name value
> int varchar20 varchar20 int
> 1 test paul 2
> if name is paul and value is 3 allow insert
> if name is paul and value is 2 do not allow insert.
> I am trying to do this with under the index/keys menu, not quite sure how
to
> do it and if this is correct.
> Thanks.
> --
> Paul G
> Software engineer.
|||I think I need the check constraint, I do not want any duplicates in the
table using both columns.
for example
id type name value
int varchar20 varchar20 int
1 test paul 2
2 test1 paul 3 ok
3 test2 tom 2 ok
4 test3 tom 3 ok
5 test4 tom 2 **do not allow this
entry**
Paul G
Software engineer.
"Linchi Shea" wrote:
[vbcol=seagreen]
> If you just want to prevent the combination from being inserted into the
> table, you can use an INSERT trigger. If you want the condition to always
> hold for all the rows in the table, you can create a CHECK constraint on the
> table.
> Linchi
> "Paul" wrote:
|||Actually, you want a UNIQUE constraint on (name, value):
alter table MyTable
add
constraint UK_MyTable UNIQUE (name, value)
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:65E03382-8002-4FCE-8531-6EA764838D75@.microsoft.com...
I think I need the check constraint, I do not want any duplicates in the
table using both columns.
for example
id type name value
int varchar20 varchar20 int
1 test paul 2
2 test1 paul 3 ok
3 test2 tom 2 ok
4 test3 tom 3 ok
5 test4 tom 2 **do not allow this
entry**
Paul G
Software engineer.
"Linchi Shea" wrote:

> If you just want to prevent the combination from being inserted into the
> table, you can use an INSERT trigger. If you want the condition to always
> hold for all the rows in the table, you can create a CHECK constraint on
the[vbcol=seagreen]
> table.
> Linchi
> "Paul" wrote:
how to[vbcol=seagreen]
|||ok thanks. Since I do not care if they are unique in a single column but
need to look at both columns together would I need to change the statement or
would the statement below still work
thanks?
alter table MyTable
add
constraint UK_MyTable UNIQUE (name, value)
column1 column2
paul 1 ok
paul 2 ok
paul 1 do not allow this entry match(value
in column1 and column2 matches value in column1 and column2 in previous
entry).
Paul G
Software engineer.
"Tom Moreau" wrote:

> Actually, you want a UNIQUE constraint on (name, value):
> alter table MyTable
> add
> constraint UK_MyTable UNIQUE (name, value)
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:65E03382-8002-4FCE-8531-6EA764838D75@.microsoft.com...
> I think I need the check constraint, I do not want any duplicates in the
> table using both columns.
> for example
> id type name value
> int varchar20 varchar20 int
> 1 test paul 2
> 2 test1 paul 3 ok
> 3 test2 tom 2 ok
> 4 test3 tom 3 ok
> 5 test4 tom 2 **do not allow this
> entry**
>
> --
> Paul G
> Software engineer.
>
> "Linchi Shea" wrote:
> the
> how to
>
>
|||The code I gave you is what you need, since it specifies that the uniqueness
is to be applied to the combination of both columns.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:D044B7E2-3B9A-4B19-84A9-AADDA4AEBE2A@.microsoft.com...
ok thanks. Since I do not care if they are unique in a single column but
need to look at both columns together would I need to change the statement
or
would the statement below still work
thanks?
alter table MyTable
add
constraint UK_MyTable UNIQUE (name, value)
column1 column2
paul 1 ok
paul 2 ok
paul 1 do not allow this entry match(value
in column1 and column2 matches value in column1 and column2 in previous
entry).
Paul G
Software engineer.
"Tom Moreau" wrote:

> Actually, you want a UNIQUE constraint on (name, value):
> alter table MyTable
> add
> constraint UK_MyTable UNIQUE (name, value)
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:65E03382-8002-4FCE-8531-6EA764838D75@.microsoft.com...
> I think I need the check constraint, I do not want any duplicates in the
> table using both columns.
> for example
> id type name value
> int varchar20 varchar20 int
> 1 test paul 2
> 2 test1 paul 3 ok
> 3 test2 tom 2 ok
> 4 test3 tom 3 ok
> 5 test4 tom 2 **do not allow
this[vbcol=seagreen]
> entry**
>
> --
> Paul G
> Software engineer.
>
> "Linchi Shea" wrote:
always[vbcol=seagreen]
> the
value
> how to
>
>
sql

how to set up unique combinational constraint

Hi I have a table and I do not want to allow entries if two column value
match, for example
table 1
id type name value
int varchar20 varchar20 int
1 test paul 2
if name is paul and value is 3 allow insert
if name is paul and value is 2 do not allow insert.
I am trying to do this with under the index/keys menu, not quite sure how to
do it and if this is correct.
Thanks.
--
Paul G
Software engineer.If you just want to prevent the combination from being inserted into the
table, you can use an INSERT trigger. If you want the condition to always
hold for all the rows in the table, you can create a CHECK constraint on the
table.
Linchi
"Paul" wrote:
> Hi I have a table and I do not want to allow entries if two column value
> match, for example
> table 1
> id type name value
> int varchar20 varchar20 int
> 1 test paul 2
> if name is paul and value is 3 allow insert
> if name is paul and value is 2 do not allow insert.
> I am trying to do this with under the index/keys menu, not quite sure how to
> do it and if this is correct.
> Thanks.
> --
> Paul G
> Software engineer.|||Consider putting a UNIQUE constraint on (name, value)
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
news:23467935-67F3-418E-A24E-200CE74DD637@.microsoft.com...
If you just want to prevent the combination from being inserted into the
table, you can use an INSERT trigger. If you want the condition to always
hold for all the rows in the table, you can create a CHECK constraint on the
table.
Linchi
"Paul" wrote:
> Hi I have a table and I do not want to allow entries if two column value
> match, for example
> table 1
> id type name value
> int varchar20 varchar20 int
> 1 test paul 2
> if name is paul and value is 3 allow insert
> if name is paul and value is 2 do not allow insert.
> I am trying to do this with under the index/keys menu, not quite sure how
to
> do it and if this is correct.
> Thanks.
> --
> Paul G
> Software engineer.|||I think I need the check constraint, I do not want any duplicates in the
table using both columns.
for example
id type name value
int varchar20 varchar20 int
1 test paul 2
2 test1 paul 3 ok
3 test2 tom 2 ok
4 test3 tom 3 ok
5 test4 tom 2 **do not allow this
entry**
Paul G
Software engineer.
"Linchi Shea" wrote:
> If you just want to prevent the combination from being inserted into the
> table, you can use an INSERT trigger. If you want the condition to always
> hold for all the rows in the table, you can create a CHECK constraint on the
> table.
> Linchi
> "Paul" wrote:
> > Hi I have a table and I do not want to allow entries if two column value
> > match, for example
> > table 1
> >
> > id type name value
> > int varchar20 varchar20 int
> > 1 test paul 2
> >
> > if name is paul and value is 3 allow insert
> > if name is paul and value is 2 do not allow insert.
> >
> > I am trying to do this with under the index/keys menu, not quite sure how to
> > do it and if this is correct.
> > Thanks.
> > --
> > Paul G
> > Software engineer.|||Actually, you want a UNIQUE constraint on (name, value):
alter table MyTable
add
constraint UK_MyTable UNIQUE (name, value)
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:65E03382-8002-4FCE-8531-6EA764838D75@.microsoft.com...
I think I need the check constraint, I do not want any duplicates in the
table using both columns.
for example
id type name value
int varchar20 varchar20 int
1 test paul 2
2 test1 paul 3 ok
3 test2 tom 2 ok
4 test3 tom 3 ok
5 test4 tom 2 **do not allow this
entry**
Paul G
Software engineer.
"Linchi Shea" wrote:
> If you just want to prevent the combination from being inserted into the
> table, you can use an INSERT trigger. If you want the condition to always
> hold for all the rows in the table, you can create a CHECK constraint on
the
> table.
> Linchi
> "Paul" wrote:
> > Hi I have a table and I do not want to allow entries if two column value
> > match, for example
> > table 1
> >
> > id type name value
> > int varchar20 varchar20 int
> > 1 test paul 2
> >
> > if name is paul and value is 3 allow insert
> > if name is paul and value is 2 do not allow insert.
> >
> > I am trying to do this with under the index/keys menu, not quite sure
how to
> > do it and if this is correct.
> > Thanks.
> > --
> > Paul G
> > Software engineer.|||ok thanks. Since I do not care if they are unique in a single column but
need to look at both columns together would I need to change the statement or
would the statement below still work
thanks?
alter table MyTable
add
constraint UK_MyTable UNIQUE (name, value)
column1 column2
paul 1 ok
paul 2 ok
paul 1 do not allow this entry match(value
in column1 and column2 matches value in column1 and column2 in previous
entry).
--
Paul G
Software engineer.
"Tom Moreau" wrote:
> Actually, you want a UNIQUE constraint on (name, value):
> alter table MyTable
> add
> constraint UK_MyTable UNIQUE (name, value)
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:65E03382-8002-4FCE-8531-6EA764838D75@.microsoft.com...
> I think I need the check constraint, I do not want any duplicates in the
> table using both columns.
> for example
> id type name value
> int varchar20 varchar20 int
> 1 test paul 2
> 2 test1 paul 3 ok
> 3 test2 tom 2 ok
> 4 test3 tom 3 ok
> 5 test4 tom 2 **do not allow this
> entry**
>
> --
> Paul G
> Software engineer.
>
> "Linchi Shea" wrote:
> > If you just want to prevent the combination from being inserted into the
> > table, you can use an INSERT trigger. If you want the condition to always
> > hold for all the rows in the table, you can create a CHECK constraint on
> the
> > table.
> >
> > Linchi
> >
> > "Paul" wrote:
> >
> > > Hi I have a table and I do not want to allow entries if two column value
> > > match, for example
> > > table 1
> > >
> > > id type name value
> > > int varchar20 varchar20 int
> > > 1 test paul 2
> > >
> > > if name is paul and value is 3 allow insert
> > > if name is paul and value is 2 do not allow insert.
> > >
> > > I am trying to do this with under the index/keys menu, not quite sure
> how to
> > > do it and if this is correct.
> > > Thanks.
> > > --
> > > Paul G
> > > Software engineer.
>
>|||The code I gave you is what you need, since it specifies that the uniqueness
is to be applied to the combination of both columns.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:D044B7E2-3B9A-4B19-84A9-AADDA4AEBE2A@.microsoft.com...
ok thanks. Since I do not care if they are unique in a single column but
need to look at both columns together would I need to change the statement
or
would the statement below still work
thanks?
alter table MyTable
add
constraint UK_MyTable UNIQUE (name, value)
column1 column2
paul 1 ok
paul 2 ok
paul 1 do not allow this entry match(value
in column1 and column2 matches value in column1 and column2 in previous
entry).
--
Paul G
Software engineer.
"Tom Moreau" wrote:
> Actually, you want a UNIQUE constraint on (name, value):
> alter table MyTable
> add
> constraint UK_MyTable UNIQUE (name, value)
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:65E03382-8002-4FCE-8531-6EA764838D75@.microsoft.com...
> I think I need the check constraint, I do not want any duplicates in the
> table using both columns.
> for example
> id type name value
> int varchar20 varchar20 int
> 1 test paul 2
> 2 test1 paul 3 ok
> 3 test2 tom 2 ok
> 4 test3 tom 3 ok
> 5 test4 tom 2 **do not allow
this
> entry**
>
> --
> Paul G
> Software engineer.
>
> "Linchi Shea" wrote:
> > If you just want to prevent the combination from being inserted into the
> > table, you can use an INSERT trigger. If you want the condition to
always
> > hold for all the rows in the table, you can create a CHECK constraint on
> the
> > table.
> >
> > Linchi
> >
> > "Paul" wrote:
> >
> > > Hi I have a table and I do not want to allow entries if two column
value
> > > match, for example
> > > table 1
> > >
> > > id type name value
> > > int varchar20 varchar20 int
> > > 1 test paul 2
> > >
> > > if name is paul and value is 3 allow insert
> > > if name is paul and value is 2 do not allow insert.
> > >
> > > I am trying to do this with under the index/keys menu, not quite sure
> how to
> > > do it and if this is correct.
> > > Thanks.
> > > --
> > > Paul G
> > > Software engineer.
>
>

How to set up search on text stored in an image type of data?

I am saving large text document in an image type of column in a SQL Server 2000 table.

How will I set up searching of words/ phrases for data stored in this column?

what type of documents are they? If it is just plaintext you really should store it in an nvarhcar(max) field instead. That way you can use SQL queries to search the text.

|||

But nvarchar has a length problem. If it's a word document that is stored and this doc's length is greater than varchar max size, then we have to use image or ntext datatype. Because of this I have to use image data type.

|||

That's going to be a challenge because the image data type is storing a byte array so i'm not sure if it is possible to search it without first pulling it down and manipulating it in your code behind.

How to set up row/column labels for matrix report?

It seems the row/column lables are not automatically created in the matrix
report as in table report.
Anyone know how to do this?
Thanks,The matrix automatically creates the labels based on the x-axis (columns)
fields that you supply it.
-Tim
"yongli" <yongli@.discussions.microsoft.com> wrote in message
news:3BF751AA-4752-41B0-B1EE-5A6247B9C6B4@.microsoft.com...
> It seems the row/column lables are not automatically created in the matrix
> report as in table report.
> Anyone know how to do this?
> Thanks,|||Thanks for the quick response. Probably I didn't provide the full details.
When I used the report model base on my OLAP cube, the labels were created
automatically. I was talking about creating a free-form report using matrix,
when I draged the dataset (based on MDX) field over to the column/row in the
matrix, it didn't create lable for me, so I wonder if I have to manually add
it in the case.
Thanks,
"Tim Dot NoSpam" wrote:
> The matrix automatically creates the labels based on the x-axis (columns)
> fields that you supply it.
> -Tim
> "yongli" <yongli@.discussions.microsoft.com> wrote in message
> news:3BF751AA-4752-41B0-B1EE-5A6247B9C6B4@.microsoft.com...
> > It seems the row/column lables are not automatically created in the matrix
> > report as in table report.
> >
> > Anyone know how to do this?
> >
> > Thanks,
>
>|||Gotcha. If you use the report wizard first to see how the wizard sets up
the matrix, this might help. I usually use the matrix wizard to create the
report, mainly because I'm lazy...
T-im
"yongli" <yongli@.discussions.microsoft.com> wrote in message
news:19CACC04-476B-47A1-9962-3A90A724B7A4@.microsoft.com...
> Thanks for the quick response. Probably I didn't provide the full
> details.
> When I used the report model base on my OLAP cube, the labels were created
> automatically. I was talking about creating a free-form report using
> matrix,
> when I draged the dataset (based on MDX) field over to the column/row in
> the
> matrix, it didn't create lable for me, so I wonder if I have to manually
> add
> it in the case.
> Thanks,
> "Tim Dot NoSpam" wrote:
>> The matrix automatically creates the labels based on the x-axis (columns)
>> fields that you supply it.
>> -Tim
>> "yongli" <yongli@.discussions.microsoft.com> wrote in message
>> news:3BF751AA-4752-41B0-B1EE-5A6247B9C6B4@.microsoft.com...
>> > It seems the row/column lables are not automatically created in the
>> > matrix
>> > report as in table report.
>> >
>> > Anyone know how to do this?
>> >
>> > Thanks,
>>

Monday, March 19, 2012

How to set two filters to be 'Or' relation?

I have two or more filters for a metrix, but I found the 'And/Or' column is
disable in filter tab of Matrix properties Dialog.
In addition, the filters element in RDL is defined here:
<Filters>
<Filter Name"...">...</Filter>
</Filters>
If there are two filters, the default relation is 'And', but how to set the
'Or' relation? Does Report Service itself only support 'And' relation for
report filter?
Thanks in advance.All filter expressions within filter are related by "And"
"Or" is used by UI to represent operator "In".
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Xie Zheng" <XieZheng@.discussions.microsoft.com> wrote in message
news:B76542ED-207A-4CCF-8D28-BB8665EF8F61@.microsoft.com...
>I have two or more filters for a metrix, but I found the 'And/Or' column is
> disable in filter tab of Matrix properties Dialog.
> In addition, the filters element in RDL is defined here:
> <Filters>
> <Filter Name"...">...</Filter>
> </Filters>
> If there are two filters, the default relation is 'And', but how to set
> the
> 'Or' relation? Does Report Service itself only support 'And' relation for
> report filter?
> Thanks in advance.|||Please check this related newsgroup thread:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=ba53b4b7-cffc-4851-af9f-5e6eb48b1b1c&sloc=en-us
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Xie Zheng" <XieZheng@.discussions.microsoft.com> wrote in message
news:B76542ED-207A-4CCF-8D28-BB8665EF8F61@.microsoft.com...
> I have two or more filters for a metrix, but I found the 'And/Or' column
is
> disable in filter tab of Matrix properties Dialog.
> In addition, the filters element in RDL is defined here:
> <Filters>
> <Filter Name"...">...</Filter>
> </Filters>
> If there are two filters, the default relation is 'And', but how to set
the
> 'Or' relation? Does Report Service itself only support 'And' relation for
> report filter?
> Thanks in advance.