niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » shell
deleting tables using script
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
Author Message
Bill Marcum
*nix forums Guru


Joined: 28 Mar 2005
Posts: 1264

PostPosted: Wed Jul 19, 2006 11:51 am    Post subject: Re: deleting tables using script Reply with quote

On 18 Jul 2006 22:47:51 -0700, manish
<manishmodgil@gmail.com> wrote:
Quote:
Hi All,

I have repeatedly delete a number of tables from the TimesTen database
that i am using on Solaris
platform.
To do so first i do

$ttdir ws;

where ws is the name of the DSN .It provides me with a new prompt

command

On this prompt i write the command
command > delete from table_name1;
command > delete from table_name2;
command > delete from table_name3;
command > delete from table_name4;
...

to delete the table table_name*.

How could i write a scripts to do the job for me.

ttdir ws <<END

delete from table_name1;
delete from table_name2;
delete from table_name3;
delete from table_name4;
END


--
Fishing, with me, has always been an excuse to drink in the daytime.
-- Jimmy Cannon
Back to top
manish
*nix forums addict


Joined: 26 May 2005
Posts: 68

PostPosted: Wed Jul 19, 2006 9:06 am    Post subject: Re: deleting tables using script Reply with quote

although i have got a turnaround solution for the problem..

running a sql file directly from the sql prompt...

but i would certainly appreciate if someone could tell me whether such
a kind of thing
is possible or not.
Back to top
manish
*nix forums addict


Joined: 26 May 2005
Posts: 68

PostPosted: Wed Jul 19, 2006 7:44 am    Post subject: Re: deleting tables using script Reply with quote

The prompt

command>

is TimesTen release 6.0.2 prompt supportin the SQL statements.

I tried similar thing with the bash prompt and tcl/wish prompt. i.e
running
a script from the bash shell which makes use of tcl shell to execute
some
of the commands and i was expecting the same here but the things are
not
working.
Back to top
manish
*nix forums addict


Joined: 26 May 2005
Posts: 68

PostPosted: Wed Jul 19, 2006 5:47 am    Post subject: deleting tables using script Reply with quote

Hi All,

I have repeatedly delete a number of tables from the TimesTen database
that i am using on Solaris
platform.
To do so first i do

$ttdir ws;

where ws is the name of the DSN .It provides me with a new prompt

command >

On this prompt i write the command
command > delete from table_name1;
command > delete from table_name2;
command > delete from table_name3;
command > delete from table_name4;
....

to delete the table table_name*.

How could i write a scripts to do the job for me.

Thanks in advance.
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
The time now is Fri Nov 21, 2008 9:04 pm | All times are GMT
navigation Forum index » Programming » shell
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts does squid 2.6 support setting cache_peer port in redirec... Victor Tsang Squid 0 Fri Jul 21, 2006 8:16 am
No new posts mail script eeb4u@hotmail.com shell 3 Fri Jul 21, 2006 5:50 am
No new posts A simple bash script JPB Suse 2 Fri Jul 21, 2006 2:19 am
No new posts Getting started in PXPerl, i.e how to run a script? Markus Hänchen Perl 5 Thu Jul 20, 2006 2:12 pm
No new posts Creating a relationship between 2 tables Andyza Oracle 2 Thu Jul 20, 2006 1:11 pm

Mortgages | Ringtones | Hipster Blog | Homes for Sale | Adverse Credit Remortgage
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1991s ][ Queries: 20 (0.1226s) ][ GZIP on - Debug on ]