Hi,
I have a report. In one column i want to show a certain image depending the
value of another column. For example:
if text1 =1 than text10 = image1
elseif text1 =2 than text10 = image2
else text1 =3 than text10 = image3
end if
Is this possible? Also what i do recall is that in access if you set an
image for one row, the image goes for all rows (in a form). Does this applies
for SQL Reports also?
In general, how can i refence to a control (like a list, a rectangle, etc)
on a report?
Thnx,
StanleyIn the value of your image control, put the following:
=IIF(Fields!Sales.Value = True, "checkedbox-big.bmp", "blankbox.bmp")
in my solution, my bmp's are stored as part of the solution, so they are
deployed to the server as well.
"Stanley" wrote:
> Hi,
> I have a report. In one column i want to show a certain image depending the
> value of another column. For example:
> if text1 =1 than text10 = image1
> elseif text1 =2 than text10 = image2
> else text1 =3 than text10 = image3
> end if
> Is this possible? Also what i do recall is that in access if you set an
> image for one row, the image goes for all rows (in a form). Does this applies
> for SQL Reports also?
> In general, how can i refence to a control (like a list, a rectangle, etc)
> on a report?
> Thnx,
> Stanley
>|||Hi Pinolian,
Thnx for your response. I have added the pictures to the solution and
deployed it. But instead of seeing the images i get to see a 'red cross' like
it cannot find the image. Do you know why?
When the solution is deployed should i see the images in the report manager
also?
Thnx,
Stanley
"Pinolian" wrote:
> In the value of your image control, put the following:
> =IIF(Fields!Sales.Value = True, "checkedbox-big.bmp", "blankbox.bmp")
> in my solution, my bmp's are stored as part of the solution, so they are
> deployed to the server as well.
>
> "Stanley" wrote:
> > Hi,
> >
> > I have a report. In one column i want to show a certain image depending the
> > value of another column. For example:
> >
> > if text1 =1 than text10 = image1
> > elseif text1 =2 than text10 = image2
> > else text1 =3 than text10 = image3
> > end if
> >
> > Is this possible? Also what i do recall is that in access if you set an
> > image for one row, the image goes for all rows (in a form). Does this applies
> > for SQL Reports also?
> >
> > In general, how can i refence to a control (like a list, a rectangle, etc)
> > on a report?
> >
> > Thnx,
> >
> > Stanley
> >
> >|||Problem Solved with the image not showing. The picture name should be
mentioned without the extension, like:
=IIF(Fields!Sales.Value = True, "checkedbox-big", "blankbox")
"Pinolian" wrote:
> In the value of your image control, put the following:
> =IIF(Fields!Sales.Value = True, "checkedbox-big.bmp", "blankbox.bmp")
> in my solution, my bmp's are stored as part of the solution, so they are
> deployed to the server as well.
>
> "Stanley" wrote:
> > Hi,
> >
> > I have a report. In one column i want to show a certain image depending the
> > value of another column. For example:
> >
> > if text1 =1 than text10 = image1
> > elseif text1 =2 than text10 = image2
> > else text1 =3 than text10 = image3
> > end if
> >
> > Is this possible? Also what i do recall is that in access if you set an
> > image for one row, the image goes for all rows (in a form). Does this applies
> > for SQL Reports also?
> >
> > In general, how can i refence to a control (like a list, a rectangle, etc)
> > on a report?
> >
> > Thnx,
> >
> > Stanley
> >
> >
Showing posts with label certain. Show all posts
Showing posts with label certain. Show all posts
Friday, March 23, 2012
Sunday, February 19, 2012
How to query for unique constraints only?
I am trying to get all the unique constraints on a certain table, but
can't seem to find the right SQL to do it.
Anyone have any pointers?
RegardsFrank Rizzo wrote:
> I am trying to get all the unique constraints on a certain table, but
> can't seem to find the right SQL to do it.
> Anyone have any pointers?
> Regards
Never mind. RTFM.
SELECT OBJECT_NAME(C.constid)
FROM sysconstraints C
WHERE C.id=OBJECT_ID('dbo.employee') AND (C.status & 0xf)=2
ORDER BY C.constid|||Hi,
Execute the below query to get all Unique constraint defined for a database
with Table name.
select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
where Constraint_Type='Unique'
Thanks
Hari
SQL Server MVP
"Frank Rizzo" <frizzo@.notn.com> wrote in message
news:eAUEnN7zGHA.2300@.TK2MSFTNGP05.phx.gbl...
>I am trying to get all the unique constraints on a certain table, but can't
>seem to find the right SQL to do it.
> Anyone have any pointers?
> Regards|||Hari Prasad wrote:
> Hi,
> Execute the below query to get all Unique constraint defined for a database
> with Table name.
>
> select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
> where Constraint_Type='Unique'
I forgot to mention, this had to go against mssql 7.0.
>
> Thanks
> Hari
> SQL Server MVP
> "Frank Rizzo" <frizzo@.notn.com> wrote in message
> news:eAUEnN7zGHA.2300@.TK2MSFTNGP05.phx.gbl...
>> I am trying to get all the unique constraints on a certain table, but can't
>> seem to find the right SQL to do it.
>> Anyone have any pointers?
>> Regards
>|||Hi,
You could query sysconstraints Table.
You could also try;
select * from sysobjects where type='K'
This gives you both Primary and Unique constraints
Thanks
Hari
SQL Server MVP
"Frank Rizzo" <frizzo@.notn.com> wrote in message
news:%23eQJYk7zGHA.720@.TK2MSFTNGP02.phx.gbl...
> Hari Prasad wrote:
>> Hi,
>> Execute the below query to get all Unique constraint defined for a
>> database with Table name.
>>
>> select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
>> where Constraint_Type='Unique'
> I forgot to mention, this had to go against mssql 7.0.
>
>>
>> Thanks
>> Hari
>> SQL Server MVP
>> "Frank Rizzo" <frizzo@.notn.com> wrote in message
>> news:eAUEnN7zGHA.2300@.TK2MSFTNGP05.phx.gbl...
>> I am trying to get all the unique constraints on a certain table, but
>> can't seem to find the right SQL to do it.
>> Anyone have any pointers?
>> Regards
can't seem to find the right SQL to do it.
Anyone have any pointers?
RegardsFrank Rizzo wrote:
> I am trying to get all the unique constraints on a certain table, but
> can't seem to find the right SQL to do it.
> Anyone have any pointers?
> Regards
Never mind. RTFM.
SELECT OBJECT_NAME(C.constid)
FROM sysconstraints C
WHERE C.id=OBJECT_ID('dbo.employee') AND (C.status & 0xf)=2
ORDER BY C.constid|||Hi,
Execute the below query to get all Unique constraint defined for a database
with Table name.
select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
where Constraint_Type='Unique'
Thanks
Hari
SQL Server MVP
"Frank Rizzo" <frizzo@.notn.com> wrote in message
news:eAUEnN7zGHA.2300@.TK2MSFTNGP05.phx.gbl...
>I am trying to get all the unique constraints on a certain table, but can't
>seem to find the right SQL to do it.
> Anyone have any pointers?
> Regards|||Hari Prasad wrote:
> Hi,
> Execute the below query to get all Unique constraint defined for a database
> with Table name.
>
> select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
> where Constraint_Type='Unique'
I forgot to mention, this had to go against mssql 7.0.
>
> Thanks
> Hari
> SQL Server MVP
> "Frank Rizzo" <frizzo@.notn.com> wrote in message
> news:eAUEnN7zGHA.2300@.TK2MSFTNGP05.phx.gbl...
>> I am trying to get all the unique constraints on a certain table, but can't
>> seem to find the right SQL to do it.
>> Anyone have any pointers?
>> Regards
>|||Hi,
You could query sysconstraints Table.
You could also try;
select * from sysobjects where type='K'
This gives you both Primary and Unique constraints
Thanks
Hari
SQL Server MVP
"Frank Rizzo" <frizzo@.notn.com> wrote in message
news:%23eQJYk7zGHA.720@.TK2MSFTNGP02.phx.gbl...
> Hari Prasad wrote:
>> Hi,
>> Execute the below query to get all Unique constraint defined for a
>> database with Table name.
>>
>> select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
>> where Constraint_Type='Unique'
> I forgot to mention, this had to go against mssql 7.0.
>
>>
>> Thanks
>> Hari
>> SQL Server MVP
>> "Frank Rizzo" <frizzo@.notn.com> wrote in message
>> news:eAUEnN7zGHA.2300@.TK2MSFTNGP05.phx.gbl...
>> I am trying to get all the unique constraints on a certain table, but
>> can't seem to find the right SQL to do it.
>> Anyone have any pointers?
>> Regards
How to query for unique constraints only?
I am trying to get all the unique constraints on a certain table, but
can't seem to find the right SQL to do it.
Anyone have any pointers?
RegardsFrank Rizzo wrote:
> I am trying to get all the unique constraints on a certain table, but
> can't seem to find the right SQL to do it.
> Anyone have any pointers?
> Regards
Never mind. RTFM.
SELECT OBJECT_NAME(C.constid)
FROM sysconstraints C
WHERE C.id=OBJECT_ID('dbo.employee') AND (C.status & 0xf)=2
ORDER BY C.constid|||Hi,
Execute the below query to get all Unique constraint defined for a database
with Table name.
select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
where Constraint_Type='Unique'
Thanks
Hari
SQL Server MVP
"Frank Rizzo" <frizzo@.notn.com> wrote in message
news:eAUEnN7zGHA.2300@.TK2MSFTNGP05.phx.gbl...
>I am trying to get all the unique constraints on a certain table, but can't
>seem to find the right SQL to do it.
> Anyone have any pointers?
> Regards|||Hari Prasad wrote:
> Hi,
> Execute the below query to get all Unique constraint defined for a databas
e
> with Table name.
>
> select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
> where Constraint_Type='Unique'
I forgot to mention, this had to go against mssql 7.0.
>
> Thanks
> Hari
> SQL Server MVP
> "Frank Rizzo" <frizzo@.notn.com> wrote in message
> news:eAUEnN7zGHA.2300@.TK2MSFTNGP05.phx.gbl...
>|||Hi,
You could query sysconstraints Table.
You could also try;
select * from sysobjects where type='K'
This gives you both Primary and Unique constraints
Thanks
Hari
SQL Server MVP
"Frank Rizzo" <frizzo@.notn.com> wrote in message
news:%23eQJYk7zGHA.720@.TK2MSFTNGP02.phx.gbl...[vbcol=seagreen]
> Hari Prasad wrote:
> I forgot to mention, this had to go against mssql 7.0.
>
can't seem to find the right SQL to do it.
Anyone have any pointers?
RegardsFrank Rizzo wrote:
> I am trying to get all the unique constraints on a certain table, but
> can't seem to find the right SQL to do it.
> Anyone have any pointers?
> Regards
Never mind. RTFM.
SELECT OBJECT_NAME(C.constid)
FROM sysconstraints C
WHERE C.id=OBJECT_ID('dbo.employee') AND (C.status & 0xf)=2
ORDER BY C.constid|||Hi,
Execute the below query to get all Unique constraint defined for a database
with Table name.
select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
where Constraint_Type='Unique'
Thanks
Hari
SQL Server MVP
"Frank Rizzo" <frizzo@.notn.com> wrote in message
news:eAUEnN7zGHA.2300@.TK2MSFTNGP05.phx.gbl...
>I am trying to get all the unique constraints on a certain table, but can't
>seem to find the right SQL to do it.
> Anyone have any pointers?
> Regards|||Hari Prasad wrote:
> Hi,
> Execute the below query to get all Unique constraint defined for a databas
e
> with Table name.
>
> select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
> where Constraint_Type='Unique'
I forgot to mention, this had to go against mssql 7.0.
>
> Thanks
> Hari
> SQL Server MVP
> "Frank Rizzo" <frizzo@.notn.com> wrote in message
> news:eAUEnN7zGHA.2300@.TK2MSFTNGP05.phx.gbl...
>|||Hi,
You could query sysconstraints Table.
You could also try;
select * from sysobjects where type='K'
This gives you both Primary and Unique constraints
Thanks
Hari
SQL Server MVP
"Frank Rizzo" <frizzo@.notn.com> wrote in message
news:%23eQJYk7zGHA.720@.TK2MSFTNGP02.phx.gbl...[vbcol=seagreen]
> Hari Prasad wrote:
> I forgot to mention, this had to go against mssql 7.0.
>
Subscribe to:
Posts (Atom)