September 6, 2008 at 11:18 pm
What is the best way to format SQL in Latex?
---
Timothy A Wiseman
SQL Blog: http://timothyawiseman.wordpress.com/
September 8, 2008 at 8:02 am
What is latex? I know it is a type of rubber, but I am assuming it means something else in this context.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
September 8, 2008 at 8:22 am
LaTeX - it's a document markup language that's used extensively in academic fields. Based on TeX
Timothy: Personally I'd just use a verbatim block, then you can format it any way you like. That's how I've so far done all code blocks Something like this:
\begin{verbatim}
SELECT ...
FROM Sometable
INNER JOIN SomeOtherTable ....
WHERE ....
\end{verbatim}
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 8, 2008 at 8:38 am
Thanks Gail. I guess that's my one new thing learned for the day, so I can go home now.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
September 9, 2008 at 7:43 am
Jack, to add just a little to what Gail said, it is similar in many ways to HTML except designed specifically for math and science publications.
Gail, Thanks. I have been using verbatim so far and the results seem acceptable, but I was hoping there was something that might be superior or more focused on code.
---
Timothy A Wiseman
SQL Blog: http://timothyawiseman.wordpress.com/
September 9, 2008 at 11:57 am
timothyawiseman (9/6/2008)
What is the best way to format SQL in Latex?
Spackle first to fill in any holes, sand, prime and then use a roller with a 3/8 inch nap. And don't forget to tape off the trim and windows, or you'll splatter everywhere. :hehe:
---------------------------------------------------------
How best to post your question[/url]
How to post performance problems[/url]
Tally Table:What it is and how it replaces a loop[/url]
"stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."
September 9, 2008 at 12:50 pm
I have this horrible thought about SQL in spandex stuck in my head now. Yeah, I know, it's not quite what was written, but it sure is what my eyes saw the first time I noticed this thread.
* Down brain! Bad, bad brain! No tasty-treat for you! *
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
September 9, 2008 at 12:58 pm
Have a look at listings package (http://en.wikibooks.org/wiki/LaTeX/Packages/Listings), also Google (http://www.google.co.uk/search?q=latex+listings). It supports syntax highlighting for many programming languages, including SQL, and produces very nice output.
Gleb
September 9, 2008 at 1:08 pm
GSquared (9/9/2008)
I have this horrible thought about SQL in spandex stuck in my head now.
Could be worse. Could be a SQL consultant in spandex....
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 9, 2008 at 10:32 pm
Gleb, listings is exactly what I wanted. Thank you.
Gail, I agree, a SQL consultant in latex is a scary thought, but SQL code in LaTeX (with listings) can look quite good.
---
Timothy A Wiseman
SQL Blog: http://timothyawiseman.wordpress.com/
September 10, 2008 at 12:24 pm
GilaMonster (9/9/2008)
GSquared (9/9/2008)
I have this horrible thought about SQL in spandex stuck in my head now.Could be worse. Could be a SQL consultant in spandex....
Actually, one (and only one) of the DBAs I know would be just fine in spandex, now that I think about it. (Though, of course, I have no clue what anyone on this site looks like; I'm refering to someone I know in person.)
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
September 11, 2008 at 7:22 am
timothyawiseman (9/6/2008)
What is the best way to format SQL in Latex?
Dunno. I do all my SQL formatting in nylon, with lace undies and diamante jewellery. I prefer dinner suit, bow tie and cummerbund for VBScript, but I only get really down and dirty for Korn shell.
It raises a few eyebrows round the office, but I don't understand why well written code should excite comment.
Semper in excretia, sumus solum profundum variat
September 11, 2008 at 11:23 am
majorbloodnock (9/11/2008)
timothyawiseman (9/6/2008)
What is the best way to format SQL in Latex?Dunno. I do all my SQL formatting in nylon, with lace undies and diamante jewellery. I prefer dinner suit, bow tie and cummerbund for VBScript, but I only get really down and dirty for Korn shell.
Remind me to never watch you code SQL or Korn shell scripts. 😉
---
Timothy A Wiseman
SQL Blog: http://timothyawiseman.wordpress.com/
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply