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

Building Very Large Records

Hello-

I am working on a routine to pull information from an Oracle database and
format it into fixed-length records. My problem is that the record layout
is quite long (over 500 bytes) and contains dozens of fields. How would
*you* go about building such a beast? I know that using the += operator is
a bad idea, as it creates a new copy of the string each time. How about the
struct.pack() method? A very big '%-12.12s%-50.50s.......' statement?
Other ideas? It does not have to be blazingly fast, but it doesn't have to
suck, either. I don't know enough about Oracle SQL yet, could I format the
data in the SQL call?

Thanks,

Greg Lindstrom (501) 975-4859
NovaSys Health gr************@novasyshealth.com

"We are the music makers, and we are the dreamers of dreams" W.W.

Jul 18 '05 #1
2 1277
Greg Lindstrom <gr************@novasyshealth.com> wrote:
Hello-

I am working on a routine to pull information from an Oracle database and
format it into fixed-length records. My problem is that the record layout
is quite long (over 500 bytes) and contains dozens of fields. How would
*you* go about building such a beast? I know that using the += operator is
a bad idea, as it creates a new copy of the string each time. How about the
struct.pack() method? A very big '%-12.12s%-50.50s.......' statement?


Yep, except that what you're quoting ain't a statement, just a string.
But put a % after it and the right tuple after that, and you''re going
somewhere!-)
Alex
Jul 18 '05 #2
>>I don't know enough about Oracle SQL yet, could I format the data in
the SQL call?

This would be the best solution. Especially if done via stored
procedure. I also do not know how to do this in Oracle. In MSSQL I
would write an extended stored prosedure.
Jul 18 '05 #3

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

Similar topics

6
by: Greg | last post by:
I am working on a project that will have about 500,000 records in an XML document. This document will need to be queried with XPath, and records will need to be updated. I was thinking about...
24
by: Salad | last post by:
Every now and then I see ads that state something like "Experience with Large Databases ...multi-gig...blah-de-blah" And I have to laugh. What's the difference between a large or small database? ...
2
by: UJ | last post by:
I have an app that I've already written that works just great. It's a window's explorer like app for our data. Problem is, to build the treeview takes too long (30 secs and upward for less than...
25
by: tekctrl | last post by:
Anyone: I have a simple MSAccess DB which was created from an old ASCII flatfile. It works fine except for something that just started happening. I'll enter info in a record, save the record,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.