If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Convert sql into informix..

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Nov 2012
Posts: 8
Convert sql into informix..

Hi .....
I want to convert below sql stored procedure in to IBM Informix.Can you help me?
DELIMITER $$

DROP PROCEDURE IF EXISTS `pay_details` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `pay_details`( in start_date date,in end_date date)
begin
SELECT SUBSTRING(i002_number,-16,6) AS bin,
SUM(CASE WHEN orig_msg_type ='DBINT'
THEN i004_amt_trxn ELSE NULL END) AS Debit_Intrest,
SUM(CASE WHEN orig_msg_type ='PAYMT'
THEN i004_amt_trxn ELSE NULL END) AS Payments
FROM ctransactions
WHERE posteddate
BETWEEN start_date AND end_date GROUP BY bin;
end $$

DELIMITER ;

Thanx!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On