Toad World® Forums

More on Code Complete


#1

When I typed the query below, after typing the “>=” and a space, the list of
table fields pops up. Not sure why this would need to show up as I have almost
never compared one field to another field in the same table. Is this the desired
action?

image003.jpeg
image003.jpeg


#2

[ Attachment(s) from =?ISO-8859-1?Q?S=2E_Ercan_Y=FCzbasioglu?= included below]

Matt, this has always been the default behavior. I agree, this behavior
doesn’t make much sense to me as well. I rarely compare two columns in where
clause. I don’t think this is a common practice either, unless you join
tables with commas. Besides, this behavior forces you to hit escape every time.

The behavior that I would prefer is either do nothing, or (depending on the
datatype and operator) list the first N possible values, as if I expanded the
column with ctrl+space. See my screenshot for an illustration.

My suggestions for other cases:

  • If dataype is datetime or int and operator is > or >=, show minimum value of
    column (or max value for
  • If dataype is datetime or int and operator is = or IN, show first N values or
    show nothing.
  • If float or real, do nothing.

Columns can be listed below as well, for the ones who are happy with the current
behavior. Of course everybody has a different style, but I personally would
prefer it that way.

Cheers
Ercan

On Tue, Dec 21, 2010 at 4:54 PM, Matt Sprygada
wrote:

When I typed the query below, after typing the ">=" and a space, the list of
table fields pops up. Not sure why this would need to show up as I have
almost never compared one field to another field in the same table. Is this
the desired action?

image003.jpeg