select - insert query

From: Vijay Nayak (VijayNayak_at_discussions.microsoft.com)
Date: 10/08/04


Date: Fri, 8 Oct 2004 04:37:03 -0700

Hello friends,

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,
slbcurs1.fut_sch, ;
slbcurs1.slbtype)

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,

Vijay Nayak.



Relevant Pages

  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)
  • Re: Populating a list -- table structure?
    ... I had made a report already and figured out about adding the ... your responce below, but thanks to your help with SQL, I was able to get the ... It takes a summary from a select query and gives the ... KitID, long integer ...
    (microsoft.public.access.forms)
  • How do I do Paging through a large dataset via Stored Procedures
    ... Paging by dynamically altering the SQL Query ... Create stored procedures ... SELECT * FROM STUDENTS ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Populating a list -- table structure?
    ... I don't mean to skip your responce below, but thanks to your help with SQL, I was able to get the query to pull the info the way I needed. ... I have one report complete, ... Queries (just shows the QBE grid for convenience -- ...
    (microsoft.public.access.forms)
  • Re: Populating a list -- learning Access
    ... It is kinda funny -- I started using databases in the early 80's with dBase and, for years, never knew that I knew SQL! ... If you are on a form or report, the most important property is the NAME, because that is how you refer to it in code. ... I don't mean to skip your responce below, but thanks to your help with SQL, I was able to get the query to pull the info the way I needed. ... Queries (just shows the QBE grid for convenience -- ...
    (microsoft.public.access.forms)