I got tripped up by "! =" when I wanted "!="

Discussion forum about all things older ANSI Team Developer versions.
User avatar
Charlie
Canada
Posts: 288
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

I got tripped up by "! =" when I wanted "!="

Post by Charlie » 10 Jul 2018, 11:36

I've worked with SQLWindows since '93, and it has taken until the past year for me to (twice) get tripped up by a [space] typo in my "not equal" conditions.

Looking back, I'm thinking I've been really lucky, because that is way too easy a mistake. Mind you, once bitten, twice shy. (I wasted a few hours figuring out the problem, just not noticing that stupid space between the [!] and the [=]. These old eyes just ain't what they used to be, ain't what they used to be, ain't what they used to be ...

So heads up !

If I had my way, "not equal" conditions would be handled by "<>" (with or without any number of spaces in between!) instead of "!=". Maybe newer versions of SQlWindows do that ? If not: watch out !

Cheers !
Last edited by Charlie on 11 Jul 2018, 11:59, edited 1 time in total.
A little trick to help direct folk from old Gupta forum to this one: Link to post

FRBhote
India
Posts: 1231
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

I got tripped up by "! =" when I wanted "!="

Post by FRBhote » 10 Jul 2018, 12:17

Happened to me too once!

You can change != to <> with a substitute.

User avatar
Charlie
Canada
Posts: 288
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

I got tripped up by "! =" when I wanted "!="

Post by Charlie » 11 Jul 2018, 11:24

I am full-out deer in the headlights over here, and wildly embarrassed by it.

What do you mean by
change != to <> with a substitute
???
A little trick to help direct folk from old Gupta forum to this one: Link to post

FRBhote
India
Posts: 1231
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

I got tripped up by "! =" when I wanted "!="

Post by FRBhote » 17 Jul 2018, 05:12

In ccod.pdf:
substitute
Use this keyword to specify that the string in the first parameter should replace the
string in the second parameter whenever the first parameter appears in an SQL
statement.
Section [oragtwy]
Syntax substitute=original_string,substitute_string
Description You can have an unlimited number of substitute statements in the initialization
file. However, this statement changes all occurrences of the replaced word in your
SQL statements: operators, WHERE clauses, object names, and literals (but not bind
variables).
The second string can include the first, as in:
substitute=od,odd

But I wonder in which section it is kept for Sqlbase!

thomas.uttendorfer
Site Admin
Site Admin
Germany
Posts: 151
Joined: 05 Mar 2017, 17:19
Location: Munich Germany

I got tripped up by "! =" when I wanted "!="

Post by thomas.uttendorfer » 17 Jul 2018, 07:17

Hi,
you can use a font called Fira Code.

https://github.com/tonsky/FiraCode

When you type "!=" or ">=" etc.
it will be shown as a single mathematical character:
FiraCode.PNG
You can change font in TD IDE in Menu Tools/Preferences/Outline -> choose font.

I really like to use that font in TD.

Regards Thomas
You do not have the required permissions to view the files attached to this post.
Thomas Uttendorfer
[ frevel & fey ] Software-System GmbH
https://thomasuttendorfer.wordpress.com/

User avatar
Charlie
Canada
Posts: 288
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

I got tripped up by "! =" when I wanted "!="

Post by Charlie » 17 Jul 2018, 10:20

FRBhote wrote:
17 Jul 2018, 05:12
In ccod.pdf:
substitute
Use this keyword to specify that the string in the first parameter should replace the
string in the second parameter whenever the first parameter appears in an SQL
statement.
Section [oragtwy]
Syntax substitute=original_string,substitute_string
Description You can have an unlimited number of substitute statements in the initialization
file. However, this statement changes all occurrences of the replaced word in your
SQL statements: operators, WHERE clauses, object names, and literals (but not bind
variables).
The second string can include the first, as in:
substitute=od,odd

But I wonder in which section it is kept for Sqlbase!
Apologies. I meant "!-" in SQLWindows code, not in SQL statements.

Regardless, that's a great reminder for SQL. Thanks !
A little trick to help direct folk from old Gupta forum to this one: Link to post

FRBhote
India
Posts: 1231
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

I got tripped up by "! =" when I wanted "!="

Post by FRBhote » 18 Jul 2018, 12:25

Oops! Apologies

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 0 guests