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

Define normalisation?

0 Answers  


How do we get month name in SQL Server 2000, Oracle, MS Access?

11 Answers  


create table with fields ID, reserved_by,res_date res_date is datefield like 2010-03-09 00:00:00.000 from 2005 to 2006 any date assume based on res_date need to slect table and display based on month (full jan details in database irrespective of date and year

3 Answers  


When columns are added to existing tables, what do they initially contain?

0 Answers  


what are the disadvantages of cursors? : Sql server database administration

0 Answers  






How to list all stored procedures in the current database using ms sql server?

0 Answers  


What are the five characteristics of good data?

0 Answers  


What are approximate numeric data types in ms sql server?

0 Answers  


Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?

0 Answers  


What are cursors?

8 Answers  


What is field in algebra?

0 Answers  


WHAT IS THE DIFFERENCE BETWEEN CANDIDATE KEY ,COMPOSITE KEY AND PRIMARY KEY. THAN U.

1 Answers   Synergy,


Categories