If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > runa script from a .sql file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-13-04, 04:57
mickykt mickykt is offline
Registered User
 
Join Date: Mar 2003
Location: Singapore
Posts: 200
runa script from a .sql file

Hi guys,

I have two queries:

1.How can I run a query from a file,as in oracle we can use @'file'; in sql.
If I have an .sql file how can I run this.

2.In oracle there is sequence which can be used to create auto numbers,THese can be cyclic,ie: we can tell it to start from 1 and end at 1000 and cycle again from 1 to 1000,and so on.Is there any equivalent as this other than the serial or serial8,I think this cannot be cycled back.

THanks and Regards
Michael
Reply With Quote
  #2 (permalink)  
Old 08-13-04, 09:25
artemka artemka is offline
Registered User
 
Join Date: May 2004
Location: New York
Posts: 248
not sure what you are trying to do?
To run an sql file just do
dbaccess database_name file_name.sql
If you want to increment the numbers use a unix util "expr"
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On