Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
fdtoo
Starting Member
28 Posts |
Posted - 2006-04-11 : 20:10:02
|
| I have the following fields in table A: GL_ID|GL_Name_VC| Amount |Period_TI|Year_SI=================================================== 1000|liability | -10,000.00 | 08 | 2005=================================================== 1001| asset | 20,000.00 | 08 | 2005=================================================== 1000|liability | -9,000.00 | 09 | 2005the fields above have the following datatype: Fields | Datatype =================================== GL_ID | Integer GL_Name_VC | Variable Character Amount | Integer Period_TI | TinyInteger Year_SI | SmallIntegerThe above database is running on Microsoft SQL Server 2000 and i would like to queryfor a report that looks something as below:Description Amountasset 20,000.00liability (10,000.00) =========== Net Asset 10,000.00 ===========The above report would list 2 columns as Description & Amount, next it would sort the Descriptioncolumn by GL_ID, next by Year 2005 & lastly by Period 08, with a net figure of asset minus liability.Guys, hope someone out there can help me with the sql command for the above report? |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2006-04-11 : 20:24:11
|
| we don't answer homework questions here. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-04-11 : 21:14:22
|
Another similar question. Now i wonders, is this really homework ? KH |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|
|
|