Solved

Reusing constant String declarations over several procedures

Posted on 2004-04-13
1
338 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 125 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

How do we balance the user experience (UX) with reasonable security measures? It can be done, if you keep these fundamentals in mind.
Binary Differential Replication, What it is, how it works and how it differs from standard delta file replication
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

815 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now