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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-04-01 : 09:15:18
|
Moez Vallani writes "I have a table of Rules which describes formulas for a type. Here is the table format:Rule TypeID RTypeID RTSecID A 100 100 1C 100 100 2B 100 200 1D 100 200 2A 100 300 1I 100 300 2B 100 400 1N 100 400 2G 100 400 3 Basically for each TypeID there will be formulas created so in this example for TypeID 100 the formulas are listed for different RTypeIDA + CB + DA + IB + N + GHow can I use one SQL Statement to return this 4 records above?Thanks " |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2002-04-01 : 09:20:52
|
| select typeid,rtypeid, sum(rtsecid)from tablenamewhere typeid=100group by typeid,typeidHTH-------------------------------------------------------------- |
 |
|
|
Nazim
A custom title
1408 Posts |
|
|
|
|
|