Wednesday, March 28, 2012

Read this first! FAQ for DBForums Microsoft SQL Server forum

The current version of Microsoft SQL is SQL 2005.

If you are running a different version of Microsoft SQL, it is your responsibility to state what version you are using (for example, SQL 2000, service pack 2). If you don't include information about what version of Microsoft SQL you are using, we'll assume that you are running SQL 2005 and the answer that we give you may or may not work with the version of Microsoft SQL that you are using.

Kudos to r937 for reminding me to include this version information in our FAQ

General Topics

What is a FAQ? (http://www.dbforums.com/showthread.php?t=1212452#post4527529)
How to ask a question to get quick and correct answers? (http://www.dbforums.com/showthread.php?t=1212452#post4527530)
How do I "join the community"? (http://www.dbforums.com/showthread.php?t=1212452#post4527531)
What does Microsoft have to say about group participation? (http://www.dbforums.com/showthread.php?t=1212452#post4527533)

Homework

How NOT to ask for help! (http://www.dbforums.com/showthread.php?p=6226875#post6226875)

SQL Server Topics

How do I get DDL for my tables? (http://www.dbforums.com/showthread.php?t=1212452#post4527532)An FAQ is a list of Frequently Asked Questions in a forum, newsgroup, or other (presumably online) place. These are questions that regularly appear because pretty much everybody asks them at one time or another. This is a really good place to look for a general "look and feel" for both the forum itself, the people who post there, and the topic in general.

FAQ Index (http://www.dbforums.com/showthread.php?t=1212452)|||Originally posted by Brett Kaiser, updated by Pat Phelan

Please state your problem in the context of a business requirement. Please do not force a narrowly focused technical solution, which may or may not be of any value.

It may also be a distraction to what the actual solution would be. To aid in the solution please do the following if possible

1. State the question

"How do I find the earliest row entered"

2. Please post the DDL of your tables (Including Indexes, and constraints)

Like

CREATE TABLE myTable99(Col1 int IDENTITY(1,1), Col2 char(1), Col3 datetime, PRIMARY KEY (Col1))

3. Post some sample data in the form of DML

Like

INSERT INTO myTable99(Col2, Col3)
SELECT 'a', '01/01/2005' UNION ALL
SELECT 'b', '02/01/2005' UNION ALL
SELECT 'c', '03/01/2005'

4. Post whatever DML that you have attempted already...

SELECT * FROM myTable99 a CROSS JOIN myTable99 b

5. Post the expected results

Col1 Col2 Col3
---- -- ----------------
1 a 2005-01-01 00:00:00.000

Good Luck. If these instruction are followed, you will most likely get an answer in minutes.

And don't forget to use [ code] [ /code] tags when posting code, just eliminate the spaces I have used here.

FAQ Index (http://www.dbforums.com/showthread.php?t=1212452)|||Originally posted by Brett Kaiser, updated by Pat Phelan

First and foremost, just join in! Ask or answer a question, add a comment to an existing message thread, or stop by the Yak Corral (http://www.dbforums.com/showthread.php?t=989246).

You can also add yourself here:

http://www.frappr.com/dbforums

FAQ Index (http://www.dbforums.com/showthread.php?t=1212452)|||Originally posted by Brett Kaiser, updated by Pat Phelan

1. Go to Enterprise Manager.

2. Open the database folder to display all of the tables.

3. Right Click on the table(s) you want.

4. Choose Menu options All Tasks>Generate SQL Scripts

5. Look at the dialog, there are three tabs. Make sure you pick all the correct options (indexes, keys, ect)

6. Click Preview.

7. Copy and paste the code.

FAQ Index (http://www.dbforums.com/showthread.php?t=1212452)|||See their Knowledgebase article 555375 (http://support.microsoft.com/kb/q555375).

FAQ Index (http://www.dbforums.com/showthread.php?t=1212452)|||In discussion of poor practices in another forum, we unearthed some old threads here that demonstrate the wrong way to ask for help. If you want examples of how NOT to ask for help, these are some good examples!

With thanks to Blindman for bringing these posts back to public view, and to R937 for suggesting that they be imortalized!

The Introduction (http://www.dbforums.com/showthread.php?t=1607194)

It gets better! (http://www.dbforums.com/showthread.php?t=1607193)

Taking this process a few steps further:

1) If you are asking questions for a course, please say so up front. We need to take a different approach when helping you with homework than we do with folks that simply need an answer to a "real world" problem.

2) It helps us a great deal if you can post a link to the assignment, or if you can scan the assignment and post it with your questions. That way we know exactly what the assignment requires, and we can infer a lot about what they're trying to get you to learn in the assignment.

3) Don't expect us to just do your homework for you. Life isn't like that, and you'll cheat yourself more than you can cheat the school/teacher if all you do is copy what someone else has done for you. We'll be glad to help, but you really don't want to turn us loose on your homework assignment... We can be evil! :D

4) If you have a partial solution worked out, or have at least tried something, post that too. If we can see what you've tried, we can probably help you a lot more than if we "start cold" because we can then see more of how you're thinking and where we can help.

FAQ Index (http://www.dbforums.com/showthread.php?t=1212452)

No comments:

Post a Comment