SQLTeam.com | Weblogs | Forums

How to write this query ?need help


I have a tabel name tbl_fr
it has several fields

i want query that takes Bill_month and Batch_no as input form the user to retrieve
specific month and batch no data.my database name is HHU.

FROM  HHU.dbo.tbl_fr
WHERE batch_no   = @batch_no
AND   bill_month = @bill_month


How are you getting the input from the user? What type of application / language / platform?

That won't make any difference to the actual SQL you need, but people here may be able to advise on how you send the query from the application to the SQL Server.


sqlserver 2005. i m using sqlcmd to access the requied data


OK, but how are you getting the input from the user - i.e. the criteria Parameters for the report such as Bill_month and Batch_no ?