[Zope] Zope DTML zSQL Select from Oracle insert into MS Access
Support Faults
support.faults@b-online.com.au
Mon, 07 Jul 2003 14:35:44 +0800
Hi,
I've been trying (rather unsuccessfully I might add) to select some
data from an oracle table, and insert it into another MS Access table.
I'm trying to do this via a dtml method and a couple of zSQL queries.
Has anyone here found a good way of achieving this?
I've been trying many variants...
this is my latest...
TheForm
<form name='form1' action='meth_step'>
<tr>
<td>Start Date</td>
<td><input type='text' name='start_date'></input>
<td>End Date <input type='text' name='end_date'></input>
<input type='submit' name='Go'></input></td>
</form>
Oracle Select
select
H.mobile_no as mobile_number,
H.DEALER_NO as dealer_code,
SCD.ENTRY_DATE as date_added
from
jan.sc_detail SCD,
jan.handset H
where
SCD.handset_code = H.code and
SCD.comments = 'SERVICE ADDED' and
SCD.ENTRY_DATE > ('<dtml-var start_date>') and
SCD.ENTRY_DATE < ('<dtml-var end_date>') and
(H.status = 'A' or H.status = 'B') and
(H.DEALER_NO NOT BETWEEN '0000' and '0004')
Dtml method ('meth_step')
<!--#with sql -->
<!--#call insert_all_connects -->
<!--#/with -->
MS Access Insert
INSERT into mConnectList
(
dealer_code,
mobile_number,
date_added
)
values
( <!--#call select_all_connects -->
)
Thanks
Julian.