dbTalk Databases Forums  

How to handle boolean field

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


Discuss How to handle boolean field in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Henrik Skak Pedersen
 
Posts: n/a

Default How to handle boolean field - 03-09-2006 , 12:14 PM






Hi,

I have a boolean field in my table which is represented by a bit data type.
I would like to show 0=No and 1=false. I know that I can solve it in my data
source view. But I would like to translate the result into different
languages, so that is not the best solution.

I need to create an attribute based on the value.

Any ideas?

Thanks

Henrik.



Reply With Quote
  #2  
Old   
Kevin Dente
 
Posts: n/a

Default Re: How to handle boolean field - 03-09-2006 , 12:33 PM






I posted almost the identical question a little while back (though I never
really got a workable suggestion). Here's what I came up with on my own.

1) If your database is SQL Server 2005 and you use the SQL Native client as
the provider, SSAS will automatically display bit fields as True and False.
Note that if you use the managed SqlClient provider, this doesn't work (I've
reported this as a bug). Of course, if you want Yes/No rather than
True/False, then this doesn't help.

2) The approach I ended up taking was to snowflake in a BoolValues table.
The table had columns BoolValue_key and BoolValueName - (0, No), and (1,
Yes). Then I joined the dimension table to the BoolValues table, and defined
an attribute with NameValue set to BoolValueName. Note that I ended up
converting the bit column to an int column (although that might not have
been necessary). Localizing the result just requires translating the
BoolValueNames for the two rows in the BoolValues table.




"Henrik Skak Pedersen" <skak (AT) community (DOT) nospam> wrote

Quote:
Hi,

I have a boolean field in my table which is represented by a bit data
type. I would like to show 0=No and 1=false. I know that I can solve it in
my data source view. But I would like to translate the result into
different languages, so that is not the best solution.

I need to create an attribute based on the value.

Any ideas?

Thanks

Henrik.




Reply With Quote
  #3  
Old   
Henrik Skak Pedersen
 
Posts: n/a

Default Re: How to handle boolean field - 03-09-2006 , 01:00 PM



Hi Kevin,

Thank you very much for your reply.

I think that I then have to go for option 2, because I have to run on 2000
too. Do you know how I translate values in a table?

Thanks

Henrik.

"Kevin Dente" <kevind (AT) no (DOT) spam.denteworld.com> wrote

Quote:
I posted almost the identical question a little while back (though I never
really got a workable suggestion). Here's what I came up with on my own.

1) If your database is SQL Server 2005 and you use the SQL Native client
as the provider, SSAS will automatically display bit fields as True and
False. Note that if you use the managed SqlClient provider, this doesn't
work (I've reported this as a bug). Of course, if you want Yes/No rather
than True/False, then this doesn't help.

2) The approach I ended up taking was to snowflake in a BoolValues table.
The table had columns BoolValue_key and BoolValueName - (0, No), and (1,
Yes). Then I joined the dimension table to the BoolValues table, and
defined an attribute with NameValue set to BoolValueName. Note that I
ended up converting the bit column to an int column (although that might
not have been necessary). Localizing the result just requires translating
the BoolValueNames for the two rows in the BoolValues table.




"Henrik Skak Pedersen" <skak (AT) community (DOT) nospam> wrote in message
news:OclPBV6QGHA.4952 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Hi,

I have a boolean field in my table which is represented by a bit data
type. I would like to show 0=No and 1=false. I know that I can solve it
in my data source view. But I would like to translate the result into
different languages, so that is not the best solution.

I need to create an attribute based on the value.

Any ideas?

Thanks

Henrik.






Reply With Quote
  #4  
Old   
Peter Yang [MSFT]
 
Posts: n/a

Default Re: How to handle boolean field - 03-10-2006 , 01:16 AM



Hello,

Based on my scope, it seems more appropriate to implement this localization
on client side other than server side.

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

================================================== ===

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
Quote:
From: "Henrik Skak Pedersen" <skak (AT) community (DOT) nospam
References: <OclPBV6QGHA.4952 (AT) TK2MSFTNGP09 (DOT) phx.gbl
#7kOYf6QGHA.5500 (AT) TK2MSFTNGP12 (DOT) phx.gbl
Subject: Re: How to handle boolean field
Date: Thu, 9 Mar 2006 20:00:46 +0100
Lines: 54
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Message-ID: <ubDTHv6QGHA.5908 (AT) TK2MSFTNGP14 (DOT) phx.gbl
Newsgroups: microsoft.public.sqlserver.olap
NNTP-Posting-Host: 80.63.142.94
Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.sqlserver.olap:67953
X-Tomcat-NG: microsoft.public.sqlserver.olap

Hi Kevin,

Thank you very much for your reply.

I think that I then have to go for option 2, because I have to run on 2000
too. Do you know how I translate values in a table?

Thanks

Henrik.

"Kevin Dente" <kevind (AT) no (DOT) spam.denteworld.com> wrote in message
news:%237kOYf6QGHA.5500 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
I posted almost the identical question a little while back (though I
never
really got a workable suggestion). Here's what I came up with on my own.

1) If your database is SQL Server 2005 and you use the SQL Native client
as the provider, SSAS will automatically display bit fields as True and
False. Note that if you use the managed SqlClient provider, this doesn't
work (I've reported this as a bug). Of course, if you want Yes/No rather
than True/False, then this doesn't help.

2) The approach I ended up taking was to snowflake in a BoolValues
table.
The table had columns BoolValue_key and BoolValueName - (0, No), and (1,
Yes). Then I joined the dimension table to the BoolValues table, and
defined an attribute with NameValue set to BoolValueName. Note that I
ended up converting the bit column to an int column (although that might
not have been necessary). Localizing the result just requires
translating
the BoolValueNames for the two rows in the BoolValues table.




"Henrik Skak Pedersen" <skak (AT) community (DOT) nospam> wrote in message
news:OclPBV6QGHA.4952 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Hi,

I have a boolean field in my table which is represented by a bit data
type. I would like to show 0=No and 1=false. I know that I can solve it
in my data source view. But I would like to translate the result into
different languages, so that is not the best solution.

I need to create an attribute based on the value.

Any ideas?

Thanks

Henrik.








Reply With Quote
  #5  
Old   
Kevin Dente
 
Posts: n/a

Default Re: How to handle boolean field - 03-10-2006 , 01:34 PM



By "translate" I meant insert rows with the translated form of
Yes/No/True/False/Whatever into the BoolValues table.

"Henrik Skak Pedersen" <skak (AT) community (DOT) nospam> wrote

Quote:
Hi Kevin,

Thank you very much for your reply.

I think that I then have to go for option 2, because I have to run on 2000
too. Do you know how I translate values in a table?

Thanks

Henrik.

"Kevin Dente" <kevind (AT) no (DOT) spam.denteworld.com> wrote in message
news:%237kOYf6QGHA.5500 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
I posted almost the identical question a little while back (though I never
really got a workable suggestion). Here's what I came up with on my own.

1) If your database is SQL Server 2005 and you use the SQL Native client
as the provider, SSAS will automatically display bit fields as True and
False. Note that if you use the managed SqlClient provider, this doesn't
work (I've reported this as a bug). Of course, if you want Yes/No rather
than True/False, then this doesn't help.

2) The approach I ended up taking was to snowflake in a BoolValues table.
The table had columns BoolValue_key and BoolValueName - (0, No), and (1,
Yes). Then I joined the dimension table to the BoolValues table, and
defined an attribute with NameValue set to BoolValueName. Note that I
ended up converting the bit column to an int column (although that might
not have been necessary). Localizing the result just requires translating
the BoolValueNames for the two rows in the BoolValues table.




"Henrik Skak Pedersen" <skak (AT) community (DOT) nospam> wrote in message
news:OclPBV6QGHA.4952 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Hi,

I have a boolean field in my table which is represented by a bit data
type. I would like to show 0=No and 1=false. I know that I can solve it
in my data source view. But I would like to translate the result into
different languages, so that is not the best solution.

I need to create an attribute based on the value.

Any ideas?

Thanks

Henrik.








Reply With Quote
  #6  
Old   
Kevin Dente
 
Posts: n/a

Default Re: How to handle boolean field - 03-10-2006 , 01:35 PM



Peter,
Interesting. Can you clarify? How would translate on the client-side when
using Excel pivot tables, for example?

Kevin

"Peter Yang [MSFT]" <petery (AT) online (DOT) microsoft.com> wrote

Quote:
Hello,

Based on my scope, it seems more appropriate to implement this
localization
on client side other than server side.

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

================================================== ===

This posting is provided "AS IS" with no warranties, and confers no
rights.


--------------------
From: "Henrik Skak Pedersen" <skak (AT) community (DOT) nospam
References: <OclPBV6QGHA.4952 (AT) TK2MSFTNGP09 (DOT) phx.gbl
#7kOYf6QGHA.5500 (AT) TK2MSFTNGP12 (DOT) phx.gbl
Subject: Re: How to handle boolean field
Date: Thu, 9 Mar 2006 20:00:46 +0100
Lines: 54
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Message-ID: <ubDTHv6QGHA.5908 (AT) TK2MSFTNGP14 (DOT) phx.gbl
Newsgroups: microsoft.public.sqlserver.olap
NNTP-Posting-Host: 80.63.142.94
Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.sqlserver.olap:67953
X-Tomcat-NG: microsoft.public.sqlserver.olap

Hi Kevin,

Thank you very much for your reply.

I think that I then have to go for option 2, because I have to run on 2000
too. Do you know how I translate values in a table?

Thanks

Henrik.

"Kevin Dente" <kevind (AT) no (DOT) spam.denteworld.com> wrote in message
news:%237kOYf6QGHA.5500 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
I posted almost the identical question a little while back (though I
never
really got a workable suggestion). Here's what I came up with on my own.

1) If your database is SQL Server 2005 and you use the SQL Native client
as the provider, SSAS will automatically display bit fields as True and
False. Note that if you use the managed SqlClient provider, this doesn't
work (I've reported this as a bug). Of course, if you want Yes/No rather
than True/False, then this doesn't help.

2) The approach I ended up taking was to snowflake in a BoolValues
table.
The table had columns BoolValue_key and BoolValueName - (0, No), and (1,
Yes). Then I joined the dimension table to the BoolValues table, and
defined an attribute with NameValue set to BoolValueName. Note that I
ended up converting the bit column to an int column (although that might
not have been necessary). Localizing the result just requires
translating
the BoolValueNames for the two rows in the BoolValues table.




"Henrik Skak Pedersen" <skak (AT) community (DOT) nospam> wrote in message
news:OclPBV6QGHA.4952 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Hi,

I have a boolean field in my table which is represented by a bit data
type. I would like to show 0=No and 1=false. I know that I can solve it
in my data source view. But I would like to translate the result into
different languages, so that is not the best solution.

I need to create an attribute based on the value.

Any ideas?

Thanks

Henrik.










Reply With Quote
  #7  
Old   
Peter Yang [MSFT]
 
Posts: n/a

Default Re: How to handle boolean field - 03-13-2006 , 01:31 AM



Hello Kevin,

When you use reporting service or other client control that using ADOMD or
ADOMD.net to fill, you possiblely could use code to show the 1/0 as
True/False with proper language.

Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

================================================== ===


This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
Quote:
From: "Kevin Dente" <kevind (AT) no (DOT) spam.denteworld.com
References: <OclPBV6QGHA.4952 (AT) TK2MSFTNGP09 (DOT) phx.gbl
#7kOYf6QGHA.5500 (AT) TK2MSFTNGP12 (DOT) phx.gbl
<ubDTHv6QGHA.5908 (AT) TK2MSFTNGP14 (DOT) phx.gbl>
<PUgcBKBRGHA.5524 (AT) TK2MSFTNGXA03 (DOT) phx.gbl>
Quote:
Subject: Re: How to handle boolean field
Date: Fri, 10 Mar 2006 11:35:02 -0800
Lines: 109
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-RFC2646: Format=Flowed; Original
Message-ID: <ux1ohmHRGHA.6084 (AT) TK2MSFTNGP14 (DOT) phx.gbl
Newsgroups: microsoft.public.sqlserver.olap
NNTP-Posting-Host: gw01.viewstar.com 63.206.72.126
Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.sqlserver.olap:67996
X-Tomcat-NG: microsoft.public.sqlserver.olap

Peter,
Interesting. Can you clarify? How would translate on the client-side when
using Excel pivot tables, for example?

Kevin

"Peter Yang [MSFT]" <petery (AT) online (DOT) microsoft.com> wrote in message
news:PUgcBKBRGHA.5524 (AT) TK2MSFTNGXA03 (DOT) phx.gbl...
Hello,

Based on my scope, it seems more appropriate to implement this
localization
on client side other than server side.

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

================================================== ===

This posting is provided "AS IS" with no warranties, and confers no
rights.


--------------------
From: "Henrik Skak Pedersen" <skak (AT) community (DOT) nospam
References: <OclPBV6QGHA.4952 (AT) TK2MSFTNGP09 (DOT) phx.gbl
#7kOYf6QGHA.5500 (AT) TK2MSFTNGP12 (DOT) phx.gbl
Subject: Re: How to handle boolean field
Date: Thu, 9 Mar 2006 20:00:46 +0100
Lines: 54
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Message-ID: <ubDTHv6QGHA.5908 (AT) TK2MSFTNGP14 (DOT) phx.gbl
Newsgroups: microsoft.public.sqlserver.olap
NNTP-Posting-Host: 80.63.142.94
Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.sqlserver.olap:67953
X-Tomcat-NG: microsoft.public.sqlserver.olap

Hi Kevin,

Thank you very much for your reply.

I think that I then have to go for option 2, because I have to run on
2000
too. Do you know how I translate values in a table?

Thanks

Henrik.

"Kevin Dente" <kevind (AT) no (DOT) spam.denteworld.com> wrote in message
news:%237kOYf6QGHA.5500 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
I posted almost the identical question a little while back (though I
never
really got a workable suggestion). Here's what I came up with on my own.

1) If your database is SQL Server 2005 and you use the SQL Native
client
as the provider, SSAS will automatically display bit fields as True and
False. Note that if you use the managed SqlClient provider, this
doesn't
work (I've reported this as a bug). Of course, if you want Yes/No
rather
than True/False, then this doesn't help.

2) The approach I ended up taking was to snowflake in a BoolValues
table.
The table had columns BoolValue_key and BoolValueName - (0, No), and
(1,
Yes). Then I joined the dimension table to the BoolValues table, and
defined an attribute with NameValue set to BoolValueName. Note that I
ended up converting the bit column to an int column (although that
might
not have been necessary). Localizing the result just requires
translating
the BoolValueNames for the two rows in the BoolValues table.




"Henrik Skak Pedersen" <skak (AT) community (DOT) nospam> wrote in message
news:OclPBV6QGHA.4952 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Hi,

I have a boolean field in my table which is represented by a bit data
type. I would like to show 0=No and 1=false. I know that I can solve
it
in my data source view. But I would like to translate the result into
different languages, so that is not the best solution.

I need to create an attribute based on the value.

Any ideas?

Thanks

Henrik.












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.