[nfbcs] Counting parentheses
Vincenzo Rubano
vincenzo.rubano at studio.unibo.it
Mon Oct 26 17:52:54 UTC 2015
Hi,
another technique that I often use if I know that I’l be using a lot of parentheses in my statements is to put the right paren immediately after writing the opening one and then moving back a character to get to the point where I should write the statement wrapped by the parentheses.
Also, using a Braille display helps me a lot with this kind of tasks.
Vincenzo Rubano
Sito Web:
http://www.nvapple.it
Sito Web personale: http://www.titengodocchio.it
Il giorno 26 ott 2015, alle ore 18:44, Tracy Carcione via nfbcs <nfbcs at nfbnet.org<mailto:nfbcs at nfbnet.org>> ha scritto:
Jim, I'm just using Notepad, or editing in the New Query panel in SQL
Server. Should I be using something more sophisticated?
John and Gary, I'm trying to do what you said, but some of the closing
parens are a long way from the opening ones. Guess my brain needs more
exercise. And thanks John--clearly I'd better stick to betting the
ponies, and stay far away from Vegas. :.)
Aaron, it never occurred to me I could buy a new abacus. I'll look into it.
Tracy
Oh lord that sounds Tedious <grin>
I don't know what editor you're using, but most editors have paren
balancing keystrokes you can use to bounce between the opening and
closing paren. I've used this to great effect to figure out where
I've dropped a paren.
Jim
On Mon, Oct 26, 2015 at 12:18:35PM -0500, John G Heim via nfbcs wrote:
Listen to the sql query a character at a time adding 1 to the count each
time you cursor over a left paren and subtracting one each time you
cursor
over a right paren. It's like how they count cards in Vegas.
The only problem with this method is that you might get to the end of
the
query and discover that you are missing a parenthesis but it might not
be
clear where. What I would do in this case is do it again, this time
listening for the point where I know I should subtract 1 instead of add.
Or
just take a shot and put a right paren at the end which is almost always
the
solution anyway.
On 10/26/2015 12:01 PM, Tracy Carcione via nfbcs wrote:
I am having trouble keeping track of parentheses in complicated SQL
statements. Perhaps when I know SQL better, it will be less confusing.
Sometimes I have an abacus handy to keep track of counts, but not
always.
What methods do people use to make sure there is a ) for each (?
Thanks.
Tracy
_______________________________________________
nfbcs mailing list
nfbcs at nfbnet.org<mailto:nfbcs at nfbnet.org>
http://nfbnet.org/mailman/listinfo/nfbcs_nfbnet.org
To unsubscribe, change your list options or get your account info for
nfbcs:
http://nfbnet.org/mailman/options/nfbcs_nfbnet.org/jheim%40math.wisc.edu
--
John Heim, jheim at math.wisc.edu<mailto:jheim at math.wisc.edu>, 608-263-4189, skype:john.g.heim,
sip:jheim at sip.linphone.org
_______________________________________________
nfbcs mailing list
nfbcs at nfbnet.org
http://nfbnet.org/mailman/listinfo/nfbcs_nfbnet.org
To unsubscribe, change your list options or get your account info for
nfbcs:
http://nfbnet.org/mailman/options/nfbcs_nfbnet.org/jbar%40barcore.com
_______________________________________________
nfbcs mailing list
nfbcs at nfbnet.org<mailto:nfbcs at nfbnet.org>
http://nfbnet.org/mailman/listinfo/nfbcs_nfbnet.org
To unsubscribe, change your list options or get your account info for
nfbcs:
http://nfbnet.org/mailman/options/nfbcs_nfbnet.org/carcione%40access.net
_______________________________________________
nfbcs mailing list
nfbcs at nfbnet.org<mailto:nfbcs at nfbnet.org>
http://nfbnet.org/mailman/listinfo/nfbcs_nfbnet.org
To unsubscribe, change your list options or get your account info for nfbcs:
http://nfbnet.org/mailman/options/nfbcs_nfbnet.org/vincenzo.rubano%40studio.unibo.it
More information about the NFBCS
mailing list