IT SOLUTIONS
Your TECHNOLOGY partner! 
-Collapse +Expand
Paradox
Search Paradox Group:

Advanced
-Collapse +Expand Paradox Group Home
-Collapse +Expand Message Board
-Collapse +Expand Paradox KB
-Collapse +Expand Paradox To/From
To/FromCODEGuides
-Collapse +Expand Paradox Study Test
PRESTWOODCERTIFIED
-Collapse +Expand Paradox Store
PRESTWOODSTORE
-Collapse +Expand Members Only

Prestwood eMagazine

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

   ► MB LobbyCorel Paradox / ObjectPAL Coding Board     Print This   

QBE & SQL Topic

Query by Example and Paradox SQL (A.K.A. Local SQL)
 Show:
New Activity New Threads Oldest Unanswered Most Active Most Read
  


25 Threads:

Add New ThreadRandom Thread

Thread 25 of 25
Thread Starter  

Gar.L
Running multiple SQL (DDL) scripts against Paradox
HI, Does anyone know of a (free) utility to run multiple SQL (DDL) statements/scripts against a Paradox database?  Ideally used for deployments (where you are updating a database with more than one SQL script) and you don't want to manually run one script after another. Thanks
6 months ago
Nothing New Since Your Last Visit
290
Hits

Thread 24 of 25
Thread Starter  

John.C
Problem with Delete QBE Queries
We are currently experiencing a problem with 16bit Paradox 7.  When I run a delete query (QBE) the query completes and we would assume that all the data that we want to remove has been removed. However, when we check the table we ran this query on only some of the data has been removed.  So we run the query again..  When we check the table more of the data has been removed but some is still left. We have to repeat this multiple times before all the data is gone.  Each time we repeat it we don't modify the query - its the same one we ran 1st time around. What could be causing this problem and how can we solve it? I would appreciate all advice offered regarding this question. Best Wishes John
16 months ago
1 Reply:

A. I. Breveleri
Post the QBE.  Try to cut and paste it -- don't retype it.  Also, describe the structures of the tables referenced by the QBE.  Include validity constraints and secondary indices. -Al.
16 months ago
Nothing New Since Your Last Visit
1104
Hits

Thread 23 of 25
Thread Starter  

jlockley
"out of memory error when running query by form
Query by form script gives "out of memory " error at a set point . Large query. Have tried resetting shared memory but not memory location in BDE. Any ideas here what could be done? ,
24 months ago
Nothing New Since Your Last Visit
736
Hits

Thread 22 of 25
Thread Starter  

Shores
Creating a new logical column with false values
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? :),
24 months ago
3 replies. Last post:

Dan
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.
24 months ago
Nothing New Since Your Last Visit
1220
Hits

Thread 21 of 25
Thread Starter  

John.G2
Paradox for Windows Desktop has stopped working
I recently bought a new computer  (Core i7, 3.33 GHz, Windows 7 64 bit) and then installed and upgrade to  WP office X15, including Paradox 11.I've been doing this kind of query of decades and had no trouble before., Now,  when I make a QBE I get the usual answer table, but when I go to Query, Properties, Structure and change the query structure order and then  click the Run the Query button the following message appears:  Paradox for Windows Desktop.  Paradox for Windows Desktop has stopped working.  It says it will try to find a solution but never does.  Paradox then closes down.Occasionally, it crashes as above when I only go to Query and then click on Properties., I did a reinstall of Paradox which did nothing and also a reinstall of WPO5.  Still have the problem.  Every other function of Paradox 11 seems to work fine., Any suggestions about how I can cure this problem?  Thanks,JG,
30 months ago
3 replies. Last post:

peterbell
I, too, have experienced this problem with my installation of Paradox 11 (from WPO X5) on Windows 7. Everything seems to work fine except in two (quite important) circumstances:First, as mentioned above, if I try to save a QBE in which the field order has been modified.Second, when I work in SQL and run the SQL with the SQL query open (in edit mode), the query runs, produces an answer, and then gives the dreaded Paradox for Windows Desktop has st...
25 months ago
Nothing New Since Your Last Visit
3356
Hits

Thread 20 of 25
Thread Starter  

jlockley
Logical field in query by form
A query launched via pushbutton from a form reads (shortened below)It functions perfectly until it begins to parse the logical fields which are activated by check boxes on the form. The check boxes have the values "TRUE" and " " (void) , The syntax error is "error incompatible types"  How would the parameters for a logical field read?Identifying stExec as  String  reports that there is no field "False" in mainrol.db. I must have missed one check box when I altered the unchecked value to void, but it is passing the value as the field name. Changing the input to a labeled field (enter "TRUE") will probably work, but I'd like to know how to handle a logical field. Any thoughts appreciaated.method pushButton(var eventInfo Event), , var,   stNAME                            String ,  stExec         &...
30 months ago
1 Reply:

Jo_Lynne.L
Answer to self:1) Declaring as string worked for a bit. Now not passing value to the query. 2) The negative value on the query form must be blank. If set to False, only those records with the value false in the logical field will be called up. The checked  value remains TRUE (Or yes, whatever is desired
30 months ago
Nothing New Since Your Last Visit
1097
Hits

Thread 19 of 25
Thread Starter  

brationer1
Networking Paradox 9
My company has intentions of running Paradox 9 on Server 2008.  The Operating System on most of our computers  is Windows 7 Pro.  Is this a good idea? Will we require an expensive  'top notch' network person to facilitate this.  Please advise me. Thank you very much.
34 months ago
1 Reply:

mprestwood
Sure, this will work well. Just stay away from Vista which it sounds like you are. If you need help, you can post here for free or you can open a support account: Support Account - http://www.prestwood.com/services/support/
34 months ago
Nothing New Since Your Last Visit
1085
Hits

Thread 18 of 25
Thread Starter  

riskmansea
Value to a query-push button on a form
Attempting to set up a form to query customer information by entering the account number. I copied the code from the guide but it fails. The debug highlights the word enter on the  sACCOUNT =  Enter ACCOUNT.value line. Appreciate any help. ;Button :: pushButton, method pushButton(var eventInfo Event),  var ,   sACCOUNT String,   qryCustomer  Query ,   tv TableView ,  endVar  sACCOUNT =  Enter ACCOUNT.value  qryCustomer = Query Answer: :WORK:ANSWER.DB CUSTOMER MASTER.DB|ACCOUNT|NAME|ADDRESS 1|ADDRESS 2|CITY|STATE|ZIP|PHONE|, |..~sACCOUNT|CHECK|CHECK|CHECK|CHECK|CHECK|CHECK|CHECK|CHECK|CHECK| EndQuery   qryCustomer.readFromFile("\\\\Sultanmain\\acctg\\PDOX\\CUSTOMER MASTER") ,   qryCustomer.executeQBE(":WORK:answer.db") ;// run the query   ,   tv.open(":WORK:answer.db")      ;// display the results ,  , endMethod
34 months ago
1 Reply:

Dan
Try this if Account is a field on the form then this should work sACCOUNT =  ACCOUNT.value if Enter_Account is the field name then sACCOUNT =  Enter_ACCOUNT.value otherwise you could use sACCOUNT.view(" Enter the ACCOUNT value")
34 months ago
Nothing New Since Your Last Visit
799
Hits

Thread 17 of 25
Thread Starter  

brationer1
Using the function
Can "Today()" be used in a QBE or a Report? I am trying to use it in order to find the number of years an employee or a group of employees worked. Something like: "(today() - Employee's Employment date)/ 365.25" I can copy the data to a spreadsheet and get a result, but this not what I need. 
35 months ago
3 replies. Last post:

mprestwood
You can base a report off of a QBE file. When the report opens the report, it first runs the QBE then uses the answer table. So, the first step is to create a QBE that generates an answer table with the correct data. Have you gotten that far? Do you have a QBE that shows the correct data? After that, you can use ObjectPAL to pass in values to the QBE to tailor each run of the report.
35 months ago
Nothing New Since Your Last Visit
1408
Hits

Thread 16 of 25
Thread Starter  

simd01
Using MS SQL as back end
I need to set MS SQL up as the back end to a large multi-user paradox 10 app and am having trouble finding discussions of the issues involved. Can someone either point me to the relevant documents or briefly describe the various problems one is going to confront in achieving this?Many thanks.
37 months ago
2 replies. Last post:

simd01
Robert,many thanks for that. I had been using the SQL link but that was the problem. Once I set up the ODBC DSN and then an alias as you suggested I was up and running. Thanks again - you've made my day.Simon
36 months ago
Nothing New Since Your Last Visit
1414
Hits

Thread 15 of 25
Thread Starter  

hedrickr
Paradox 11 Help Not Working
Hello all, I am a devoted Paradox user who recently upgraded from Paradox 9 to Paradox 11 (via WordPerfect Office X-4). I had repeated probelms with P9 upon upgrading to Windows 7. P11 seems to be much more stable using Windows 7. My problem is this: The F1 Help key does not work when editing in Object Pal. In previos versions, I could merely put the cursor on a keyword or ObjectPal method, press F!, then help would come up showing me a description and examples for the command. Now when I press F1 in P11, nothing happens.

41 months ago
1 Reply:

mprestwood
Hi Raymond, Did you ever fix your Paradox help file problem with Windows 7? I do know that you have to download the old Windows help program from Microsoft for it to work. Did you do that? Here's an article I wrote that may...
40 months ago
Nothing New Since Your Last Visit
1174
Hits

Thread 14 of 25
Thread Starter  

Cfolkes
Find duplicate data in a column using query
I have a multiple column table which has a column "A" I want to query "A" and show an answer of all duplicates found.
50 months ago
Nothing New Since Your Last Visit
1759
Hits

Thread 13 of 25
Thread Starter  

castrow
Show partial records in paradox Answer table
Hi guys I've got tons of questions regarding paradox with so little time to figure things out. I hope you can help me as soon as possible.  I wrote SQL in paradox to show the results in an Answer table. Let's say I run my query and get a total of 100 records. Now I only want to show 1/4 of it so I need to show 25 records only in the Answer table. Does anyone knows how to do this? *Reminder: the total number of records is dynamic and sometimes I need to divide the total into 5, 4, 3, 2 and the like.. Thanks in advance!
50 months ago
Nothing New Since Your Last Visit
1031
Hits

Thread 12 of 25
Thread Starter  

castrow
Primary key and SQL
I'm a noob with paradox and I want to know if it is possible to set a primary key to an existing table using the SQL in paradox? I want to set 2 fields as primary keys. I tried doing it via table resturcture but it keeps giving me the error "Record size is too big for table". Help please thanks!
50 months ago
Nothing New Since Your Last Visit
900
Hits

Thread 11 of 25
Thread Starter  

lcwing
Select records unique only in one field
My table has the following fields: Last Name Full Address Zip I have several records which have the same Full Address but different Last Name. I want to select unique Full Address but want all fields to be in the result. I don't care which Last Name is chosen to be in the result. Example: Williams      123 Main St Apt 3B        10028 Lee               123 Main St Apt 3B        10028 Adams         123 Main St Apt 3B        10028 I want the result to include only one of these records. The result can be any of these records (any Last Name) but I only want one 123 Main St Apt 3B in the result, PLUS I want all 3 fields to be included in the result. I know I can select only the Full Address and get unique records but Last Name and Zip won't...
50 months ago
4 replies. Last post:

mprestwood
Hi A.I., I do appreciate all your posts. What were you trying to do that lead to problems? What are you seeing? I saw you had some garbage characters in there usually caused by copy/paste, I edited those out. I played with the post a bit to try and figure out what you were seeing. Anyway, let me know and I'll dig into it. Mike
50 months ago
Nothing New Since Your Last Visit
1348
Hits

Thread 10 of 25
Thread Starter  

tony-jordan
Sporadic "Permission denied." Query Errors
I have a Paradox for Windows app I developed more then ten years ago.  Recently my client has experienced inconsistent "Permission denied." errors when attempting to process certain queries.  The errors state that permission is denied in accessing some table in the private directory (typically INSERTED and CHANGED, though in one case, it's a custom table I put in that directory).  Most of these errors have happened on a Vista PC (Pdox 9.0 and 11.0), though a few have occured on an XP machine (Pdox 11.0).  The majority of the errors were in a particular process called "Recalc" that involves a series of hundreds of queries, while a few were ad hoc queries (no objectPAL) on an XP PC.  Since I've started tracking the errors, I have found four different queries in the "Recalc" process that have spawned the errors.  The errors usually occur when the entire process is run at once.  If I run the process in chunks (the program is desig...
53 months ago
8 replies. Last post:

mprestwood
You're welcome Tony. Glad it worked out.
52 months ago
Nothing New Since Your Last Visit
3318
Hits

Thread 9 of 25
Thread Starter  

piolenc
QBE error: unrelated questions
 (Paradox 9 under W2K) I'm building a query to enter new prices in a calculated field called PRICE, using different formulas depending on the values in certain other fields of the same table. I built and tested the selection criteria first. They work: the five lines of the  query together select every record of the table exactly once. The trouble starts when I add the CALC statements - one formula for every selection criterion. I get the error message: "Query appears to ask two unrelated questions" unless the CALC statements are identical (which defeats the purpose). There are no duplicate example elements, and when I leave the example elements in place and delete the CALC statements that use them, there's no error. It seems that I'm allowed a useful query or a working one, but not both.
55 months ago
7 replies. Last post:

A. I. Breveleri
Read your private messages for more help.Or, if the combined QBE is not large, post it here. Also post the table structure if you have time.-Al.
54 months ago
Nothing New Since Your Last Visit
1639
Hits

Thread 8 of 25
Thread Starter  

wirwl
Problem with Query
Hello! There are problem in query: Can't process this query remotely. This is part of code: q_first=Query, ANSWER: :PRIV:blankRazr1.DB, REGISTR.DB | | | : |, | Checkplus _join1, _join4!, ~company | Check ~d1 | Check ~d2 |, REGISTR.DB | | | |, | Check ~num1 | Check |Check |, ::Company.DB | | | |, | _join1 | Check | Check |, ::Company.DB | | | |, | _join2 | Check | Check |, ::Company.DB | |, | _join3, calc (_join2+", "+ _join3) as "" |, :PRIV:blankRazr4.DB |KPP_DOWN | STATUS_HI_PP |INN | OGRN |, | _join4 | check |Check | Check |, EndQuery, , if not q_first.executeQBE(":PRIV:blankRazr1.DB") then, errorshow(), return, endif, ---------------------------------------------------------------------------------------------------------------- In one workstation this problem have, in another workstation i'm not see this problem. We use Paradox7. And in report some data from InterBase database (need authorization with login in password). What the problem? Any suggestions? p.s.so...
56 months ago
1 Reply:

mprestwood
What is the error on the one workstation that has the error? Are you still having this error?
56 months ago
Nothing New Since Your Last Visit
1243
Hits

Thread 7 of 25
Thread Starter  

clh3332
QBE to find non-matches
I am relatively new to Paradox and making my way by reading the documentation as well as the Prestwood books. Recently I ran across the following problem: My clients track projects in their various phases, and are supposed to enter the completion of each phase in various tables (not my deisgn, but it works).  Sometimes people forget to update the completion of a phase; leaving out the documentation of an earlier phase while entering the occurrence of a later phase. I can write a QBE query that joins TableEarlier to TableLater on the ProjectNo, and by including the inclusion operator (!) on join1 of TableLater, pick up those records in TableLater that do not have matching ID in TableEarlier, which is what we are looking for. The results of the query feed a report for project managers.  My problem is that I can not select ONLY those records that do not have a matching ID.  I get all records, including those without a match. If I were writing the query in SQL,...
57 months ago
1 Reply:

greens
if you have an answer with extra data, you can always do a 'delete' query on the answer table, but here's the basic 'not it' query example you wanted.. master | key field    |                 | Check _a! | detail    | key field   |                &nbs...
57 months ago
Nothing New Since Your Last Visit
1371
Hits

Thread 6 of 25
Thread Starter  

alexrtmn
QBE Specifications
On my current contract I have to deal with a pretty big application based on Paradox 4.5 for DOS. They do have PAL manuals, but not Paradox User's Guide. So, I am looking for something like Paradox QBE specification. The name of KB Article #100311, "QBE Specifications", looks very promising. However, I couldn't find any content in there. Is it only my problem? Thanks.  
57 months ago
10 replies. Last post:

Alexandre_Roitm
Thanks. I can see it already. However, this can be said of almost every old DOS-times in-house application. I migrated one of them from XTrieve and QBasic to MS SQL Server just a few years ago, in 2005. It was a very special accounting system they could not buy from the shelf. No word of documentation, of course, and quite meaningful comments in code. Something like "save x into y".
57 months ago
Nothing New Since Your Last Visit
1550
Hits

Thread 5 of 25
Thread Starter  

davidc
QBE excluding records
Howdy, I know there should be a way to do this, but I can't figure it out. Here's a greatly simplified version of what I'm trying to do:Table: Events; Fields: PersonID, Event, Place The result I want is something like: a list of everyone who has Event="Visit" and Place="Rome" but does not also have an Event="Died"I can do it as a 3 step process easy enough, but I'd rather do it in the query itself.(The 3 step process is: do the query for Visit, Rome. Do a 2nd query on Died. Subtract the 2nd table from the 1st.) Any suggestions? 
5 years ago
3 replies. Last post:

Dan
I'm not even sure that you can get that result in a QBE.  You can use SQL in paradox to get the result.  Based on the example table the SQL would look something like.   SELECT DISTINCT PersonID, FROM "Events.db" , where PersonID in (SELECT DISTINCT PersonID,                             &nb...
5 years ago
Nothing New Since Your Last Visit
1638
Hits

Thread 4 of 25
Thread Starter  

jontower
Programming with QBE results

Hi - My wife and I have taken over Administration of a large Amateur Theatre company in London - the only salaried position (as a jobshare).  We have inherited "interesting" old procedures and equipment, including a PC running Windows 98 and a Paradox-based Box Office system called Databox.  It is my wish to develop better-looking sheets of daily bookings for the Box Office volunteer staff to use.  I have managed so far to create QBEs that select the desired data, but seat numbers have been defined as alphanumeric (by the Databox people, so I can't change the definition), with the result that they are sorted thus:26, 27, 3, 33, 34, 4, instead of 3, 4, 26, 27, 33, 34.  I have 25 years' experience of programming, so I can cope with adding zeroes on the left and taking a three-character right substring, but the help in Paradox 7 doesn't give me enough idea as to how/where to insert this code so as to produce the required query results.I should be grateful for spe...
5 years ago
2 replies. Last post:

mprestwood
Hi Jon,I noticed you started subscribing to our monthly eMag but you still need to verify your email. Once you verify your email, you will receive one email per month containing Paradox and Visual Basic content (the two groups you chose).If you verify your email this month, you'll receive the Feb Issue which also contains some useful information on virtualization features Microsoft introduced with Vista.
5 years ago
Nothing New Since Your Last Visit
1276
Hits

Thread 3 of 25
Thread Starter  

S 0 n Y
large table/multi table Query Question
Lets say you have a table with customer information and the table has about 30 fields with 1 million records, this table is nearing 2 gigs, and eventually this table will become corrupt.I have made a program that has made about 20 or so smaller tables with all the information from the customer information table in these tables. I am testing this because i am trying to keep these tables small so queries and scripts will run faster because they wont have to search thru a million records and to bypass the 2gig corrupt problem.But the only problem i have come across is something like this: What if i wanted to do a query on all the people that live in Louisiana, i would have to write a long script with all the tables to find the information i needed, and i do alot of queries on the almost 2 gig table, anyone have any idea of a way i could query these tables quickly or have any ideas at all ?
6 years ago
7 replies. Last post:

S 0 n Y
Id like to thank everyone for their posts and ideas, i have been thinking on what i should do based on the ideas and thoughts you guys have given me, SQL would be great but i am not sure my boss would want to pay all the money for it haha, we do have over a million customers, and i have been trying a few different methods using the data normalization methods i read about on the site ( Thanks Mike ). When i finally decide on what is best or i thin...
6 years ago
Nothing New Since Your Last Visit
1060
Hits

Thread 2 of 25
Thread Starter  

FlaglerMuseum
No Subject
Hi,I have Paradox 9 and whenever I try to save a query with more than one Filter (F12) I get an error message that reads "The Query is Too Long" when I try to re-open it.  Is this a problem area for Paradox or is their something I can do to remedy? Thanks, Teresa
6 years ago
2 replies. Last post:

Dan
 RE:
I've never run into this problem with paradox 9 and I've built some fairly large queries.  Does the query run and give you the results you expect?  How many fields does your table have?  Are you including (checking) all the fields in both instances of the table?  Have you attempted to filter the table without using F12?  Put your filter into the appropriate field of the table and run the query.  You probably don...
6 years ago
Nothing New Since Your Last Visit
1155
Hits

Thread 1 of 25
Thread Starter  

Cfolkes
Deleting duplicate records
I have 4 tables each with Two Alpha fields., Field1 contains the code number of a runners "Toe Chip" (Electronic ID - A7). , Field2 contains the time of day "hh:mm:ss. As the runner passes the sensor, the chip number and time is recorded by the hardware. , Problem: Runners often wander back thru the chute thereby creating a second (or more) record., Is there a query method that will take the first value received and reject all others *without* changing the order of the codes?, Any suggestions if a query is not possible?
7 years ago
1 Reply:

A. I. Breveleri
What do you mean, "*without* changing the order of the codes"?., , This query will extract the data you want, sorted by toechip ID:, , :RaceData:Section1.db | ToeChip | SensorTime | , | Check | calc min as "SensorTime" | , , If you want the records sorted by sensor time, you'll need to sort or index the query result., , -Al.
7 years ago
Nothing New Since Your Last Visit
942
Hits

New Thread
-
  Load Time=less than 1 second.
 
Print This
-
 
Have a question? Need our services? Contact us now.
--Mike Prestwood

Call: 916-726-5675

email: info@prestwood.com


461 People Online Now!!  
Online Now: Sign In to see who's online now!  Not a member? Join now. It's free!
Show More...


©1995-2013 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech