0% found this document useful (0 votes)
3 views1 page

SQL Transactions for SVC Product IS023

The document contains SQL queries related to transactions in a database. It includes a count of records based on specific criteria, a deletion of a record, and an insertion of new transaction records into the 'mfx_inv_trans' table. The operations are focused on a specific issuer code and transaction number.

Uploaded by

Adarsh pandey
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

SQL Transactions for SVC Product IS023

The document contains SQL queries related to transactions in a database. It includes a count of records based on specific criteria, a deletion of a record, and an insertion of new transaction records into the 'mfx_inv_trans' table. The operations are focused on a specific issuer code and transaction number.

Uploaded by

Adarsh pandey
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

select count(*) from mfx_inv_trans where prod_code = 'SVC' and upper(issuer_code)

= upper('IS023') and curr_code = 'MCY' and not(( (To_Number('000000148734') <


To_Number(srno_from)) AND (To_Number('000000148734') < To_Number(srno_from)) ) or
((To_Number('000000148734') > (qty + srno_from - 1) ) and
( To_Number('000000148734') > (qty + srno_from - 1) ))) --> record found

Delete From Mfx_Inv_Batch_Card_Mapping


WHERE issuer_code='IS023' AND docket_no='000000148734' ---> record found

Select * From Mfx_Inv_Outstand


where srno_from = '000000148734' --> null

REM INSERTING into mfx_inv_trans


SET DEFINE OFF;
Insert into "mfx_inv_trans"
(TRANS_TYPE_CODE,TRANS_NO,PROD_CODE,ISSUER_CODE,SERIES,CURR_CODE,DENOMINATION,QTY,S
RNO_FROM,SRNO_TO,CUSTODIAN,JOINT_CUSTODIAN,STOCK_STATUS,AUTH_STATUS,ISSUED_TO,BRANC
H_CODE,CUSTOMER_CODE,TRANS_DATE,USER_NAME,COMMENTS,ISBLANKSTOCK,ACCT_STATUS,ISDESTR
OYED,MAKER,CHECKER) values
('VOID','F128800286122725','SVC','IS023',null,'MCY',0,1,'000000148734','00000014873
4','5893','7836','OUT','NV',null,'1288','1288',to_date('05-DEC-25','DD-MON-
RR'),'5893','s','N','NP','D','5893',null);
Insert into "mfx_inv_trans"
(TRANS_TYPE_CODE,TRANS_NO,PROD_CODE,ISSUER_CODE,SERIES,CURR_CODE,DENOMINATION,QTY,S
RNO_FROM,SRNO_TO,CUSTODIAN,JOINT_CUSTODIAN,STOCK_STATUS,AUTH_STATUS,ISSUED_TO,BRANC
H_CODE,CUSTOMER_CODE,TRANS_DATE,USER_NAME,COMMENTS,ISBLANKSTOCK,ACCT_STATUS,ISDESTR
OYED,MAKER,CHECKER) values
('STOCKOUT','F128800286043025','SVC','IS023',null,'MCY',0,1,'000000148734','0000001
48734','7836','7836','IN','V',null,'1288','1288',to_date('20-NOV-25','DD-MON-
RR'),'7836',null,'N','NP',null,null,null);

You might also like