-Collapse +Expand
Paradox
Search Paradox Group:

Advanced
Paradox To/From
To/FromCODEGuides
Paradox Store
PRESTWOODSTORE

Prestwood eMagazine

February Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyCorel Paradox / ObjectPAL Coding BoardQBE & SQL Topic   Print This     

Creating a new logical column with false values

Creating a new logical column with false values in QBE & SQL topic (part of our Corel Paradox / ObjectPAL Coding group).

Quick Search: Creating   logical   Creating new   Creating new logical   column false  
Shores
Bologna, -- IT

Hi everybody!

In the table resulting from a QBE I need to have a new column of the logical type containing all false values.

I was used to type CALC 1 AS NEWFIELDNAME  to generate a new longint field named NEWFIELDNAME having the default value of 1.

So, I tried doing CALC FALSE AS NEWFLAG, but that syntax produces a new STRING field containing the word "FALSE"... :)

I then thought that CALC 1<>1 AS NEWFLAG would do the trick, but that simply isn't accepted by the QBE parser...

Any ideas? :)

Frelance IT consultant and programmer since 1991: www.atipica.it

 Posted 15 years ago (Thread Starter)
Comment Quote
About Shores
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #14617, 3 replies
Thread Started 5/28/2011 4:56:42 PM
View Counter=3511
Last Reply Posted 5/30/2011 6:03:53 PM)
Location=Bologna, -- IT 
Joined=17 years ago   MB Posts=11   KB Comments=3  
Daniel Fought
Prestwood IT
Home office in Fresno, CA.

First thought.  Create table with two fields.  One field that will link to some field in your existing table, say a longint.  The other field a logical field.  Create a single record with some value in the longint and a false in the logical.  Link this table to the table in the qbe using the inclusive opperator on the longint field.  It is not necessary to include the longint but you will want to include the logical.

Dan Fought
Senior Programmer Analyst
Prestwood IT Solutions
http://www.prestwood.com

 Posted 15 years ago
Comment Quote
About Daniel Fought
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Daniel Fought
Danial Fought is a senior programmer analyst with Prestwood IT where he develops custom Windows software and custom websites. When Dan is not coding for clients, he participates in this online community. Coding specialties include Paradox/ObjectPAL, MS Access, Visual Basic, and VS.Net/VB.Net.

Post ID #14618 (Level 1.1)  Reply to 14617
Thread Started 5/29/2011 5:40:32 AM
Location=Home office in Fresno, CA. 
Joined=24 years ago   MB Posts=401   KB Posts=12   KB Comments=4  
AIBreveleri

This will work but you need to deny the join, that is, select the record from the helper table that does NOT match each record in the queried table:


:projdata:sometable.db | Somecolumn | Othercolumn |

                       | Check _j1! | Check       |


:homedata:BoolDual.db | SameTypeAsSomecolumn | BoolWithFalse |

                      | not _j1              | Check         |

-Al.

 Posted 15 years ago
Comment Quote
About AIBreveleri
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #14619 (Level 2.1)  Reply to 14618 and Parent is 14617
Thread Started 5/30/2011 2:14:23 PM
Location= 
Joined=25 years ago   MB Posts=286   KB Comments=8  
Most Recent Post
Daniel Fought
Prestwood IT
Home office in Fresno, CA.

Yep, that will work.   However there is an outside chance that the values will match.  You will need to make sure the value in the helper table has a value that does not exist in the joined table.

Dan Fought
Senior Programmer Analyst
Prestwood IT Solutions
http://www.prestwood.com

 Posted 15 years ago
Comment Quote
About Daniel Fought
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Daniel Fought
Danial Fought is a senior programmer analyst with Prestwood IT where he develops custom Windows software and custom websites. When Dan is not coding for clients, he participates in this online community. Coding specialties include Paradox/ObjectPAL, MS Access, Visual Basic, and VS.Net/VB.Net.

Post ID #14620 (Level 3.1)  Reply to 14619 and Parent is 14617
Thread Started 5/30/2011 5:52:16 PM
Location=Home office in Fresno, CA. 
Joined=24 years ago   MB Posts=401   KB Posts=12   KB Comments=4  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1147A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #14617 Counter
3511
Since 5/28/2011
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2026 Prestwood IT Solutions.   [Security & Privacy]