473,386 Members | 1,827 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,386 software developers and data experts.

How can I bulk-load a typed table?

EK
Hello!

I have been assigned to bulk-load data into several typed tables of
our ODS. I am not clear as to whether it can be done.

Here's my homework ===>>>

The easy way is to perform INSERT statements manually, like this

Expand|Select|Wrap|Line Numbers
  1. insert into
  2. callbacks
  3. (
  4. account_info, nbr_clbk, load_date
  5. )
  6. values (
  7. account_obj() ..account_number('123456') ..account_status('ACTV') ..dma_id('803') ..dma_name('Los
  8. Angeles') ..state('CA') ..zipcode('90245')
  9. , 1, '2007-02-20');
This works fine. The challenge is that I have to load about 500K rows
daily for about 23 tables. The other challenge is that the source data
I have to load is contained in "flat", normal tables.

I have tried several things. My first approach was to dump data from
one of the flat tables and import/load back:

a) Import utility
Expand|Select|Wrap|Line Numbers
  1. IMPORT FROM "Z:\clbk_data.del"
  2. OF DEL MODIFIED BY COLDEL, DATESISO METHOD P (2, 3, 4)
  3. MESSAGES "Z:\clbk_data_load.out"
  4. replace into callbacks  (account_info, nbr_clbk, load_date);
It fails:
Expand|Select|Wrap|Line Numbers
  1. SQL3037N  An SQL error "-408" occurred during Import
  2. processing.
b) Load utility
Expand|Select|Wrap|Line Numbers
  1. LOAD CLIENT FROM "Z:\clbk_data.del" OF DEL MESSAGES "Z:
  2. \clbk_data_load.out" INSERT INTO callbacks COPY NO INDEXING MODE
  3. AUTOSELECT
It fails:
Expand|Select|Wrap|Line Numbers
  1. SQL3529N  The "LOAD" operation encountered the
  2. unsupported data type "Structured Data Type" in column "1".
c) I also tried (what I call) "derived" INSERT.

Expand|Select|Wrap|Line Numbers
  1. insert into
  2. callbacks (account_info, nbr_clbk, load_date)
  3. select
  4. account_number, account_status, dma_id, dma_name, state, zipcode,
  5. nbr_clbk, load_date from flat_table.
It fails....

Can somebody please help? If I have to write a program, I will but I'd
like to know if this can be avoided...

My apologies for the long message.

My configuration is:
IBM DB v9.1
Linux RH

Jun 14 '07 #1
0 1313

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

Similar topics

2
by: jason | last post by:
What are the technical challenges in getting a local SMTP email server set up on a win3k system or alternatively on a win2k pro local work statation. We are on the verge of acquiring a new win3k...
3
by: Jim Geissman | last post by:
I am trying to bulk insert a text file. The file has fixed-length fields with no field terminators. BOL says that field terminators are only needed when the data does *not* contain fixed-length...
1
by: gchavez | last post by:
I'm running MSSQL 2K on Win 2k and just upgraded SQL Server from SP3 to SP4 (that's when my problem started). I have a procedure that bulk inserts from a text file that is located on a Netware 4.11...
10
by: Daniel P. | last post by:
How can I use ADO.NET to insert lots of records in a very fast way? Thanks!
1
by: Metal Dave | last post by:
I do not understand the error handling of SQL Server here. Any error in bulk insert seems to halt the current T-SQL statement entirely, rendering it impossible to log an error. The first statement...
3
by: Tim Satterwhite | last post by:
Hi All, I think this is a thorny problem, and I'm hoping you can help. I've not found this exact issue described anywhere yet. I have a stored procedure that calls BULK INSERT on a set of...
1
by: Jennifer | last post by:
I'm trying to do an insert using Bulk Insert with a fixed length file. I'm using a format file. I'm getting the following error message: Cannot perform bulk insert. Invalid collation name for...
0
by: ozkhillscovington | last post by:
We have sp's in place that do BULK INSERTS from txt files into the tables. This works fine, however they have asked us to add a field that identifies accounting ctr. The only thing that identifies...
0
by: bob laughland | last post by:
Hi All, I am using a combination of LINQ to SQL and bulk insert. In the process of performing 'one unit of work' I will be doing things like reading, and deleting records using LINQ to SQL and...
3
by: bob laughland | last post by:
Hi All, I am using a combination of LINQ to SQL and bulk insert. In the process of performing 'one unit of work' I will be doing things like reading, and deleting records using LINQ to SQL and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.