Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Reusing constant String declarations over several procedures

Posted on 2004-04-13
1
Medium Priority
?
348 Views
Last Modified: 2008-03-06
Hi all,
I need to use a lot of constants in several procedures. Is there any way to reuse them without writing all of them in all my procedures?

I'm looking for something like the 'include' clause of C programs

TIA
David.
0
Comment
Question by:dgomezl
1 Comment
 
LVL 10

Accepted Solution

by:
bret earned 375 total points
ID: 10813523
There really isn't anything like that built into the isql client.

However, why look for something "like" the c preprocessor?  Just use the c preprocessor itself - it really isn't specific to the c language itself and will do it's work on many other kinds of files.

Depending on your package, the c preprocessor is sometimes a standalone program, other times it is bundled into the c compiler.  However, there is usually an option to just run the preprocessor on the sourcefile and display the resulting output.

You could, for instance, keep your source in files with a ".sql" extention and "post-processed" with ".SQL".  You would transform the file and install the procedure by doing
something like

cc -E myprocedure.sql > myprocedure.SQL
isql -Usa -P -i myprocedure.SQL
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Transferring FSMO roles is done when an admin wants to split roles between certain Domain Controllers or the Domain Controller holding the Roles has been forcefully demoted using dcpromo / forceremoval
In this article, the configuration steps in Zabbix to monitor devices via SNMP will be discussed with some real examples on Cisco Router/Switch, Catalyst Switch, NAS Synology device.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question