work with LONG data type and files

View: New views
13 Messages — Rating Filter:   Alert me  

work with LONG data type and files

by Dany Gamarra :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello.

I would like to store script files in my database, using a column with
the LONG data type and store it as plain text. And then when needed
export it back to a file.

I know that this can be done using the popup tex editor in the data
grid, but is there a way to do it using command line? because what I
need is to launch the command line from another application.

Thanks in advanced.


RE: work with LONG data type and files

by Jeff Smith-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I STRONGLY suggest using CLOB over LONG - just my $.02

You can define an action that would query the field and create a file to store the content.  Actions have a command-line interface.

You want to do this for 1 row at a time, or have multiple scripts split out to multiple files?  If the latter, that may be a bit harder to automate.

From: toad@... [mailto:toad@...] On Behalf Of Dany Gamarra
Sent: Friday, July 18, 2008 10:53 AM
To: toad@...
Subject: [toad] work with LONG data type and files


Hello.

I would like to store script files in my database, using a column with
the LONG data type and store it as plain text. And then when needed
export it back to a file.

I know that this can be done using the popup tex editor in the data
grid, but is there a way to do it using command line? because what I
need is to launch the command line from another application.

Thanks in advanced.


 
 

image001.jpg (486 bytes) Download Attachment
image002.jpg (456 bytes) Download Attachment

RE: work with LONG data type and files

by Jeff Smith-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have another idea, could be better, and more transportable.

Write a stored procedure to read in the records and write the contents of the record out to the file system.  You can then call your program as long as you have access to the database.

From: toad@... [mailto:toad@...] On Behalf Of Jeff Smith
Sent: Friday, July 18, 2008 10:57 AM
To: toad@...
Subject: RE: [toad] work with LONG data type and files

I STRONGLY suggest using CLOB over LONG - just my $.02

You can define an action that would query the field and create a file to store the content.  Actions have a command-line interface.

You want to do this for 1 row at a time, or have multiple scripts split out to multiple files?  If the latter, that may be a bit harder to automate.

From: toad@... [mailto:toad@...] On Behalf Of Dany Gamarra
Sent: Friday, July 18, 2008 10:53 AM
To: toad@...
Subject: [toad] work with LONG data type and files


Hello.

I would like to store script files in my database, using a column with
the LONG data type and store it as plain text. And then when needed
export it back to a file.

I know that this can be done using the popup tex editor in the data
grid, but is there a way to do it using command line? because what I
need is to launch the command line from another application.

Thanks in advanced.


 
 

image001.jpg (486 bytes) Download Attachment
image002.jpg (456 bytes) Download Attachment

Re: work with LONG data type and files

by Dany Gamarra :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello and thanks for the answer.

If I may ask... why using CLOB is better than using LONG?

I just need one script file in one row.

Detailing a little bit more, I create a script file using wordpad or
some text editor then I want my application to automatically launch a
command line to insert this script file into my database and also when
needed I would like to export the stored script back to a file.

I will look into Actions as you suggested. Thank you

--- In toad@..., Jeff Smith <jeff.smith@...> wrote:
>
> I STRONGLY suggest using CLOB over LONG - just my $.02
>
> You can define an action that would query the field and create a
file to store the content.  Actions have a command-line interface.
>
> You want to do this for 1 row at a time, or have multiple scripts
split out to multiple files?  If the latter, that may be a bit harder
to automate.
>
> From: toad@... [mailto:toad@...] On Behalf
Of Dany Gamarra

> Sent: Friday, July 18, 2008 10:53 AM
> To: toad@...
> Subject: [toad] work with LONG data type and files
>
>
> Hello.
>
> I would like to store script files in my database, using a column with
> the LONG data type and store it as plain text. And then when needed
> export it back to a file.
>
> I know that this can be done using the popup tex editor in the data
> grid, but is there a way to do it using command line? because what I
> need is to launch the command line from another application.
>
> Thanks in advanced.
>



RE: Re: work with LONG data type and files

by Jeff Smith-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

LONGS are basically unusable for a lot of SQL operations.

I'll let others chime in on the pros and cons, just saying, if you haven't created the table yet, consider CLOB.

From: toad@... [mailto:toad@...] On Behalf Of Dany Gamarra
Sent: Friday, July 18, 2008 11:07 AM
To: toad@...
Subject: [toad] Re: work with LONG data type and files


Hello and thanks for the answer.

If I may ask... why using CLOB is better than using LONG?

I just need one script file in one row.

Detailing a little bit more, I create a script file using wordpad or
some text editor then I want my application to automatically launch a
command line to insert this script file into my database and also when
needed I would like to export the stored script back to a file.

I will look into Actions as you suggested. Thank you

--- In toad@...<mailto:toad%40yahoogroups.com>, Jeff Smith <jeff.smith@...> wrote:
>
> I STRONGLY suggest using CLOB over LONG - just my $.02
>
> You can define an action that would query the field and create a
file to store the content. Actions have a command-line interface.
>
> You want to do this for 1 row at a time, or have multiple scripts
split out to multiple files? If the latter, that may be a bit harder
to automate.
>
> From: toad@...<mailto:toad%40yahoogroups.com> [mailto:toad@...<mailto:toad%40yahoogroups.com>] On Behalf
Of Dany Gamarra

> Sent: Friday, July 18, 2008 10:53 AM
> To: toad@...<mailto:toad%40yahoogroups.com>
> Subject: [toad] work with LONG data type and files
>
>
> Hello.
>
> I would like to store script files in my database, using a column with
> the LONG data type and store it as plain text. And then when needed
> export it back to a file.
>
> I know that this can be done using the popup tex editor in the data
> grid, but is there a way to do it using command line? because what I
> need is to launch the command line from another application.
>
> Thanks in advanced.
>


 
 

image001.jpg (486 bytes) Download Attachment
image002.jpg (456 bytes) Download Attachment

Re: Re: work with LONG data type and files

by sdstuber :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

anything you can do with a LONG, you can do with a CLOB.

however, with a LONG you cannot.....

substring, instring or most other functions
use it in a where clause
index on it
pass it into a pl/sql variable.  (the LONG pl/sql type is actually a
varchar2 of 32760 characters maximum)
you can't have more than one in a table
you can't update them except in their entirety





"Dany Gamarra" <dagahss@...>
Sent by: toad@...
2008/07/18 11:07
Please respond to
toad@...


To
toad@...
cc

Subject
[toad] Re: work with LONG data type and files






Hello and thanks for the answer.

If I may ask... why using CLOB is better than using LONG?

I just need one script file in one row.

Detailing a little bit more, I create a script file using wordpad or
some text editor then I want my application to automatically launch a
command line to insert this script file into my database and also when
needed I would like to export the stored script back to a file.

I will look into Actions as you suggested. Thank you

--- In toad@..., Jeff Smith <jeff.smith@...> wrote:
>
> I STRONGLY suggest using CLOB over LONG - just my $.02
>
> You can define an action that would query the field and create a
file to store the content.  Actions have a command-line interface.
>
> You want to do this for 1 row at a time, or have multiple scripts
split out to multiple files?  If the latter, that may be a bit harder
to automate.
>
> From: toad@... [mailto:toad@...] On Behalf
Of Dany Gamarra

> Sent: Friday, July 18, 2008 10:53 AM
> To: toad@...
> Subject: [toad] work with LONG data type and files
>
>
> Hello.
>
> I would like to store script files in my database, using a column with
> the LONG data type and store it as plain text. And then when needed
> export it back to a file.
>
> I know that this can be done using the popup tex editor in the data
> grid, but is there a way to do it using command line? because what I
> need is to launch the command line from another application.
>
> Thanks in advanced.
>



------------------------------------

Questions?  Try the on-line FAQ:
http://asktoad.com/DWiki/doku.php?id=faq:questions

Trouble downloading or running the freeware update? See
http://asktoad.com/DWiki/doku.php/howto_install_and_update_freetoad

Do you know about the other TOAD Yahoo Message Boards?  Go here to find
out more - http://www.toadsoft.com/maillist.htmYahoo! Groups Links





RE: Re: work with LONG data type and files

by Zarzycki, Mike-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The long datatype has been deprecated by Oracle, and they've threatened
to remove it entirely in some future version of the RDBMS. This reason
alone should steer you toward CLOB.
 
CLOB has much better querying support. Many standard text functions can
be used against CLOBs, but not longs. There are many articles available
on line to explain the differences.
 

Best regards,
Mike

Michael S. Zarzycki, MTS | Manager of Engineering IT | Sensata
Technologies, Inc. | voice: 508-236-1015 | fax: 508-236-3701 |
www.sensata.com <http://www.sensata.com/>  | The World Depends on
Sensors and Controls

 

________________________________

From: toad@... [mailto:toad@...] On Behalf Of
Jeff Smith
Sent: Friday, July 18, 2008 11:10 AM
To: toad@...
Subject: RE: [toad] Re: work with LONG data type and files



LONGS are basically unusable for a lot of SQL operations.

I'll let others chime in on the pros and cons, just saying, if you
haven't created the table yet, consider CLOB.

From: toad@... [mailto:toad@...] On Behalf Of
Dany Gamarra
Sent: Friday, July 18, 2008 11:07 AM
To: toad@...
Subject: [toad] Re: work with LONG data type and files

Hello and thanks for the answer.

If I may ask... why using CLOB is better than using LONG?

I just need one script file in one row.

Detailing a little bit more, I create a script file using wordpad or
some text editor then I want my application to automatically launch a
command line to insert this script file into my database and also when
needed I would like to export the stored script back to a file.

I will look into Actions as you suggested. Thank you

--- In toad@... <mailto:toad%40yahoogroups.com> , Jeff Smith
<jeff.smith@...> wrote:
>
> I STRONGLY suggest using CLOB over LONG - just my $.02
>
> You can define an action that would query the field and create a
file to store the content. Actions have a command-line interface.
>
> You want to do this for 1 row at a time, or have multiple scripts
split out to multiple files? If the latter, that may be a bit harder
to automate.
>
> From: toad@... <mailto:toad%40yahoogroups.com>
[mailto:toad@... <mailto:toad%40yahoogroups.com> ] On Behalf
Of Dany Gamarra

> Sent: Friday, July 18, 2008 10:53 AM
> To: toad@... <mailto:toad%40yahoogroups.com>
> Subject: [toad] work with LONG data type and files
>
>
> Hello.
>
> I would like to store script files in my database, using a column with
> the LONG data type and store it as plain text. And then when needed
> export it back to a file.
>
> I know that this can be done using the popup tex editor in the data
> grid, but is there a way to do it using command line? because what I
> need is to launch the command line from another application.
>
> Thanks in advanced.
>

 

RE: Re: work with LONG data type and files

by boothie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I don't know of anyone who advocates using LONG instead CLOB. As others
have stated it's just not a good idea to use LONGs.
 
I don't expect LONGs to go away soon, some of the Oracle internal
software still uses LONG, but I seriously doubt that anything new does.
 
I think that this is one area where you actually could get a unanimous
consensus.
 
Steve...
________________________________

From: toad@... [mailto:toad@...] On Behalf Of
Dany Gamarra
Sent: Friday, July 18, 2008 10:07
To: toad@...
Subject: [toad] Re: work with LONG data type and files



Hello and thanks for the answer.

If I may ask... why using CLOB is better than using LONG?

I just need one script file in one row.

Detailing a little bit more, I create a script file using wordpad or
some text editor then I want my application to automatically launch a
command line to insert this script file into my database and also when
needed I would like to export the stored script back to a file.

I will look into Actions as you suggested. Thank you

--- In toad@... <mailto:toad%40yahoogroups.com> , Jeff Smith
<jeff.smith@...> wrote:
>
> I STRONGLY suggest using CLOB over LONG - just my $.02
>
> You can define an action that would query the field and create a
file to store the content. Actions have a command-line interface.
>
> You want to do this for 1 row at a time, or have multiple scripts
split out to multiple files? If the latter, that may be a bit harder
to automate.
>
> From: toad@... <mailto:toad%40yahoogroups.com>
[mailto:toad@... <mailto:toad%40yahoogroups.com> ] On Behalf
Of Dany Gamarra

> Sent: Friday, July 18, 2008 10:53 AM
> To: toad@... <mailto:toad%40yahoogroups.com>
> Subject: [toad] work with LONG data type and files
>
>
> Hello.
>
> I would like to store script files in my database, using a column with
> the LONG data type and store it as plain text. And then when needed
> export it back to a file.
>
> I know that this can be done using the popup tex editor in the data
> grid, but is there a way to do it using command line? because what I
> need is to launch the command line from another application.
>
> Thanks in advanced.
>



 

Re: work with LONG data type and files

by Dany Gamarra :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks very much, I understand now that working with CLOB is better
than LONG, and I will use CLOB.

But still the main problem is this:

I have an application that launches a text editor, such as wordpad and
I create a script-text file there. When finished I go back to my
application and there I want to launch a command line that will insert
the script file that has just been created to a CLOB column in my
oracle database. And likewise, When I want to view or update the
script I need to launch a command line which will query the database,
find the script stored in the CLOB column and export it to a text
file, to finally open it with word pad.

The reason I use an external text editor is that I use CA Gen and it
can only handle a text attribute of a max length of 4094, which is
extremely too short for the scripts I need to store. Thus I cannot use
my own application to handle the insert and read of the script.
Instead launch command lines that will do the work.

Thanks again.

--- In toad@..., "Zarzycki, Michael" <zman@...> wrote:

>
> The long datatype has been deprecated by Oracle, and they've threatened
> to remove it entirely in some future version of the RDBMS. This reason
> alone should steer you toward CLOB.
>  
> CLOB has much better querying support. Many standard text functions can
> be used against CLOBs, but not longs. There are many articles available
> on line to explain the differences.
>  
>
> Best regards,
> Mike
>
> Michael S. Zarzycki, MTS | Manager of Engineering IT | Sensata
> Technologies, Inc. | voice: 508-236-1015 | fax: 508-236-3701 |
> www.sensata.com <http://www.sensata.com/>  | The World Depends on
> Sensors and Controls
>
>  
>
> ________________________________
>
> From: toad@... [mailto:toad@...] On Behalf Of
> Jeff Smith
> Sent: Friday, July 18, 2008 11:10 AM
> To: toad@...
> Subject: RE: [toad] Re: work with LONG data type and files
>
>
>
> LONGS are basically unusable for a lot of SQL operations.
>
> I'll let others chime in on the pros and cons, just saying, if you
> haven't created the table yet, consider CLOB.
>
> From: toad@... [mailto:toad@...] On Behalf Of
> Dany Gamarra
> Sent: Friday, July 18, 2008 11:07 AM
> To: toad@...
> Subject: [toad] Re: work with LONG data type and files
>
> Hello and thanks for the answer.
>
> If I may ask... why using CLOB is better than using LONG?
>
> I just need one script file in one row.
>
> Detailing a little bit more, I create a script file using wordpad or
> some text editor then I want my application to automatically launch a
> command line to insert this script file into my database and also when
> needed I would like to export the stored script back to a file.
>
> I will look into Actions as you suggested. Thank you
>
> --- In toad@... <mailto:toad%40yahoogroups.com> , Jeff Smith
> <jeff.smith@> wrote:
> >
> > I STRONGLY suggest using CLOB over LONG - just my $.02
> >
> > You can define an action that would query the field and create a
> file to store the content. Actions have a command-line interface.
> >
> > You want to do this for 1 row at a time, or have multiple scripts
> split out to multiple files? If the latter, that may be a bit harder
> to automate.
> >
> > From: toad@... <mailto:toad%40yahoogroups.com>
> [mailto:toad@... <mailto:toad%40yahoogroups.com> ] On Behalf
> Of Dany Gamarra
> > Sent: Friday, July 18, 2008 10:53 AM
> > To: toad@... <mailto:toad%40yahoogroups.com>
> > Subject: [toad] work with LONG data type and files
> >
> >
> > Hello.
> >
> > I would like to store script files in my database, using a column with
> > the LONG data type and store it as plain text. And then when needed
> > export it back to a file.
> >
> > I know that this can be done using the popup tex editor in the data
> > grid, but is there a way to do it using command line? because what I
> > need is to launch the command line from another application.
> >
> > Thanks in advanced.
> >
>



RE: Re: work with LONG data type and files

by Jeff Smith-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I don't know if you have an easy answer

Why not have your CA program launch Toad instead of wordpad.

Once you're in toad you can handle the extract and loading there...so you're doing stuff manually already, right?

From: toad@... [mailto:toad@...] On Behalf Of Dany Gamarra
Sent: Friday, July 18, 2008 11:36 AM
To: toad@...
Subject: [toad] Re: work with LONG data type and files


Thanks very much, I understand now that working with CLOB is better
than LONG, and I will use CLOB.

But still the main problem is this:

I have an application that launches a text editor, such as wordpad and
I create a script-text file there. When finished I go back to my
application and there I want to launch a command line that will insert
the script file that has just been created to a CLOB column in my
oracle database. And likewise, When I want to view or update the
script I need to launch a command line which will query the database,
find the script stored in the CLOB column and export it to a text
file, to finally open it with word pad.

The reason I use an external text editor is that I use CA Gen and it
can only handle a text attribute of a max length of 4094, which is
extremely too short for the scripts I need to store. Thus I cannot use
my own application to handle the insert and read of the script.
Instead launch command lines that will do the work.

Thanks again.

--- In toad@...<mailto:toad%40yahoogroups.com>, "Zarzycki, Michael" <zman@...> wrote:

>
> The long datatype has been deprecated by Oracle, and they've threatened
> to remove it entirely in some future version of the RDBMS. This reason
> alone should steer you toward CLOB.
>
> CLOB has much better querying support. Many standard text functions can
> be used against CLOBs, but not longs. There are many articles available
> on line to explain the differences.
>
>
> Best regards,
> Mike
>
> Michael S. Zarzycki, MTS | Manager of Engineering IT | Sensata
> Technologies, Inc. | voice: 508-236-1015 | fax: 508-236-3701 |
> www.sensata.com <http://www.sensata.com/> | The World Depends on
> Sensors and Controls
>
>
>
> ________________________________
>
> From: toad@...<mailto:toad%40yahoogroups.com> [mailto:toad@...<mailto:toad%40yahoogroups.com>] On Behalf Of
> Jeff Smith
> Sent: Friday, July 18, 2008 11:10 AM
> To: toad@...<mailto:toad%40yahoogroups.com>
> Subject: RE: [toad] Re: work with LONG data type and files
>
>
>
> LONGS are basically unusable for a lot of SQL operations.
>
> I'll let others chime in on the pros and cons, just saying, if you
> haven't created the table yet, consider CLOB.
>
> From: toad@...<mailto:toad%40yahoogroups.com> [mailto:toad@...<mailto:toad%40yahoogroups.com>] On Behalf Of
> Dany Gamarra
> Sent: Friday, July 18, 2008 11:07 AM
> To: toad@...<mailto:toad%40yahoogroups.com>
> Subject: [toad] Re: work with LONG data type and files
>
> Hello and thanks for the answer.
>
> If I may ask... why using CLOB is better than using LONG?
>
> I just need one script file in one row.
>
> Detailing a little bit more, I create a script file using wordpad or
> some text editor then I want my application to automatically launch a
> command line to insert this script file into my database and also when
> needed I would like to export the stored script back to a file.
>
> I will look into Actions as you suggested. Thank you
>
> --- In toad@...<mailto:toad%40yahoogroups.com> <mailto:toad%40yahoogroups.com> , Jeff Smith
> <jeff.smith@> wrote:
> >
> > I STRONGLY suggest using CLOB over LONG - just my $.02
> >
> > You can define an action that would query the field and create a
> file to store the content. Actions have a command-line interface.
> >
> > You want to do this for 1 row at a time, or have multiple scripts
> split out to multiple files? If the latter, that may be a bit harder
> to automate.
> >
> > From: toad@...<mailto:toad%40yahoogroups.com> <mailto:toad%40yahoogroups.com>
> [mailto:toad@...<mailto:toad%40yahoogroups.com> <mailto:toad%40yahoogroups.com> ] On Behalf
> Of Dany Gamarra
> > Sent: Friday, July 18, 2008 10:53 AM
> > To: toad@...<mailto:toad%40yahoogroups.com> <mailto:toad%40yahoogroups.com>
> > Subject: [toad] work with LONG data type and files
> >
> >
> > Hello.
> >
> > I would like to store script files in my database, using a column with
> > the LONG data type and store it as plain text. And then when needed
> > export it back to a file.
> >
> > I know that this can be done using the popup tex editor in the data
> > grid, but is there a way to do it using command line? because what I
> > need is to launch the command line from another application.
> >
> > Thanks in advanced.
> >
>


 
 

image001.jpg (486 bytes) Download Attachment
image002.jpg (456 bytes) Download Attachment

Re: work with LONG data type and files

by Dany Gamarra :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yeah, that was an idea too... but is there a way to automatically open
TOAD's popup text editor, and load there the text in the column of the
exact record I have selected in my application?

--- In toad@..., Jeff Smith <jeff.smith@...> wrote:
>
> I don't know if you have an easy answer
>
> Why not have your CA program launch Toad instead of wordpad.
>
> Once you're in toad you can handle the extract and loading
there...so you're doing stuff manually already, right?
>
> From: toad@... [mailto:toad@...] On Behalf
Of Dany Gamarra

> Sent: Friday, July 18, 2008 11:36 AM
> To: toad@...
> Subject: [toad] Re: work with LONG data type and files
>
>
> Thanks very much, I understand now that working with CLOB is better
> than LONG, and I will use CLOB.
>
> But still the main problem is this:
>
> I have an application that launches a text editor, such as wordpad and
> I create a script-text file there. When finished I go back to my
> application and there I want to launch a command line that will insert
> the script file that has just been created to a CLOB column in my
> oracle database. And likewise, When I want to view or update the
> script I need to launch a command line which will query the database,
> find the script stored in the CLOB column and export it to a text
> file, to finally open it with word pad.
>
> The reason I use an external text editor is that I use CA Gen and it
> can only handle a text attribute of a max length of 4094, which is
> extremely too short for the scripts I need to store. Thus I cannot use
> my own application to handle the insert and read of the script.
> Instead launch command lines that will do the work.
>
> Thanks again.
>
> --- In toad@...<mailto:toad%40yahoogroups.com>,
"Zarzycki, Michael" <zman@> wrote:
> >
> > The long datatype has been deprecated by Oracle, and they've
threatened
> > to remove it entirely in some future version of the RDBMS. This reason
> > alone should steer you toward CLOB.
> >
> > CLOB has much better querying support. Many standard text
functions can
> > be used against CLOBs, but not longs. There are many articles
available

> > on line to explain the differences.
> >
> >
> > Best regards,
> > Mike
> >
> > Michael S. Zarzycki, MTS | Manager of Engineering IT | Sensata
> > Technologies, Inc. | voice: 508-236-1015 | fax: 508-236-3701 |
> > www.sensata.com <http://www.sensata.com/> | The World Depends on
> > Sensors and Controls
> >
> >
> >
> > ________________________________
> >
> > From: toad@...<mailto:toad%40yahoogroups.com>
[mailto:toad@...<mailto:toad%40yahoogroups.com>] On Behalf Of

> > Jeff Smith
> > Sent: Friday, July 18, 2008 11:10 AM
> > To: toad@...<mailto:toad%40yahoogroups.com>
> > Subject: RE: [toad] Re: work with LONG data type and files
> >
> >
> >
> > LONGS are basically unusable for a lot of SQL operations.
> >
> > I'll let others chime in on the pros and cons, just saying, if you
> > haven't created the table yet, consider CLOB.
> >
> > From: toad@...<mailto:toad%40yahoogroups.com>
[mailto:toad@...<mailto:toad%40yahoogroups.com>] On Behalf Of

> > Dany Gamarra
> > Sent: Friday, July 18, 2008 11:07 AM
> > To: toad@...<mailto:toad%40yahoogroups.com>
> > Subject: [toad] Re: work with LONG data type and files
> >
> > Hello and thanks for the answer.
> >
> > If I may ask... why using CLOB is better than using LONG?
> >
> > I just need one script file in one row.
> >
> > Detailing a little bit more, I create a script file using wordpad or
> > some text editor then I want my application to automatically launch a
> > command line to insert this script file into my database and also when
> > needed I would like to export the stored script back to a file.
> >
> > I will look into Actions as you suggested. Thank you
> >
> > --- In toad@...<mailto:toad%40yahoogroups.com>
<mailto:toad%40yahoogroups.com> , Jeff Smith

> > <jeff.smith@> wrote:
> > >
> > > I STRONGLY suggest using CLOB over LONG - just my $.02
> > >
> > > You can define an action that would query the field and create a
> > file to store the content. Actions have a command-line interface.
> > >
> > > You want to do this for 1 row at a time, or have multiple scripts
> > split out to multiple files? If the latter, that may be a bit harder
> > to automate.
> > >
> > > From: toad@...<mailto:toad%40yahoogroups.com>
<mailto:toad%40yahoogroups.com>
> > [mailto:toad@...<mailto:toad%40yahoogroups.com>
<mailto:toad%40yahoogroups.com> ] On Behalf
> > Of Dany Gamarra
> > > Sent: Friday, July 18, 2008 10:53 AM
> > > To: toad@...<mailto:toad%40yahoogroups.com>
<mailto:toad%40yahoogroups.com>
> > > Subject: [toad] work with LONG data type and files
> > >
> > >
> > > Hello.
> > >
> > > I would like to store script files in my database, using a
column with

> > > the LONG data type and store it as plain text. And then when needed
> > > export it back to a file.
> > >
> > > I know that this can be done using the popup tex editor in the data
> > > grid, but is there a way to do it using command line? because what I
> > > need is to launch the command line from another application.
> > >
> > > Thanks in advanced.
> > >
> >
>



RE: Re: work with LONG data type and files

by Bert Scalzo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Also recommend reading my last couple weeks blogs on toad world about dynamic scripting - would be a trivial exercise to dynamically script this ..... read the blog

From: toad@... [mailto:toad@...] On Behalf Of Dany Gamarra
Sent: Friday, July 18, 2008 11:07 AM
To: toad@...
Subject: [toad] Re: work with LONG data type and files


Yeah, that was an idea too... but is there a way to automatically open
TOAD's popup text editor, and load there the text in the column of the
exact record I have selected in my application?

--- In toad@...<mailto:toad%40yahoogroups.com>, Jeff Smith <jeff.smith@...> wrote:
>
> I don't know if you have an easy answer
>
> Why not have your CA program launch Toad instead of wordpad.
>
> Once you're in toad you can handle the extract and loading
there...so you're doing stuff manually already, right?
>
> From: toad@...<mailto:toad%40yahoogroups.com> [mailto:toad@...<mailto:toad%40yahoogroups.com>] On Behalf
Of Dany Gamarra

> Sent: Friday, July 18, 2008 11:36 AM
> To: toad@...<mailto:toad%40yahoogroups.com>
> Subject: [toad] Re: work with LONG data type and files
>
>
> Thanks very much, I understand now that working with CLOB is better
> than LONG, and I will use CLOB.
>
> But still the main problem is this:
>
> I have an application that launches a text editor, such as wordpad and
> I create a script-text file there. When finished I go back to my
> application and there I want to launch a command line that will insert
> the script file that has just been created to a CLOB column in my
> oracle database. And likewise, When I want to view or update the
> script I need to launch a command line which will query the database,
> find the script stored in the CLOB column and export it to a text
> file, to finally open it with word pad.
>
> The reason I use an external text editor is that I use CA Gen and it
> can only handle a text attribute of a max length of 4094, which is
> extremely too short for the scripts I need to store. Thus I cannot use
> my own application to handle the insert and read of the script.
> Instead launch command lines that will do the work.
>
> Thanks again.
>
> --- In toad@...<mailto:toad%40yahoogroups.com><mailto:toad%40yahoogroups.com>,
"Zarzycki, Michael" <zman@> wrote:
> >
> > The long datatype has been deprecated by Oracle, and they've
threatened
> > to remove it entirely in some future version of the RDBMS. This reason
> > alone should steer you toward CLOB.
> >
> > CLOB has much better querying support. Many standard text
functions can
> > be used against CLOBs, but not longs. There are many articles
available

> > on line to explain the differences.
> >
> >
> > Best regards,
> > Mike
> >
> > Michael S. Zarzycki, MTS | Manager of Engineering IT | Sensata
> > Technologies, Inc. | voice: 508-236-1015 | fax: 508-236-3701 |
> > www.sensata.com <http://www.sensata.com/> | The World Depends on
> > Sensors and Controls
> >
> >
> >
> > ________________________________
> >
> > From: toad@...<mailto:toad%40yahoogroups.com><mailto:toad%40yahoogroups.com>
[mailto:toad@...<mailto:toad%40yahoogroups.com><mailto:toad%40yahoogroups.com>] On Behalf Of

> > Jeff Smith
> > Sent: Friday, July 18, 2008 11:10 AM
> > To: toad@...<mailto:toad%40yahoogroups.com><mailto:toad%40yahoogroups.com>
> > Subject: RE: [toad] Re: work with LONG data type and files
> >
> >
> >
> > LONGS are basically unusable for a lot of SQL operations.
> >
> > I'll let others chime in on the pros and cons, just saying, if you
> > haven't created the table yet, consider CLOB.
> >
> > From: toad@...<mailto:toad%40yahoogroups.com><mailto:toad%40yahoogroups.com>
[mailto:toad@...<mailto:toad%40yahoogroups.com><mailto:toad%40yahoogroups.com>] On Behalf Of

> > Dany Gamarra
> > Sent: Friday, July 18, 2008 11:07 AM
> > To: toad@...<mailto:toad%40yahoogroups.com><mailto:toad%40yahoogroups.com>
> > Subject: [toad] Re: work with LONG data type and files
> >
> > Hello and thanks for the answer.
> >
> > If I may ask... why using CLOB is better than using LONG?
> >
> > I just need one script file in one row.
> >
> > Detailing a little bit more, I create a script file using wordpad or
> > some text editor then I want my application to automatically launch a
> > command line to insert this script file into my database and also when
> > needed I would like to export the stored script back to a file.
> >
> > I will look into Actions as you suggested. Thank you
> >
> > --- In toad@...<mailto:toad%40yahoogroups.com><mailto:toad%40yahoogroups.com>
<mailto:toad%40yahoogroups.com> , Jeff Smith

> > <jeff.smith@> wrote:
> > >
> > > I STRONGLY suggest using CLOB over LONG - just my $.02
> > >
> > > You can define an action that would query the field and create a
> > file to store the content. Actions have a command-line interface.
> > >
> > > You want to do this for 1 row at a time, or have multiple scripts
> > split out to multiple files? If the latter, that may be a bit harder
> > to automate.
> > >
> > > From: toad@...<mailto:toad%40yahoogroups.com><mailto:toad%40yahoogroups.com>
<mailto:toad%40yahoogroups.com>
> > [mailto:toad@...<mailto:toad%40yahoogroups.com><mailto:toad%40yahoogroups.com>
<mailto:toad%40yahoogroups.com> ] On Behalf
> > Of Dany Gamarra
> > > Sent: Friday, July 18, 2008 10:53 AM
> > > To: toad@...<mailto:toad%40yahoogroups.com><mailto:toad%40yahoogroups.com>
<mailto:toad%40yahoogroups.com>
> > > Subject: [toad] work with LONG data type and files
> > >
> > >
> > > Hello.
> > >
> > > I would like to store script files in my database, using a
column with

> > > the LONG data type and store it as plain text. And then when needed
> > > export it back to a file.
> > >
> > > I know that this can be done using the popup tex editor in the data
> > > grid, but is there a way to do it using command line? because what I
> > > need is to launch the command line from another application.
> > >
> > > Thanks in advanced.
> > >
> >
>


Re: work with LONG data type and files

by Dany Gamarra :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you.

I checked the blog and there were interesting things there, but still
I don't know how to read from a file and insert that into my
database... I was checking the UTL_FILE package. It still seems a long
way. have to keep searching

--- In toad@..., Bert Scalzo <bert.scalzo@...> wrote:
>
> Also recommend reading my last couple weeks blogs on toad world
about dynamic scripting - would be a trivial exercise to dynamically
script this ..... read the blog
>
> From: toad@... [mailto:toad@...] On Behalf
Of Dany Gamarra

> Sent: Friday, July 18, 2008 11:07 AM
> To: toad@...
> Subject: [toad] Re: work with LONG data type and files
>
>
> Yeah, that was an idea too... but is there a way to automatically open
> TOAD's popup text editor, and load there the text in the column of the
> exact record I have selected in my application?
>
> --- In toad@...<mailto:toad%40yahoogroups.com>, Jeff
Smith <jeff.smith@> wrote:
> >
> > I don't know if you have an easy answer
> >
> > Why not have your CA program launch Toad instead of wordpad.
> >
> > Once you're in toad you can handle the extract and loading
> there...so you're doing stuff manually already, right?
> >
> > From: toad@...<mailto:toad%40yahoogroups.com>
[mailto:toad@...<mailto:toad%40yahoogroups.com>] On Behalf

> Of Dany Gamarra
> > Sent: Friday, July 18, 2008 11:36 AM
> > To: toad@...<mailto:toad%40yahoogroups.com>
> > Subject: [toad] Re: work with LONG data type and files
> >
> >
> > Thanks very much, I understand now that working with CLOB is better
> > than LONG, and I will use CLOB.
> >
> > But still the main problem is this:
> >
> > I have an application that launches a text editor, such as wordpad and
> > I create a script-text file there. When finished I go back to my
> > application and there I want to launch a command line that will insert
> > the s