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     HOW TO OVERLOOK NULL AND COMMA

Read-Only Read-Only Topic
Go
Search
Notify
Tools
HOW TO OVERLOOK NULL AND COMMA
 Login/Join
 
Silver Member
posted
SQL DB2 SET SERVER SAMPLE
SQL DB2
-SET &BY1 = IF &SORT1 EQ '' THEN ''' ''' ELSE IF &SORT1 EQ 'CARBRAND' THEN 'CARBRAND , CARNAME ' ELSE IF &SORT1 EQ 'CARMODEL' THEN 'CARMODEL , CARNAME' ELSE &SORT1;
SELECT * FROM CAR
ORDER BY &BY1;
TABLE FILE SQLOUT
PRINT
&BY1
CARTYPE
END
THIS IS THE SAMPLE QUERY I AM USING IN MY REPORT WHERE I AM DOING THE SORTING AT THE SQL SIDE AND THEN PASSING THE VALUES TO THE WEBFOCUS SIDEFOR THE OUTPUT.
1)THE PROBLEM IS WHEN I AM GIVING THE VALUE FOR &SORT1 AS NULL THEN IT IS DISPLAYING ONLY CARTYPE BUT ALSO GIVING ME AN ADDITIONAL COLUMN TABPAGENO IS THERE ANY WAY TO AVOID IT FROM PRINTING THE ADDITIONAL COLUMN THAT IS TABPAGENO WHEN I GIVE &SORT1 AS NULL.
2) WHEN I AM GIVING THE VALUE FOR &SORT1 AS CARBRAND THEN I AM GETTING THE OUTPUT ERROR AS
UNRECOGNISED COLUMN :,
TABLE FILE SQLOUT
PRINT
CARBRAND , CARNAME
CARTYPE
END
IS THERE ANY WAY TO OVERLOOK THE COMMA IN WEBFOCUS OR REPLACE THE COMMA WITH SPACE. AND ALSO IS THERE ANY OTHER EASY METHOD OF SORTING THE DATA AT DATABASE SIDE AND DISPLAYING IT IN THE WEBFOCUS SIDE.
THANKS FOR UR TIME AND UR SUGGESTIONS ARE HIGHLY APPRECIATED
THANKS
URSMADDY
 
Posts: 31 | Registered: April 07, 2005Report This Post
Platinum Member
posted Hide Post
Turn nulls into blank. Remove the commas.


SQL DB2 SET SERVER SAMPLE
SQL DB2
-SET &BY1 = IF &SORT1 EQ '' THEN ' ' ELSE IF &SORT1 EQ 'CARBRAND' THEN 'CARBRAND CARNAME ' ELSE IF &SORT1 EQ 'CARMODEL' THEN 'CARMODEL CARNAME' ELSE &SORT1;
SELECT * FROM CAR
ORDER BY &BY1;
TABLE FILE SQLOUT
PRINT
&BY1
CARTYPE
END
 
Posts: 135 | Location: Portland, OR | Registered: March 23, 2005Report This Post
Silver Member
posted Hide Post
THANKS DWF,
I TRIED UR SOLUTION BUT THEN ITS GIVING ME ERROR AT THE ORDER BY CLAUSE BECOZ ORDERBY FIELDNAMES SHOULD BE SEPERATED BY COMMAS AND IF I KEEP COMMAS THEN ITS WORKING FINE AT THE SQL SIDE BUT GIVING ME ERROR AT THE WEBFOCUS SIDE
THANKS
MADDY
 
Posts: 31 | Registered: April 07, 2005Report This Post
Platinum Member
posted Hide Post
Sorry, Maddy. Seems I forgot to pack a brain today. Maybe something like this:


SQL DB2 SET SERVER SAMPLE
SQL DB2

-SET &BY1 = IF &SORT1 EQ '' THEN ''' ''' ELSE IF &SORT1 EQ 'CARBRAND' THEN 'CARBRAND , CARNAME ' ELSE IF &SORT1 EQ 'CARMODEL' THEN 'CARMODEL , CARNAME' ELSE &SORT1;

-SET &BY2 = IF &SORT1 EQ '' THEN ' ' ELSE IF &SORT1 EQ 'CARBRAND' THEN 'BY CARBRAND BY CARNAME ' ELSE IF &SORT1 EQ 'CARMODEL' THEN 'BY CARMODEL BY CARNAME' ELSE &SORT1;


SELECT * FROM CAR
ORDER BY &BY1;
TABLE FILE SQLOUT
PRINT
&BY2
CARTYPE
END
 
Posts: 135 | Location: Portland, OR | Registered: March 23, 2005Report This Post
Silver Member
posted Hide Post
THANKS DWF
ITS WORKING NOW
THANKS FOR UR HELP
MADDY
 
Posts: 31 | Registered: April 07, 2005Report 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     HOW TO OVERLOOK NULL AND COMMA

Copyright © 1996-2020 Information Builders