select - insert query
From: Vijay Nayak (VijayNayak_at_discussions.microsoft.com)
Date: Fri, 8 Oct 2004 04:37:03 -0700
Look at the query:
SELE * from slbacbr ;
where ( SLBEFFFM >= m.onavdt and ;
( slbeffto <= m.onavdt OR EMPTY(slbeffto))) ;
and ( m.rslacs betw slbfrom AND slbto) ;
and SLBUPFRT > 0 ;
and allt( FUT_SCH) == trim( _schemecod) ;
and fundcd = _fundcd ;
orde by slbtype ;
into curs slbcurs1
Now, the current work area is SLBCURS1.
A scan starts which contains in sql - inserts which is as follows:
INSE into brokproc ( PASHOLD, navdate, BALNAVDT, redmdays, OSUNITS, ;
fundcd, SCHEME_COD, TYPECD, OPTIONCD, SCHEME_NAM, fut_sch, ;
slbtype) valu ;
( MSLB1YRFQ, CONTACBR.nav_date, CONTACBR.BALNAVDT, 1, CONTACBR.OSUNITS,
_fundcd, _schemecod, schACBR.fundtyp, schACBR.FUNDOPT, CONTACBR.SCHEME_NAM,
My Question is that
1) The way insert is written is correct ?
The portion of the query after the 'value' clause contains refrence to
tables which will be open in other work areas. Two fields in the inserted
table are being updated from the value of fields in the cursor SLBCURS1
created by sql - select. Does this stand correct ?
2) The table 'BROKPROC', which is the inserted table, will be updated with
what values ?
3) I get an error message 'File is in use'. The main error point isn't
being pin pointed. Is there any possiblity that due to the usage of sql -
select and sql - insert mentioned above the error 'File is in use' is likely.
I request valuable tips. Thanks,