Search Wiki:

How can I Prepare My Question to Increase the Possibility of Getting a Good Solution?
Arnie Rowland, Mar 13, 2008

When folks first come to the MSDN Forums seeking help with a particular problem, they often don't realize that if a little more effort were taken to prepare the Problem Presentation, it would significantly increase the chances of having the Volunteers on the MSDN Forums help them work out an acceptable solution.

It will increase the probabilty of getting 'good' and useable suggestions to solve your problem, IF, as well as the Problem Description, you would include Table DDL and Sample Data in the form of INSERT statements, an illustration of the Desired Results, and any Query Strategies that you have attempted so far. Providing the SQL Server Edition and Version may also help in determining the options available for solving the problem.

When a problem is presented with Table DDL and Sample data as in the section below, it is easier for folks here (please remember, they volunteer their time and effort to try to help you) to set up your problem in their Test Environment and try alternatives until a solution is found. The less 'set up' work that has to be done, the more likely you are going to have folks tackle your problem and help you. Without the Table DDL and Sample data, fewer folks will go to the trouble of trying to work out your problem. When preparing the Table DDL and Sample Data, please include all Columns that are necessary for JOIN and FILTER (WHERE) criteria -columns that are only named in the SELECT part of the statement may not be required.

Often, without this extra effort from you, we are just playing guessing games.

Remember
  1. Problem Description
  2. Table DDL and Sample Data
  3. Desired Results
  4. Query Strategy


Create Sample Data
This example uses a @Table variable, but a 'regular' table that is scripted out of your database is quite OK.
Please do NOT provide private or protected information
 
-- Suppress data loading messages
SET NOCOUNT ON
 
-- Create Sample Data using a Table Varable
DECLARE @MyTable table
   (  RowID           int   IDENTITY, 
      Category        varchar(5),
      [ID]            varchar(5),
      [Description]   varchar(25),
      Price           decimal(10,2)
   )
 
-- Load Sample Data
INSERT INTO @MyTable VALUES ( 'Pot', 'A1', 'Small Saucepan', 21.50 )
INSERT INTO @MyTable VALUES ( 'Pot', 'A2', '1 Qt Saucepan', 29.95 )
INSERT INTO @MyTable VALUES ( 'Pot', 'A3', '1.5 Qt Saucepan', 33.95 )
INSERT INTO @MyTable VALUES ( 'Pot', 'A4', 'Double Boiler', 39.50 )
INSERT INTO @MyTable VALUES ( 'Pot', 'A5', 'Stewpot', 49.50 )
INSERT INTO @MyTable VALUES ( 'Pot', 'A6', 'Pressure Cooker', 79.95 )
INSERT INTO @MyTable VALUES ( 'Pan', 'B1', '8"" Pie', 6.95 )
INSERT INTO @MyTable VALUES ( 'Pan', 'B2', '8"" Sq Cake', 7.50 )
INSERT INTO @MyTable VALUES ( 'Pan', 'B3', 'Bundt Cake', 12.50 )
INSERT INTO @MyTable VALUES ( 'Pan', 'B4', '9x12 Brownie', 7.95 )
INSERT INTO @MyTable VALUES ( 'Bowl', 'C1', 'Lg Mixing', 27.50 )
INSERT INTO @MyTable VALUES ( 'Bowl', 'C2', 'Sm Mixing', 17.50 )
INSERT INTO @MyTable VALUES ( 'Tools', 'T1', '14"" Spatula', 9.95 )
Return to Top

To obtain the SQL Server Edition and Version, execute the following Query:
SELECT @@Version
 
-- The Results will be something like this:
 
-------------------------------------------------------------------------------------------
Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) 
	Mar 23 2007 16:28:52 
	Copyright (c) 1988-2005 Microsoft Corporation
	Developer Edition on Windows NT 5.2 (Build 3790: Service Pack 2)
 
(1 row(s) affected)
Return to Top

For additional help, refer to:
http://www.aspfaq.com/5006
http://classicasp.aspfaq.com/general/how-do-i-make-sure-my-asp-question-gets-answered.html )

Return to Top
___________________________________________________________________________________________________________________
Page Created By: Arnie Rowland, Mar 13, 2008
Last edited Apr 25 2008 at 7:35 PM  by ArnieRowland, version 26
Comments
jamiet wrote  Jan 19 2009 at 12:39 PM  
I would like to add one extra piece of advice. If you wish to get more informtion about an error the please provide the full error description in the post (all it usually takes is copy and paste). I am constantly stunned by amount of posts I see that state "I received an error when doing XXX" but don't provide the error message.

-Jamie

Updating...
Page view tracker