Re: (2005) data transfare
I would recommend checking that your SQL statement is valid by running it in the database tools - I found at least one obvious typo (in a table name), and more that looked dubious.
Here is an altered version (I'm not sure if the Join syntax is valid for Oracle, so you may need to change that back):
Code:
SELECT P.FIRST_NAME,
A.CUST_AC_NO,
A.ADDRESS1,
A.ADDRESS2,
A.ADDRESS3,
A.ADDRESS4,
P.TELEPHONE,
P.LAST_NAME,
P.FAX,
C.COUNTRY,
P.E_MAIL
FROM STTM_CUST_ACCOUNT A
INNER JOIN STTM_CUSTOMER C ON (A.CUST_NO = C.CUSTOMER_NO)
INNER JOIN STTM_CUST_PERSONAL P ON (C.CUSTOMER_NO = P.CUSTOMER_NO)
WHERE C.FROZEN = 'N'
AND C.DECEASED = 'N'
AND C.WHEREABOUTS_UNKOWN = 'N'
edit: I also doubt that your INSERT is valid, but we'll come to that later.
Re: (2005) data transfare
that was excellent it works nomore errors and now can you help on the insert statement
Re: (2005) data transfare
A major issue is your use of gerry1 for getting the values - you cannot simply put a variable name into a string and expect it to use the value, you need to append the value to the string instead, eg:
Code:
.. VALUES ('" & gerry1.FIRST_NAME & "', '" & gerry1.LAST_NAME ...
(note that as I don't use .Net, this may need minor changes)
This is assuming that the fields are text/string, if they are numeric data types then do not use the ' characters around the values.
Note that a simpler (and more efficient) method in cases like this is to merge the two SQL statements.. simply use the first half of the Insert (everything before '[i]Values[i]'), followed by the Select statement.