473,320 Members | 2,000 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

IMPORT with METHOD N

Hi!

Let's say I have a table TABLE 1:
CREATE TABLE TABLE1
(
TAB1_ID BIGINT,
TAB1_NAME VARCHAR(100)
)

which has 10 columns in and from which I do an EXPORT like:
EXPORT TO TABLE1.IXF OF IXF SELECT * FROM TABLE1

Then I have a table TABLE2:
CREATE TABLE TABLE2
(
TAB2_NAME VARCHAR(100)
)

into which I'd like to import TABLE1.IXF, but only TAB1_NAME:
IMPORT FROM TABLE1.IXF OF IXF METHOD N(TAB1_ID, TAB1_NAME) INSERT INTO
TABLE2(TAB2_NAME)

This commands does import all 10 rows, but the values are NULL and there are
no warnings or errors.
Is this supposed to work like this ?

Best regards,
Kovi
--
____________________________
|http://kovica.blogspot.com|
-----------------------------~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Sep 4 '07 #1
1 6059
On Tue, 04 Sep 2007 13:10:12 +0200, Gregor KovaĨ scribbled:
Let's say I have a table TABLE 1:
CREATE TABLE TABLE1
(
TAB1_ID BIGINT,
TAB1_NAME VARCHAR(100)
)

which has 10 columns in and from which I do an EXPORT like: EXPORT TO
TABLE1.IXF OF IXF SELECT * FROM TABLE1

Then I have a table TABLE2:
CREATE TABLE TABLE2
(
TAB2_NAME VARCHAR(100)
)

into which I'd like to import TABLE1.IXF, but only TAB1_NAME: IMPORT
FROM TABLE1.IXF OF IXF METHOD N(TAB1_ID, TAB1_NAME) INSERT INTO
TABLE2(TAB2_NAME)
I'm a bit surprised that works at all given that you've specified two
columns in the source and one in the destination. I'd expect something
like this instead:

IMPORT FROM TABLE1.IXF OF IXF
METHOD N (TAB1_NAME)
INSERT INTO TABLE2 (TAB2_NAME)

In other words, the columns you specify as the argument to METHOD N map
to the columns you specify after the action parameter (INSERT /
INSERT_UPDATE / REPLACE / CREATE), hence the command above is simply
ignoring the TAB1_ID column in the source file.
Cheers,

Dave.
Sep 5 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Petri Savolainen | last post by:
I was trying to roll my own python code importer, but in the end, it seems that no matter what you try, it is always necessary to supply a REAL file object for python lower-level import machinery...
7
by: Matthew Wilson | last post by:
Hi- I'm writing a bunch of classes, several of which need functions and variables defined in the math module. In some instances, I'm going to import my module like this: import myshapes ...
5
by: Dfenestr8 | last post by:
Hi. I have a program which I want a plugin directory for. I figured the way to go about that would be to just add a plugin/ dir to sys.path, and import everything in it. Then my program can just...
4
by: MackS | last post by:
Hi I'm new to Python, I've read the FAQ but still can't get the following simple example working: # file main_mod.py: global_string = 'abc' def main():
0
by: Bill Davy | last post by:
I am working with MSVC6 on Windows XP. I have created an MSVC project called SHIP I have a file SHIP.i with "%module SHIP" as the first line (file is below). I run SHIP.i through SWIG 1.3.24...
7
by: steven | last post by:
Which one is better: <link rel="stylesheet" href="style.css" type="text/css" /> or <style type="text/css"> @import url("style.css"); </style>
9
by: Arancaytar | last post by:
I have so far seen two methods for including external resources as CSS stylesheets in a document. The first is this: <link href="/stylesheets/style.css" rel="stylesheet" type="text/css" /> And...
1
by: madbat87 | last post by:
Hi, I'm trying to import code from a c++ unmanaged dll in a c# project. In the dll there's a class named Connection, but the dll exposes only 2 methods (outside the class): - HBITMAP...
3
by: derfer | last post by:
I am trying to import a .inf file into access (the file comes from the output of some 3rd party software). I have managed to convert the file by opeing it in notepad and re-saving then a seperate...
2
by: WP | last post by:
Hello, I've just started to work with DB2 (using the express edition version 9.5 under windows vista) and I'm accessing it through a java program (my java's very rusty). The java program loads the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.