Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL: Internal error.
Message
From
21/05/2001 05:08:32
 
 
To
20/05/2001 23:45:04
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00509312
Message ID:
00509354
Views:
19
Gavin,
No idea why you get the error. Two things you could try:
- move the table join from the WHERE clause and use an INNER JOIN
- try using ATC(ALLTRIM(loadfile.searchstr1), ALLTRIM(client.company)) > 0 instead of $

HTH

>Hi John,
>
> I tried your idea, and I get the same result. I thought it was using ALLTRIM and UPPER in the SQL ( which I do quite frequently with no problems ) that was causing the problem. I removed the ALLTRIMs and UPPERs and still got the same Error. I changed the $ to an = to see if that would work and it ran through without an error, although this no longer gives me the output that I desire. It appears that SQL sometimes doesn't like the $, although I've never run into problems with it before. I thought maybe one table or both of my tables were corrupt, and I tried a similar SQL statement on 2 other tables and still encounter the same error message. I've even tried rebooting and I still have the problem.
>
> I'm going to try a different approach to this seemingly simple SQL statement ( don't know what it is yet though !!! ).
>
>Thanks for your help,
>Gavin...
>
>>Hi Gavin,
>>
>>No firm ideas, but a WAG is that mixing the two DBF types is giving VFP a headache. Why not create a preprocess table with "client" with SELECT * FROM client INTO cursor VFPclient and then use VFPclient in your query? Who knows, might actually work :-)
>>
>>>
>>>I'm getting an error 'SQL: Internal error.' when issuing the following SQL Statement:
>>>
>>>
>>>SELECT * ;
>>>    FROM loadfile, client ;
>>>    WHERE NOT EMPTY(loadfile.searchstr1) ;
>>>    AND UPPER(ALLTRIM(loadfile.searchstr1)) $ ALLTRIM(UPPER(client.company))
>>>
>>>
>>>Loadfile is a VFP6.0 table and client is a FPW2.6 Table. Searchstr1 and Company Fields are both defined as C(55).
>>>
>>>The online help states the following:
>>>
>>>
>>>SQL: Internal error (Error 1800)
>>>An internal error has occurred.
>>>
>>>Record your recent actions while using Visual FoxPro and then call Microsoft
>>>Support.
>>>
>>>
>>>The Technical Writers must have been up all night thinking about this one !!!
>>>
>>>What I'm trying to achieve is to find a group of clients using a partial match on Company Name, E.g. if Searchstr1 contained 'Bunbury' then I want to find all occurences in the Client table that contain 'Bunbury' somewhere in the Company Name Field.
>>>
>>>Any Ideas as to what the problem might be?
>>>
>>>Thanks,
>>>Gavin...
Daniel
Previous
Reply
Map
View

Click here to load this message in the networking platform