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.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Migrating from MDB to ADP
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

muzzettemm
Posting Yak Master

USA
212 Posts

Posted - 03/24/2007 :  02:04:41  Show Profile  Reply with Quote
this query that a user created gives you a dialog box "like the edit parameters" box and you can put the month and year in yourself and it generates a report. Now I have one for searching my subforms last name field

ALTER FUNCTION dbo.SearchLName
(@Enter_SubjLastName nvarchar(100))
RETURNS TABLE
AS
RETURN ( SELECT     dbo.Report.[Incident Report No], dbo.Subjects.SubjFirstName, dbo.Subjects.SubjLastName, dbo.Report.TypeOfIncident
FROM         dbo.Report INNER JOIN
                      dbo.Subjects ON dbo.Report.[Incident Report No] = dbo.Subjects.[Incident number]
WHERE     (dbo.Subjects.SubjLastName = @Enter_SubjLastName) )



This is a function and you enter in the last name and it generate a report for you, now from what I see hes doing the same thing but with Month and Year, does that make sense??





Edited by - muzzettemm on 03/24/2007 02:07:36
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2019 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000