statement (of account)
Receive
ID_receive Date_receive Amount_receive TO_receive
From_receive Description_receive
1 2010/01/01 500 Bank Ahmed Payment
from the account
2 2010/02/01 700 Bank Ahmed Payment
from the account

Payment
ID_payment Date_payment Amount_payment From_payment
To_payment Description_payment
1 2010/03/01 1000 Ahmed Sales Sale goods
2 2010/04/01 1500 Ahmed Sales Sale goods

How can crate Stored Procedures for the statement (of
account) from these tables?
I want statement (of account) like this: (in sql 2005)
ID_ name description debit account credit
account balance







statement (of account) Receive ID_receive Date_receive Amount_receive TO_receive From_receive De..

Answer / prasanthi

create procedure sp_givesomename(@Id_Receive varchar(50))
as
select Id_Receive+'_'+Description_Receive+'debit account
credit account balance:'
+Amount_Receive from dbo.Receive where
Id_Receive=@Id_Receive

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Explain difference between control flow and data flow?

0 Answers  


What is the purpose of data source?

0 Answers  


What is the function of sql server agent windows service?

0 Answers  


What are the steps you can take to avoid “deadlocks”?

0 Answers  


how to update a null value field in sql server eg a table contains 3 fields id,name,salary and 3 records salary of 1 record is null i want update the nullfield 111 arun 300 112 ddd 200 113 ttt null i want to update table with add 100 to every record include null after updation the recrds should be 111 arun 400 112 ddd 300 113 ttt 100

6 Answers   ABC, HCL,






What is a user-defined function in the sql server and what is its advantage?

0 Answers  


What is Lock table in SQL?

0 Answers   Wipro,


Mention a few common trace flags used with sql server?

0 Answers  


What is database white box testing?

0 Answers  


What is bcp? When does it used?

0 Answers  


How to delete duplicate rows from table except one?

0 Answers  


What is the difference between a view and a stored procedure?

0 Answers  


Categories