Home » Developer & Programmer » Forms » How to create formula column in sql statment
How to create formula column in sql statment [message #611396] Wed, 02 April 2014 03:26 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi all,

How to create formula column in sql statment.

(SELECT SUM(t.ar_amount - t.cr_amount) 
 FROM   xxc_transactions_view t 
 WHERE  t.trx_type IN ( 'CR', 'DR' ) 
        AND t.customer_no = :account_no -- where (:account_no) is a char column in a non-database block    
        AND t.trx_date BETWEEN '01-03-2014' AND '31-03-2014'); 
Re: How to create formula column in sql statment [message #611401 is a reply to message #611396] Wed, 02 April 2014 04:15 Go to previous messageGo to next message
cookiemonster
Messages: 13915
Registered: September 2008
Location: Rainy Manchester
Senior Member
You don't.
Formula column is an oracle reports thing.
You need to explain in more details what you are trying to do.
Re: How to create formula column in sql statment [message #611403 is a reply to message #611401] Wed, 02 April 2014 04:27 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Quote:
You need to explain in more details what you are trying to do.


This is not possible right? Then ok fine.
Re: How to create formula column in sql statment [message #611405 is a reply to message #611403] Wed, 02 April 2014 04:29 Go to previous messageGo to next message
Littlefoot
Messages: 21805
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It depends. It is difficult to suggest anything as we don't understand what you are doing.
Re: How to create formula column in sql statment [message #611406 is a reply to message #611405] Wed, 02 April 2014 04:32 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Quote:
It depends. It is difficult to suggest anything as we don't understand what you are doing.


I google up about formula column use post-query , but how can i write in the post-query.

Please help me.
Re: How to create formula column in sql statment [message #611409 is a reply to message #611406] Wed, 02 April 2014 04:49 Go to previous messageGo to next message
cookiemonster
Messages: 13915
Registered: September 2008
Location: Rainy Manchester
Senior Member
As I already said a formula column is an oracle reports thing.
So you need to describe what you are trying to do without referring to the thing you can not use (formula column).
Re: How to create formula column in sql statment [message #611412 is a reply to message #611409] Wed, 02 April 2014 05:02 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
cookiemonster wrote on Wed, 02 April 2014 18:49
As I already said a formula column is an oracle reports thing.
So you need to describe what you are trying to do without referring to the thing you can not use (formula column).


i need to build a formula column based on the select statement

my team leader told me to create a function with the select statement then call it from the formula column

but please give me an example of this

thanks
Re: How to create formula column in sql statment [message #611416 is a reply to message #611412] Wed, 02 April 2014 05:26 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
can you please help me its urgent
Re: How to create formula column in sql statment [message #611486 is a reply to message #611416] Thu, 03 April 2014 01:07 Go to previous messageGo to next message
Littlefoot
Messages: 21805
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
mist598

my team leader told me to create a function with the select statement then call it from the formula column


Two parts of the question: first, create a function. Do it in SQL*Plus by utilizing the CREATE (OR REPLACE) FUNCTION. Second, call that function from the formula column. As you were told, formula columns belong to Reports, not Forms. So, in your report, create a formula column and call previously created function.
Re: How to create formula column in sql statment [message #611491 is a reply to message #611486] Thu, 03 April 2014 01:21 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Quote:

Two parts of the question: first, create a function. Do it in SQL*Plus by utilizing the CREATE (OR REPLACE) FUNCTION. Second, call that function from the formula column. As you were told, formula columns belong to Reports, not Forms. So, in your report, create a formula column and call previously created function.


Ok Thank you & let me try catch you later.... Smile
Re: How to create formula column in sql statment [message #611584 is a reply to message #611491] Fri, 04 April 2014 00:37 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi all,

i have a problem with LOV it take time to open there is above 50000 records in a table how i can reduce time to open LOV

Can you please help me? I am very thankful to you..

Thank You
Re: How to create formula column in sql statment [message #611594 is a reply to message #611584] Fri, 04 April 2014 02:28 Go to previous message
cookiemonster
Messages: 13915
Registered: September 2008
Location: Rainy Manchester
Senior Member
How long does the LOV query take to run in sqlplus?
Previous Topic: FRM-92052: fatal error: cannot connect to the server at URL %s
Next Topic: Sundays with date
Goto Forum:
  


Current Time: Tue Mar 19 03:45:43 CDT 2024