Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Stored Procedure Troubles

Status
Not open for further replies.

JMCarroll

Programmer
Jan 14, 2001
1
AU
Hi
I am currently trying to develop a report based on an SQL Server 2000 stored procedure.
SELECT Sum(Balance), Count(Loans), PostCode, ?(Suburb)
FROM Loans
WHERE @Date = ReportDate
GROUP BY Postcode
----------------
A Postcode can have many suburbs, so what I need to do is find a way to represent suburb grouped as a string (hence the ?). Is this possible? We had previously done this report in MS Access using seperate nested sub-reports for the Suburb, but unfortunately can not do this with Crystal.
 
I would try creating a user function, that you pass the post code and it creates a cursor, and scans through it adding each suburb name.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top