Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 17th, 2005, 03:57 AM
1andy1 1andy1 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 18 1andy1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 18 sec
Reputation Power: 0
Send a message via ICQ to 1andy1
Question How to pass parameters into SQL script?

Hi all,

is it possible to pass parameters into SQL script.

example:
I would like to pass name of the database as a parameter to an installation script (script.sql)

isql -i script.sql ...

script.sql

connect %1 ...

Is it posiible?

Thanks,
Andrej.

Reply With Quote
  #2  
Old January 17th, 2005, 01:34 PM
mariuz's Avatar
mariuz mariuz is offline
Bug Hunter
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Transylvania (Romania)
Posts: 274 mariuz User rank is Corporal (100 - 500 Reputation Level)mariuz User rank is Corporal (100 - 500 Reputation Level)mariuz User rank is Corporal (100 - 500 Reputation Level)mariuz User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 20 h 12 m 34 sec
Reputation Power: 9
Question

Quote:
Originally Posted by 1andy1
Hi all,

is it possible to pass parameters into SQL script.

example:
I would like to pass name of the database as a parameter to an installation script (script.sql)

isql -i script.sql ...

script.sql

connect %1 ...

Is it posiible?

Thanks,
Andrej.


I would run replace function before script is run (written in any language)
__________________
My home page: http://www.firebirdsql.org and work place :http://www.reea.net

Reply With Quote
  #3  
Old January 18th, 2005, 03:01 AM
1andy1 1andy1 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 18 1andy1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 18 sec
Reputation Power: 0
Send a message via ICQ to 1andy1
Quote:
Originally Posted by mariuz
I would run replace function before script is run (written in any language)


I don't understand.
What does the replace function do?

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > How to pass parameters into SQL script?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT