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     [CLOSED] problem with passing multiple values to a variable

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] problem with passing multiple values to a variable
 Login/Join
 
Member
posted
i have a problem with passing multiple values to a variable.
Here is the code

-SET &PW1='''' | 'test1.net' | ''',''' |'test2.net' | '''';


here is the error message i am getting :

ALL
'test1.net','test2.net'
ADRPTHTML
OTHSYSsms
(FOC1400) SQLCODE IS 102 (HEX: 00000066) XOPEN: 42000
: Microsoft OLE DB Provider for SQL Server: [42000] Incorrect syntax near
: 'test1'. [42000] Statement(s) could not be prepared. [] Deferred prepar
: e could not be completed.
L (FOC1405) SQL PREPARE ERROR.
(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: SQLOUT
BYPASSING TO END OF COMMAND
------------------------------------------------

I am thinking this happening becuase of the '.' inthe value of the variable.
I dont know how to avoid. I spent couple of hours on this , i did not found any solution.
Help is appreciated.

thanks
Rekha

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


WebFocus 7.6.4
windows XP
MS SQL 2000/2005
 
Posts: 13 | Registered: August 28, 2008Report This Post
Expert
posted Hide Post
quote:
ALL
'test1.net','test2.net'
ADRPTHTML
OTHSYSsms

What is this part of? A SQL passthru SELECT statement? What are test1.net and test2.net, column names?


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
Member
posted Hide Post
THIS IS THE PART OF THE sql QUERY THAT NEEDS TO BE PREPARED
THE VALUES 'TEST1.NET' AND 'TEST2.NET' WILL BE PASSED TO THE COLUMN DOMAIN THE TABLE LIKE THIS--

WHERE DOMAIN IN('TEST1.NET','TEST2.NET')


WebFocus 7.6.4
windows XP
MS SQL 2000/2005
 
Posts: 13 | Registered: August 28, 2008Report This Post
Expert
posted Hide Post
You need to provide more of the SQL statement for us to see how your values are embedded in it.


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
So my understanding is: you have a list of constant values you want to pass to an SQL "IN" structure to be probed against a table column. Is that correct?

You may use the sample code below which uses the CAR table:
-SET &PW1='''JAPAN'',''ENGLAND''';
SQL
select country, car, model, bodytype, seats
  from car
where country in (&PW1)
order by country, car
;
END


Cheers!



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
My sample above assumed you were using SQL passthru to get your data. If you are using a straight TABLE FILE command however, your condition should be adjusted a bit since you will be using a structure like
 WHILE column EQ val1 OR val2 [OR ...] 
which gets automagically translated to an IN structure when resolved into SQL.

-SET &PW1='''JAPAN'' OR ''ENGLAND''';
TABLE FILE CAR
PRINT MODEL
      BODYTYPE
      SEATS
BY COUNTRY
BY CAR
WHERE COUNTRY EQ &PW1
END


Hope that helps.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 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     [CLOSED] problem with passing multiple values to a variable

Copyright © 1996-2020 Information Builders