dbTalk Databases Forums  

Make BIT column say somthing other than True/False

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Make BIT column say somthing other than True/False in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
aa7im
 
Posts: n/a

Default Make BIT column say somthing other than True/False - 12-02-2004 , 11:20 AM






I am hoping for a quick answer since I have to go live on this today!
;-)


Is it possible for a column to say something other than true/false for
bit columns? I have a dimension in a report called "Active" that is
pulled from a BIT column in a SQL db.
In my OLAP report (viewed in a OWC PivotTable) instead of the values
saying True/False I want them to be Active/InActive.
Is there anyway to accomplish this?


Thanks,
Josh


Reply With Quote
  #2  
Old   
jam96-BuffaloJoe
 
Posts: n/a

Default RE: Make BIT column say somthing other than True/False - 12-02-2004 , 03:05 PM






Add a calculated member, display that with
Basic.Value Tab IIF([your measure]=True,"Active","Inactive")....

joe


"aa7im" wrote:

Quote:
I am hoping for a quick answer since I have to go live on this today!
;-)


Is it possible for a column to say something other than true/false for
bit columns? I have a dimension in a report called "Active" that is
pulled from a BIT column in a SQL db.
In my OLAP report (viewed in a OWC PivotTable) instead of the values
saying True/False I want them to be Active/InActive.
Is there anyway to accomplish this?


Thanks,
Josh



Reply With Quote
  #3  
Old   
Dave Wickert [MSFT]
 
Posts: n/a

Default Re: Make BIT column say somthing other than True/False - 12-02-2004 , 07:03 PM



Or use a CASE statement in a view to cast the 0/1 to some other values --
and then load Analsyis Services from the view. Or you could use a CASE
statement in the view to add a member name. Have the 0/1 be the member key;
and Active/Inactive be the member name. The second is the option that I
usually use.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.

"jam96-BuffaloJoe" <jam96BuffaloJoe (AT) discussions (DOT) microsoft.com> wrote in
message news:88FC5FA8-3528-4C10-B39C-BF85B7B1C14D (AT) microsoft (DOT) com...
Quote:
Add a calculated member, display that with
Basic.Value Tab IIF([your measure]=True,"Active","Inactive")....

joe


"aa7im" wrote:

I am hoping for a quick answer since I have to go live on this today!
;-)


Is it possible for a column to say something other than true/false for
bit columns? I have a dimension in a report called "Active" that is
pulled from a BIT column in a SQL db.
In my OLAP report (viewed in a OWC PivotTable) instead of the values
saying True/False I want them to be Active/InActive.
Is there anyway to accomplish this?


Thanks,
Josh





Reply With Quote
  #4  
Old   
Wayne Snyder
 
Posts: n/a

Default Re: Make BIT column say somthing other than True/False - 12-03-2004 , 07:03 AM



A third way to do this in a similar fashion to Dave's comment, (if you do
this a lot), is to create a codes table. THen create a view which joins the
orig table (on the 0/1) value to the codes table and retrieves the name...
We would design the table to have an extra column which defines the
code_type, so the codes table can be used with many other original tables.
While there may be a slight performance cost, we like the way it documents
our "Friendly Name" replacements.

--
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

"aa7im" <josh (AT) nautilusnet (DOT) com> wrote

Quote:
I am hoping for a quick answer since I have to go live on this today!
;-)


Is it possible for a column to say something other than true/false for
bit columns? I have a dimension in a report called "Active" that is
pulled from a BIT column in a SQL db.
In my OLAP report (viewed in a OWC PivotTable) instead of the values
saying True/False I want them to be Active/InActive.
Is there anyway to accomplish this?


Thanks,
Josh




Reply With Quote
  #5  
Old   
Wayne Snyder
 
Posts: n/a

Default Re: Make BIT column say somthing other than True/False - 12-03-2004 , 07:05 AM



Just another note... We also do the same thing ( sometimes in the same
table) when we want items sorted in a different order than alpha or numeric.
We add a sort column, and bring that into the cube as well...

--
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

"Dave Wickert [MSFT]" <dwickert (AT) online (DOT) microsoft.com> wrote

Quote:
Or use a CASE statement in a view to cast the 0/1 to some other values --
and then load Analsyis Services from the view. Or you could use a CASE
statement in the view to add a member name. Have the 0/1 be the member
key;
and Active/Inactive be the member name. The second is the option that I
usually use.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no
rights.

"jam96-BuffaloJoe" <jam96BuffaloJoe (AT) discussions (DOT) microsoft.com> wrote in
message news:88FC5FA8-3528-4C10-B39C-BF85B7B1C14D (AT) microsoft (DOT) com...
Add a calculated member, display that with
Basic.Value Tab IIF([your measure]=True,"Active","Inactive")....

joe


"aa7im" wrote:

I am hoping for a quick answer since I have to go live on this today!
;-)


Is it possible for a column to say something other than true/false for
bit columns? I have a dimension in a report called "Active" that is
pulled from a BIT column in a SQL db.
In my OLAP report (viewed in a OWC PivotTable) instead of the values
saying True/False I want them to be Active/InActive.
Is there anyway to accomplish this?


Thanks,
Josh







Reply With Quote
  #6  
Old   
aa7im
 
Posts: n/a

Default Re: Make BIT column say somthing other than True/False - 12-06-2004 , 12:20 PM



Thanks all... I will try some of these ideas and write back soon...


Reply With Quote
  #7  
Old   
aa7im
 
Posts: n/a

Default Re: Make BIT column say somthing other than True/False - 12-08-2004 , 03:20 AM



I ended up using the "REPLACE" function in the "Member Value" property
for the field in the dimenstion. It basically just replaces the bit 0
with "Active" and bit 1 with "InActive". It is a text replace so I
suspose it might be slow with a ton of rows but it works....
Any major issues with doing it this way?


Reply With Quote
  #8  
Old   
 
Posts: n/a

Default Re: Make BIT column say somthing other than True/False - 12-08-2004 , 05:45 PM



I think that you'd be better off making a new dimension table and joining to
that as a key.

in the dim table, you'd have
0, active
1, Not Active

for example.

i dont know if it would let you join on a bit tho, so you migh want to make
it a tinyint or something


"aa7im" <josh (AT) nautilusnet (DOT) com> wrote

Quote:
I ended up using the "REPLACE" function in the "Member Value" property
for the field in the dimenstion. It basically just replaces the bit 0
with "Active" and bit 1 with "InActive". It is a text replace so I
suspose it might be slow with a ton of rows but it works....
Any major issues with doing it this way?




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.