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

‘Order by’ is not allowed in a view how can you sort information from a view?

0 Answers  


What is RAID and what are different types of RAID configurations?

8 Answers   Wipro,


How do you use DBCC statements to monitor various aspects of a SQL server installation?

1 Answers  


What is the contrast amongst drop and truncate?

0 Answers  


How to delete multiple rows with one delete statement in ms sql server?

0 Answers  






How does clustered and non clustered index work?

0 Answers  


Difference between 2NF &3NF ?

0 Answers   Cap Gemini,


What is Schema? and why we use schemas?

4 Answers  


Explain full-text query in sql server?

0 Answers  


What is inline table-value user-defined function?

0 Answers  


Define full outer join in sql server joins?

0 Answers  


what is the use of database index(apart from the last searching of records) and what is the use of composite key?

1 Answers  


Categories