Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1415161718»»»

Forum Etiquette: How to post data/code on a forum to get the best help Expand / Collapse
Author
Message
Posted Friday, May 27, 2011 11:10 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, October 1, 2014 6:12 AM
Points: 60, Visits: 179
Lynn,
Thanks for that post. It made me realize how I can improve some of my own queries.

The light came on.

This is a fantastic thread.
Post #1116406
Posted Thursday, September 8, 2011 6:29 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Friday, September 12, 2014 4:57 PM
Points: 582, Visits: 453
Never mind advice on forum posting, excellent though it is. I bookmarked this article as "Export table contents into flat file."

Next thing I'll do is write a query to generate the QUOTENAME query for a given table.

P.S.: Oh wait, I have bookmarked it before.
Post #1172221
Posted Friday, September 9, 2011 8:43 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 1:53 PM
Points: 35,366, Visits: 31,905
They say a compliment is a good thing. Two by the same person on the same subject is a sure thing. Thanks, Olga.

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1172897
Posted Monday, December 24, 2012 3:52 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, December 24, 2012 3:48 AM
Points: 3, Visits: 1
i have a table under below-
tblEmp(eid int primary key identity(1001,1),
ename varchar(100),Eaddress varchar(100),
estate varchar(100),
loc varchar(100),
doj date,
dob date,
edesc varchar(200))
now when i insert this

insert into tblEmp values('Rakesh Kaushik','Nalagarh','abc','2001-01-11','12001-01-11',1,1,1)

i got error Operand type clash: int is incompatible with date
pls help me
Post #1399858
Posted Monday, December 24, 2012 5:33 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:16 AM
Points: 40,194, Visits: 36,599
Please post your problem in a new thread. Thanks


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1399868
Posted Wednesday, March 27, 2013 12:16 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, October 19, 2014 10:19 PM
Points: 178, Visits: 581
Are you kidding me? someone posts into a discussion on forum etiquette asking a new question and breaking most of the rules of forum etiquette in the process!


Anyway.... I'm suprised sqlfiddle isn't used more to assist in setting up a test bed - it's all over Stackoverflow.com. I guess people like to have the source in the question, not in another site.

http://sqlfiddle.com/


My forum posting has got to the point where I will post a very general answer just to work out whether the original poster is even giong to get back to the question, before I fully engage in answering.
Post #1435779
Posted Wednesday, March 27, 2013 3:22 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 2, 2014 9:55 AM
Points: 2, Visits: 84
Nice article.
Only comment I would add is that I find your indentation makes the code difficult to read for me.

So with this:


   FROM #MyTable v,
(--==== Derived table "fs" finds ID of the first row
-- where stanation of VALUE occurs
SELECT MIN(ID) AS FirstIDOfStagnation
FROM #MyTable v,
...

I find the following easier to read


SELECT v.*
FROM #MyTable v,
(--==== Derived table "fs" finds ID of the first row
-- where stanation of VALUE occurs
SELECT MIN(ID) AS FirstIDOfStagnation
FROM #MyTable v,
...

Post #1435805
Posted Wednesday, March 27, 2013 7:59 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 1:53 PM
Points: 35,366, Visits: 31,905
Guy Thiebaut (3/27/2013)
Nice article.
Only comment I would add is that I find your indentation makes the code difficult to read for me.

So with this:


   FROM #MyTable v,
(--==== Derived table "fs" finds ID of the first row
-- where stanation of VALUE occurs
SELECT MIN(ID) AS FirstIDOfStagnation
FROM #MyTable v,
...

I find the following easier to read


SELECT v.*
FROM #MyTable v,
(--==== Derived table "fs" finds ID of the first row
-- where stanation of VALUE occurs
SELECT MIN(ID) AS FirstIDOfStagnation
FROM #MyTable v,
...



To each their own. I have a similar problem with code that's left justified with no separation between key words and the objects of those words. Other than my particular taste for readability, the reason I use such a vertically aligned format is so that I can easily select vertical segments of code using the "Alt" key.

As I've said many times, the quickest way to start a fight with someone is to tell them how to format their code for readabilty. The only reason why I even brought it up in the article is because the formatting of some questions is so poor that you spend more time trying to reformat it to be able to read it than you do actually solving the problem. Some reasonable form of indentation is always better than, say, 585 characters on one line like I've run into many times in the past.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1435917
Posted Wednesday, March 27, 2013 8:11 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 7:17 AM
Points: 13,085, Visits: 12,549
nick.mcdermaid (3/27/2013)
Are you kidding me? someone posts into a discussion on forum etiquette asking a new question and breaking most of the rules of forum etiquette in the process!


Anyway.... I'm suprised sqlfiddle isn't used more to assist in setting up a test bed - it's all over Stackoverflow.com. I guess people like to have the source in the question, not in another site.

http://sqlfiddle.com/


My forum posting has got to the point where I will post a very general answer just to work out whether the original poster is even giong to get back to the question, before I fully engage in answering.


I have never heard of sqlfiddle until now. Does it come with a users manual? I tried creating a table and then running some sql. All it does is no work for me. I assume I am not using the tool the way the author intended but if I can't figure it out I assume there is something missing in the intuitive portion. It looks clean but I can't figure out how to use it or what it is for.


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1435924
Posted Wednesday, March 27, 2013 8:14 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 2, 2014 9:55 AM
Points: 2, Visits: 84
Absolutely, and thanks for not reacting to my style issues.
You are right - it's a case of degree and a one line joined query is way harder to read than an indented piece of code.
Post #1435929
« Prev Topic | Next Topic »

Add to briefcase «««1415161718»»»

Permissions Expand / Collapse