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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help writing an If statement

Status
Not open for further replies.

JJ297

Programmer
Jun 27, 2007
30
0
0
US
Hello I'm a newbie to programming and need help writing an if statement.

I have a database set up in SQL with the following fields:

Category Questions Answers

I only want one category to appear for all of the questions and answers submitted for that category. The way I have it set up now all if a question is submitted for the same category then the category will list twice and a one question under each other.

How do I write something if I Dim Category

If it's the same category but a different question just list that question under that category. If it's a new category list that category and the questions and answers under that
 
This is a job for your frontend or reporting engine not for SQL Server.

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
MVP VFP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top