Solved

need some idea of adding sequel  statements

Posted on 2013-05-21
10
215 Views
Last Modified: 2013-06-27
Hello,

I need some idea where I need to append a stored procedure with some select statements everytime I get a new request and once I add the procedure should have all the ones I added till now, those are all select statements with unions etc

I can describe in detail but am trying luck just like this as of now
0
Comment
Question by:welcome 123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
10 Comments
 
LVL 41

Expert Comment

by:Sharath
ID: 39185906
Can you explain your question in detail? May be you can explain with some examples.
0
 
LVL 38

Accepted Solution

by:
Gerwin Jansen, EE MVE earned 500 total points
ID: 39185955
Like calling your procedure with a select statement that gets stored in a table for that procedure and where the procedure is calling a 'join' of each stored select statement?

in pseudo code:

yourProc ('some select statement')
begin
  if supplied statement not in table with select statements
    insert supplied statement into table
    concatenate select statement(s) from table into sql statement
    execute sql statement
end;
0
 
LVL 29

Expert Comment

by:MikeOM_DBA
ID: 39208857
Your requirements are not clear:

I need some idea where I need to append a stored procedure with some select statements
-- Append where? from where? to what?
...everytime I get a new request
-- From what source? what request?
and once I add the procedure should have all the ones I added till now, those are all select statements with unions etc
-- What does this mean?

You need to post examples of source and expected results, etc...
:p
0
PowerShell Core for Advanced Linux Administrators

Understand advanced principals around Powershell Core with a focus on the Linux Administrator.  This course covers how to administer numerous environments across multiple platforms including Linux, Azure, AWS, and Google Cloud from a single shell instance.

 

Author Comment

by:welcome 123
ID: 39239014
I aplozise for the delay let me ask a part of my issue:

I have a stored procedure which has a set of sql statements and every time I get new data I add some extra sql statements to that procedure and run and replace some values in those insert statements and now I have to automate the entire process so in this context should I add a table and have all values stored there and have a unix script to read and pass values to the stored procedure ? or is there a better way to do in informatica?
0
 
LVL 29

Expert Comment

by:MikeOM_DBA
ID: 39239223
If you have the money to license Informatica -- go for it!
Otherwise you could put the new data in a text file and load using SQL*Loader or External table.
0
 

Author Comment

by:welcome 123
ID: 39242853
how will you do it in informatica?
0
 
LVL 29

Expert Comment

by:MikeOM_DBA
ID: 39245183
You have not responded to my questions:
1) How/from where do you "get new data".
2) What is that you "add some extra sql statements to that procedure" What does this mean?
3) What does "run and replace some values in those insert statements"?

If you have Informatica license, you would know what to do -- why do you ask?

This whole process could be summarized as follows:

1.- You have (need) a source for the data in an "electronic" format (spreadsheet, text file, another database, etc...

2.- You create the data mapping and transformations from source to target

3.- You set the sequence of tasks

4.- You schedule the job

;)
0
 
LVL 5

Expert Comment

by:magento
ID: 39261830
You can use HERE DOC

isql -Uuser -Ppass -Hserver << EOF

**sql here

EOF

BR,

Magento
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 39262001
@magento - Your suggestion does not match the question that is asked here...
0
 
LVL 5

Expert Comment

by:magento
ID: 39264921
Gerwinjansen,

Apologies, in that case .

BR,

Magento.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

636 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