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 pass parameter to SQL?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
How to pass parameter to SQL?
 Login/Join
 
<iamvijay>
posted
Hi,
i've written this code in a procedure (i didn't create report),
actually i want to give a date condition based on user data, based on that conditional result, i need to create report. can anybody help in this?
(i want where condition in this select statement)

SQL
Select Ename, Job, HireDate, Sal, Comm From Emp;
END

thanq

vijay

Confused
 
Report This Post
<Satish Paladugu>
posted
Vijay,
Different databases have different date formats. Here is the example for Oracle.

Select Ename, Job, HireDate, Sal, Comm From Emp where HireDate = '01-OCT-2003';

Does this answer your question?

Thanks and Regards
Satish Paladugu
 
Report This Post
<iamvijay>
posted
Hi Satish,
Thanq very much for ur reply,

I know this, but i wanted to check for the date entered by the user, something like this

Select Ename, Job, HireDate, Sal, Comm From Emp where HireDate = '&UserDate';

And i wanted to use this result in a different report, can u plz help me out, i'm totally confused,

thanx n regards

vijay
 
Report This Post
<Vijay Kodali>
posted
Vijay,

You can directly write a SQL query in your fex file and you can hold/save the output from that query in a holdfile. You can use some thing like this if you are using ORACLE:

SQL SQLORA SET SERVER servername

SQL SQLORA

Select Ename, Job, HireDate, Sal, Comm From Emp where HireDate = '&UserDate';

TABLE
ON TABLE HOLD AS holdfile
END

TABLE FILE holdfile
PRINT Ename Job HireDate Sal Comm
END

I hope this work for you!

Thanks,
Vijay
 
Report This Post
<iamvijay>
posted
Thanx for the reply,

Select statement is working properly, but if i give where condition, like,

SELECT EMPNO, ENAME, HIREDATE, JOB FROM EMP WHERE HIREDATE = '&USERDATE';

it is not prompting for the parameter value and even if i open it in resource layout, it's not showing any textbox object.

can u plz. tell me what i've to do?

vijay

Confused
 
Report 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 pass parameter to SQL?

Copyright © 1996-2020 Information Builders