Solved

Reusing constant String declarations over several procedures

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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Generating a Format File in Sybase ASE BCP 1 1,203
SQL Syntax 6 400
SQL Update query 9 362
How to check if Database softwares installed on Windows Server 3 19
The advancement in technology has been a great source of betterment and empowerment for the human race, Nevertheless, this is not to say that technology doesn’t have any problems. We are bombarded with constant distractions, whether as an overload o…
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

828 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