troubleshooting Question

Group into a cursor and add new columns

Avatar of wayneburr
wayneburr asked on
Microsoft SQL Server 2005
5 Comments1 Solution199 ViewsLast Modified:
I would like to within a Stored Procedure Query a table and qroup the dates, add columns to the cursor to
1-count the rows in the group, 2-number the group.

So, if there is 4 different dates and the records in that date group has 10 rows:
**Group by TESTDATE**
Stabilitydate25_reads_id    Forcastdate   Testread   Testdate             Stabilitydata25_id  Group  GroupRow
111                                        Null               123123     2007-06-04 xxx1    643                    1           1
112                                        ...                   44534      ...                             643                    1           2
113                                        Null                  2342      ...                              643                   1            3
...                                            ...                    ...           ...                              ...                      ...           ...
345                                         Null                76878      2008-02-07 xxx1    643                    2            1
...                                             ...                    ...             ...                             ...                    ...           ...
890                                        Null                  459234    2008-03-14 xxx1    643                    3           1
...
Like that ect in a Cursor from the attached table.

My efforts have not produced the results I expected and would really Appreciate some assitance  
Thanks
stab-layout.jpg
ASKER CERTIFIED SOLUTION
elimesika

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros