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]embed quotes in variable

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[solved]embed quotes in variable
 Login/Join
 
Member
posted
I hope this isn't a stupid question.

I use sql passthrough to retrive my report values. I want to create a variable to use in my sql passthrough that requires embedded quotes. How do I get the quotes in the variable? (This will be a hard coded value and not supplied by the user. I plan to create another file to store these values in one place instead of putting them directly into the sql)

-SET &VARIABLE_NAME = ('111111111', '222222222', '333333333');

This will be used as

select column_value
from table_name
where id in '&variable_name';

This message has been edited. Last edited by: HCP,


Webfocus 7.7.2
Windows, HTML, PDF, and Excel
 
Posts: 18 | Registered: February 23, 2011Report This Post
Expert
posted Hide Post
Two quotes = One.

-SET &VARIABLE_NAME = '(''111111111'', ''222222222'', ''333333333'')' ;


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Thanks... that got the quotes to work, but then I got a message about missing end paren's. So I tweaked the variable a bit to get it to work with sql pass through. End result that worked is:

-* use single quote at beginning and end, all others used two quotes
-SET &CLS_ABA_NUMBERS = '111111111'', ''222222222'', ''333333333';

-*added paren's in sql pass through
select column_value
from table_name
where id in ('&variable_name');

Thanks for your help!


Webfocus 7.7.2
Windows, HTML, PDF, and Excel
 
Posts: 18 | Registered: February 23, 2011Report This Post
Master
posted Hide Post
doesn't 7.7.x have a .QUOTEDSTRING operator or something similar? I thought I heard Walter Blood talk about it at out last User Forum.

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Gold member
posted Hide Post
Here is an exmaple of what we use :

-DEFAULT &AFF='''A'' OR ''B'' OR ''C''';
-SET &L = &AFF.LENGTH ;
-SET &F = 'A' | &L ;
-SET &AFF2 = '(' | STRREP(&L, &AFF, 4,' OR ',2,', ',&L,'&F.EVAL') || ')';

and in the where clause of the select
WHERE B.AFF_CODE IN &AFF2

Hope this will help you.
Catherine


7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010
 
Posts: 68 | Location: France | Registered: February 27, 2008Report 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]embed quotes in variable

Copyright © 1996-2020 Information Builders