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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
SQL Bit
 Login/Join
 
Member
posted
I have a SQL table that has a column with a format of BIT. When I query the column in WebFOCUS the value comes back with a -1 (in sql it comes back as 1). Based on the advise of the IBI site, I used the "ABS" rountine to correct this. Although, with this method I would have to define this all the time. I could add a DEFINE to the master, but does anyone know of a work-around, for the Metadata?
 
Posts: 9 | Registered: October 24, 2006Report This Post
Virtuoso
posted Hide Post
You might let this value as is.
The other value is 0 so the meaning will probably be true and false.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
Hi gkata,

This is a known issue: Reading BIT data types from a SQL Server Database

To correct the metadata/synonym, you can create a define field with the ABS subroutine in your master file. Unfortunately, currently the ABS subroutine is the only workaround.

Hope this helps. Smiler

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
Expert
posted Hide Post
I like amsterdam's suggestion
Since the value is a boolean, your fexes will work whether the value is -1 or 1
DEFINE FILE CAR
TEMP/I2 WITH CAR=IF COUNTRY IS 'ENGLAND' THEN -1 ELSE 0;
TESTYES/A3 = IF TEMP THEN 'YES' ELSE ' ';
TESTNO/A3=IF NOT TEMP THEN 'NOT' ELSE ' ';
END
TABLE FILE CAR
PRINT TEMP TESTYES TESTNO
END
...
if this doesn't work for you, and you don't want to use ABS , you could always square the variable ... but amsterdam's answer really makes the most sense, imho.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders