473,545 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Do I need to create a field type LONG?

Hello
I am going to copy a data from MS Access table into Oracle table. One
of fields is memo type and data in this field range from 1 character
to 551 long string. Do I need to create a field type LONG in the
Oracle table to accommodate this data? If not, what field type would
suit best?
Any help will be greatly appreciated.
Thank you.
Galina
Jul 19 '05 #1
7 6763
x
"Galina" <ga****@mail.ru > wrote in message
news:ec******** *************** **@posting.goog le.com...
Hello
I am going to copy a data from MS Access table into Oracle table. One
of fields is memo type and data in this field range from 1 character
to 551 long string. Do I need to create a field type LONG in the
Oracle table to accommodate this data? If not, what field type would
suit best?
Any help will be greatly appreciated.
Thank you.
Galina


varchar2 should be enough, iz can store up to 4000 characters.
Jul 19 '05 #2
Galina wrote:
Hello
I am going to copy a data from MS Access table into Oracle table. One
of fields is memo type and data in this field range from 1 character
to 551 long string. Do I need to create a field type LONG in the
Oracle table to accommodate this data? If not, what field type would
suit best?
Any help will be greatly appreciated.
Thank you.
Galina


You want type VARCHAR2.

Since Oracle 8.0 there are limited, if any, circumstances that justify LONG.
If the limit of 4000 bytes in VARCHAR2 is not enough, switch to the LOB
family (eg: CLOB) not the LONG family.

Check out Oracle's online documentation at http://docs.oracle.com for more.

/Hans
Jul 19 '05 #3
Thank you both for answering. I have already re-created the table with
the field type Varchar2 length 1000.
Simply for curiosity, when I copy a string shorter then 1000 into this
field, will Oracle use memory necessary to store the string, or to
store 1000 characters long string? Sorry for silly question, I
understand that I could have found it somewhere...
Galina
ga****@mail.ru (Galina) wrote in message news:<ec******* *************** ***@posting.goo gle.com>...
Hello
I am going to copy a data from MS Access table into Oracle table. One
of fields is memo type and data in this field range from 1 character
to 551 long string. Do I need to create a field type LONG in the
Oracle table to accommodate this data? If not, what field type would
suit best?
Any help will be greatly appreciated.
Thank you.
Galina

Jul 19 '05 #4

"Galina" <ga****@mail.ru > wrote in message
news:ec******** *************** **@posting.goog le.com...
Thank you both for answering. I have already re-created the table with
the field type Varchar2 length 1000.
Simply for curiosity, when I copy a string shorter then 1000 into this
field, will Oracle use memory necessary to store the string, or to
store 1000 characters long string? Sorry for silly question, I
understand that I could have found it somewhere...
Galina
ga****@mail.ru (Galina) wrote in message

news:<ec******* *************** ***@posting.goo gle.com>...
Hello
I am going to copy a data from MS Access table into Oracle table. One
of fields is memo type and data in this field range from 1 character
to 551 long string. Do I need to create a field type LONG in the
Oracle table to accommodate this data? If not, what field type would
suit best?
Any help will be greatly appreciated.
Thank you.
Galina

It stores the string as is. It does not pad the string. So if the string
is of length 2 then it takes up 2 (plus one for the column delimiter)
Jim
Jul 19 '05 #5
Hi Jim
Thank you for your answer. Of course, it should be this way. Any
respectable database stores strings allocating disk space as much as
necessary and not more. If Access does so, how can it be different
with Oracle, which is much more superiour!
Yesterday I copied my table from Access to Oracle with that field,
which can be any length, set as Varchar2 1000. I was very baffled to
find that the tablespace lost after copying about 70 MBt of space.
Previously, when I set up the field type long and wizard didn't allow
me to enter initial allocations, the tablespace after copying was
about 8 MBt less.
I even doubted for a short while, that your answer was right. But then
I decided that Oracle allocated all this space to my table, because
every record might have have 1000 character long string, but didn't
use it and new records will be added into the same allocated space.
Which means, that for a while the tablespace will not grow, despite
records being added. We shall see. The performance, if the field is
set as Varchar2, is noticeably better then when it was long.
Galina
"Jim Kennedy" <ke************ *************** *@attbi.net> wrote in message news:<nmNlc.209 01$IG1.865525@a ttbi_s04>...
"Galina" <ga****@mail.ru > wrote in message
news:ec******** *************** **@posting.goog le.com...
Thank you both for answering. I have already re-created the table with
the field type Varchar2 length 1000.
Simply for curiosity, when I copy a string shorter then 1000 into this
field, will Oracle use memory necessary to store the string, or to
store 1000 characters long string? Sorry for silly question, I
understand that I could have found it somewhere...
Galina
ga****@mail.ru (Galina) wrote in message

news:<ec******* *************** ***@posting.goo gle.com>...
Hello
I am going to copy a data from MS Access table into Oracle table. One
of fields is memo type and data in this field range from 1 character
to 551 long string. Do I need to create a field type LONG in the
Oracle table to accommodate this data? If not, what field type would
suit best?
Any help will be greatly appreciated.
Thank you.
Galina

It stores the string as is. It does not pad the string. So if the string
is of length 2 then it takes up 2 (plus one for the column delimiter)
Jim

Jul 19 '05 #6
ga****@mail.ru (Galina) wrote in message news:<ec******* *************** ***@posting.goo gle.com>...
Hi Jim
Thank you for your answer. Of course, it should be this way. Any
respectable database stores strings allocating disk space as much as
necessary and not more.


That's why it's called varchar ==> variable character length.
char data type on the other hand will pad your string up to specified
length, see example:

SQL> create table temp (varname varchar2(20), fixname char(20));
Table created.

SQL> insert into temp values ('short string', 'short string');
1 row created.

SQL> insert into temp values ('longer string', 'longer string');
1 row created.

SQL> select '|'||varname||' |' "varname" from temp;

varname
----------------------
|short string|
|longer string|

SQL> select '|'||fixname||' |' "fixname" from temp;

fixname
----------------------
|short string |
|longer string |
Jul 19 '05 #7
Thank you., especially for taking your time to explain the difference
with the example. Not that I see a need for fixed length string at the
moment, but I am sure in some situations it would be needed.
Galina
sh******@yahoo. com (Sharkie) wrote in message news:<42******* *************** ****@posting.go ogle.com>...
ga****@mail.ru (Galina) wrote in message news:<ec******* *************** ***@posting.goo gle.com>...
Hi Jim
Thank you for your answer. Of course, it should be this way. Any
respectable database stores strings allocating disk space as much as
necessary and not more.


That's why it's called varchar ==> variable character length.
char data type on the other hand will pad your string up to specified
length, see example:

SQL> create table temp (varname varchar2(20), fixname char(20));
Table created.

SQL> insert into temp values ('short string', 'short string');
1 row created.

SQL> insert into temp values ('longer string', 'longer string');
1 row created.

SQL> select '|'||varname||' |' "varname" from temp;

varname
----------------------
|short string|
|longer string|

SQL> select '|'||fixname||' |' "fixname" from temp;

fixname
----------------------
|short string |
|longer string |

Jul 19 '05 #8

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

Similar topics

2
2917
by: Mike Button | last post by:
Hello all, I am really really desperate on what I should do, and I am asking for help from anyone in this newsgroup, here's the situation: I am creating a form that is being run on a server where there is no scripts allowed running (the software is from Opentext called Livelink)- therefore I need javascript to do the tasks listed below:...
9
4022
by: Edward S | last post by:
I budget for a Project in an Excel sheet as illustrated below. The months below are usually a 2 year period i.e. 24 months, though it could be over 24 months depending upon a Project. I then need to input this in an Access database, where I do a comparison with the Actual cost. The table “TblBudget” in Access is made of 4 fields, namely:...
3
3236
by: CSDunn | last post by:
Hello, I have 14 fields on a report that hold integer values. The field names use the following naming convention: T1Number, T2Number ....T14Number. I need to get a 'sub total' of all fields as follows: =Sum() ... =Sum() Then I need to get an average of all fields as follows:
7
2348
by: Jack Addington | last post by:
I've got a fairly simple application implementation that over time is going to get a lot bigger. I'm really trying to implement it in a way that will facilitate the growth. I am first writing a WinForms interface and then need to port that to a web app. I am kinda stuck on a design issue and need some suggestions / direction. Basically I...
2
7966
by: Greg Strong | last post by:
Hello All, Is it possible to change table field lookup properties in code? I've been able to change other field properties in code, however so far no luck with field lookup properties. What I've done for test purposes is use a text input file for the table field lookup properties. I thought that I'd start first by just changing the...
9
3928
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result - I have read every post out there and spent hours trying to figure out the problem with no success whatsoever - I have constrained the problem to...
7
2010
by: Rnykster | last post by:
I know a little about Access and have made several single table databases. Been struggling for about a month to do a multiple table database with no success. Help! There are two tables. First has about 30 fields. Every entry in this table will be unique. Second table has about 7 fields and is for reference - strictly a look up type table. I...
7
142
by: Galina | last post by:
Hello I am going to copy a data from MS Access table into Oracle table. One of fields is memo type and data in this field range from 1 character to 551 long string. Do I need to create a field type LONG in the Oracle table to accommodate this data? If not, what field type would suit best? Any help will be greatly appreciated. Thank you....
9
2618
by: pereges | last post by:
Hello I need some ideas for designing a recursive function for my ray tracing program. The idea behind ray tracing is to follow the electromagnetic rays from the source, as they hit the object.The object is triangulated. The rays can undergo multiple reflections, diffractions etc of the same object i.e. a ray hits a surface of the object,...
0
7420
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7446
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6003
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5349
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4966
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3476
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3459
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1908
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1033
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.