473,326 Members | 2,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Seems simple - But how (Stored procedures)?

Situation: Stored procedure 1 which is related with Stored procedure 2
which has parametar.

Does anyone knows how to transfer value of some field from stored
procedure 1 to parametar in stored procedure 2?

Regards.

Jan 16 '06 #1
3 1184
le*****@yahoo.com wrote:
Situation: Stored procedure 1 which is related with Stored procedure 2
which has parametar.

Does anyone knows how to transfer value of some field from stored
procedure 1 to parametar in stored procedure 2?

Regards.


Sure - I know some ways, but to answer your question, I need to know the
context. Under what circumstances and for what reason are you wanting
to pass a result from one sp as a parameter to antoher?
Jan 16 '06 #2
Thanks for your response.
In SP1 I have, beside others, fields Article and Date and the same
fields + field AvgPrice in SP2. I want to calculate avg price for some
article until some date. Fields articles are related 1-to-1 and I get
corect avgprice without date limit.
Now, I would like to compare Dates and set criteria like: Date from SP2
<= Date from SP1.

Regards,

Jan 16 '06 #3
le*****@yahoo.com wrote:
Thanks for your response.
In SP1 I have, beside others, fields Article and Date and the same
fields + field AvgPrice in SP2. I want to calculate avg price for some
article until some date. Fields articles are related 1-to-1 and I get
corect avgprice without date limit.
Now, I would like to compare Dates and set criteria like: Date from SP2
<= Date from SP1.

Regards,


It sounds like what you want are tabular functions, not stored
procedures (assuming you're on SQL Server 2000 or newer). You can use
tabluar functions like views except that you can pass parameters to
them, so you can do a select that joins the output of fn1 and fn2 based
on some criteria.
Jan 18 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: jrefactors | last post by:
I want to know the differences between SQL Server 2000 stored procedures and oracle stored procedures? Do they have different syntax? The concept should be the same that the stored procedures...
2
by: scott | last post by:
Hi, Just wondering what sort of problems and advantages people have found using stored procedures. I have an app developed in VB6 & VB.NET and our developers are starting to re-write some of the...
2
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
2
by: Eli | last post by:
Hi all We currently have a strange problem with calling a Stored Procedure (SQL Database) in our C# Project. The only error I get is "System error" which says a lot :) Background: We have...
45
by: John | last post by:
Hi When developing vb.bet winform apps bound to sql server datasource, is it preferable to use SELECTs or stored procedure to read and write data from/to SQL Server? Why? Thanks Regards
28
by: mooreit | last post by:
The purpose for my questions is accessing these technologies from applications. I develop both applications and databases. Working with Microsoft C#.NET and Microsoft SQL Server 2000 Production and...
1
by: peaceburn | last post by:
Hi, I'm gonna pull my hair in the coming days with these DB2 stored procedures. So the issue, let's assume a simple stored procedure like this : CREATE PROCEDURE MYSCHEMA.PROCEDURE1 ( )...
11
by: peter | last post by:
I am trying to get a SQL stored procedure to use user maintained MQT implicitly which raises questions on when they are used or not used. In theory you would expect the stored procedure to pick up...
7
by: CSharper | last post by:
Yesterday I had a heated discussion with my colleagues on what is a data centric application and having business logic in sql. I have group of people who wants to include all the business logic in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.