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 |
|
Ranjani
Starting Member
1 Post |
Posted - 2005-11-17 : 08:35:35
|
| I have the following requirementJourn_id Seq_no Line_no AA 1 1 AA 1 2 BB 2 1 BB 2 2 BB 2 3Please let me know if there is a direct sql statement without using cursors , triggers or any local variables.The first seq_no column can be derived using the "identity" concept.Please provide your suggestions to popualte the Line_no with a single query using aggregate or any functions |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2005-11-17 : 08:40:25
|
| Homework?CODO ERGO SUM |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-11-17 : 09:10:02
|
| What is your actual data look like?MadhivananFailing to plan is Planning to fail |
 |
|
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2005-11-17 : 10:08:53
|
| Oh, this DEFINITELY looks like homework. "Please provide your suggestions to popualte the Line_no with a single query using aggregate or any functions" Can we show our work on a separate page if we run out of space? |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
karuna
Aged Yak Warrior
582 Posts |
Posted - 2005-11-18 : 02:32:03
|
quote: Originally posted by blindman Oh, this DEFINITELY looks like homework. "Please provide your suggestions to popualte the Line_no with a single query using aggregate or any functions" Can we show our work on a separate page if we run out of space?
Either a homework or should had been asked in some interview.ThanksKarunakaran |
 |
|
|
|
|
|