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] SQL PassThru Parms

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Closed] SQL PassThru Parms
 Login/Join
 
Gold member
posted
I'm trying to pass some parms into my sql passthru for a standard report, The column in question is alpha numeric (plant number) if I put '6' in the parm it works just fine but if I put 6 then I get an error invalid number.
Know do a put quotes around my parms?

code follows

APP PATH MFGVIS
ENGINE SQLORA SET DEFAULT_CONNECTION mfgvis
SQL SQLORA PREPARE SQLOUT FOR
with
cal as (
select to_date('01/01/1900','mm/dd/yyyy') as end_paywk from dual
union
(select end_paywk from
(select distinct c.end_paywk as end_paywk from visuser.PCC_CALENDAR C
where c.calendar_date >= trunc(sysdate-150)
order by c.end_paywk
)
where rownum < &Enter_No_Of_Wks)
),
part as (
select e.en_part_id , pep.yield_6_month_n as yield_n
from visuser.en_part e, visuser.commodity c, visuser.pcc_en_part pep
where e.commodity_id = c.commodity_id
and (c.commodity_x between '100' and '199' or substr(c.commodity_x,1,1) =6)
and e.en_part_id = pep.en_part_id (+)
and pep.plant_c = &Enter_Plant_No
),

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


WebFOCUS 7.7.1
Windows 2000
Output: Excel and PDF
 
Posts: 82 | Registered: October 04, 2007Report This Post
Expert
posted Hide Post
substr(c.commodity_x,1,1) =6

You can't compare a substring to a number.


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
Guru
posted Hide Post
If the column is alphanumeric then you need the quotes as you saw. Just because it is a numeral in the field, you can't leave them off.


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
 
Posts: 391 | Location: California | Registered: April 14, 2003Report This Post
Gold member
posted Hide Post
How and where do I close this?


WebFOCUS 7.7.1
Windows 2000
Output: Excel and PDF
 
Posts: 82 | Registered: October 04, 2007Report This Post
Master
posted Hide Post
just edit the original post to prepend [CLOSED] in the subject line.


------------------------------------
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
  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] SQL PassThru Parms

Copyright © 1996-2020 Information Builders