Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] SQL Server Bit format data type

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] SQL Server Bit format data type
 Login/Join
 
Member
posted
Hello,

I have SQL Server database columns that are defined as a BIT data type. These have values of either 0 or 1 stored in the database, which appear as such when doing a query in SQL Server Management Studio (SSMS). WebFOCUS, however, displays these as either 0 or -1. I have found a reference to this at iDM displays wrong value for SQLMSS 2008 BIT Data Type but from this "Solution" I take it that this was done by design.

My question is: How do you overcome the difference between what is "displayed" and what the actual value is? If I try to use a filter to limit the records to the -1 that is displayed, it does not find the records, because in the database the value is really 1. I CAN set up my filter to select records where that column is not equal to 0. This is just very non-intuitive and it seems there should be a better solution. Other than making defined fields for all of these, is there any other way to deal with these?

Thanks,
Chris

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8.1.03
Excel, PDF, HTML, Active Reports
 
Posts: 13 | Registered: February 23, 2014Report This Post
Master
posted Hide Post
Chris,

Are you using SQL pass thru or Master file?

If its SQL pass thru, then your filter for 1 should work fine.

Thanks,
Ram
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Member
posted Hide Post
I am using a master file. What is the best approach for this?

Thanks,
Chris


WebFOCUS 8.1.03
Excel, PDF, HTML, Active Reports
 
Posts: 13 | Registered: February 23, 2014Report This Post
Expert
posted Hide Post
That "Troubleshooting" page posts no solution in the "Solution" section. I would open a case.

Meanwhile, perhaps you can modify the Master and add a DEFINE column, reference the DEFINE column in your fexes:

DEFINE BIT_COL_DEF/I1 = IF BIT_COL EQ -1 THEN 1 ELSE BIT_COL;


Unfortunately, this *may* effect performance when filtering on the DEFINE column, but give it a try.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Change the format of the BIT field to ...USAGE=A5,ACTUAL=A5...

Then you can use True or False as screening conditions.
WHERE BITFIELD EQ 'True'
or
WHERE BITFIELD EQ 'False'

False is 0, True is non-zero.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Member
posted Hide Post
Changing usage/actual to A5 works well, and seems more straightforward than creating defined fields. Thanks for your help.

Chris


WebFOCUS 8.1.03
Excel, PDF, HTML, Active Reports
 
Posts: 13 | Registered: February 23, 2014Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] SQL Server Bit format data type

Copyright © 1996-2020 Information Builders