Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - base, sql error
base, sql error
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
tlkhorses
Blue Pill


Joined: May 09, 2007
Posts: 1

PostPosted: Wed May 09, 2007 7:46 pm    Post subject: base, sql error

I have posted this over on the openoffice.org base forum but thought I would try here also. Here is a copy of my stuff there... short version:
Ok, I have looked at this until I think I am going crazy. I think I need another set of eyes. Anyway I tried a different tact.
I ran the following in console and it worked:

select Customer.customerid,Customer.lastname,Customer.firstname,Customer.status,CustomerEventLog.username, substring(CustomerEventLog.Text,(locate('-',CustomerEventLog.Text)+1),2), substring(CustomerEventLog.Text,(locate('@',CustomerEventLog.Text)+1),2), substring(CustomerEventLog.Text,(locate('sec',CustomerEventLog.Text)-3),7), InstallTimes.username, InstallTimes.status from Customer, CustomerEventLog, InstallTimes where CustomerEventLog.time > 20070401 and CustomerEventLog.subject like '%survey%' and locate('@',CustomerEventLog.Text)>0 and Customer.customerid = CustomerEventLog.customerid and Customer.customerid = InstallTimes.customerid order by CustomerEventLog.customerid, CustomerEventLog.time, InstallTimes.time;

If I run the following in console I get the same error as my initial post here:

SELECT `Customer`.`CustomerID`, `Customer`.`LastName`, `Customer`.`FirstName`, `Customer`.`Status`, `CustomerEventLog`.`Username`, SUBSTRING ( `CustomerEventLog`.`Text`, ( LOCATE( '-', `CustomerEventLog`.`Text` ) + 1 ), 2 ), SUBSTRING ( `CustomerEventLog`.`Text`, ( LOCATE( '@', `CustomerEventLog`.`Text` ) + 1 ), 2 ), SUBSTRING ( `CustomerEventLog`.`Text`, ( LOCATE( 'sec', `CustomerEventLog`.`Text` ) - 3 ), 7 ), `InstallTimes`.`Username`, `InstallTimes`.`Status`, `CustomerEventLog`.`Time`, `CustomerEventLog`.`CustomerID`, `InstallTimes`.`Time` FROM `powernoc`.`Customer`, `powernoc`.`CustomerEventLog`, `powernoc`.`InstallTimes` WHERE ( `Customer`.`CustomerID` = `CustomerEventLog`.`CustomerID` AND `Customer`.`CustomerID` = `InstallTimes`.`CustomerID` ) AND ( ( `CustomerEventLog`.`Time` > {D '2007-04-01' } AND `CustomerEventLog`.`Subject` LIKE '%survey%' AND LOCATE( '@', `CustomerEventLog`.`Text` ) > '0' ) ) ORDER BY `CustomerEventLog`.`Time` ASC, `CustomerEventLog`.`CustomerID` ASC, `InstallTimes`.`Time` ASC;

If I try to put the first select into base and go to design view I get sql error.
If I try to paste the first select here into the base sql I get sql error (and thats all) when I try to switch to design view.

A bit more on this. In the second SELECT above if I remove the space between SUBSTRING and the ( then that one works also in console. However, trying to put it into base query, it automatically inserts that space back into it.

Any work around for that?

tk
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.