OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Need Help with MSAccess SQL Union Query Conversion to OO

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
phillfri
Newbie
Newbie


Joined: 19 Nov 2003
Posts: 2

PostPosted: Thu Nov 20, 2003 3:21 am    Post subject: Need Help with MSAccess SQL Union Query Conversion to OO Reply with quote

I have an SQL Union Query that I can run 'directly' against my MSAccess data source. But I want to covert the SQL code to native OO SQL code for portability reasons, and I can't seem to make it work. Can someone help me out with this conversion? The MSAccess SQL code is as follows:

SELECT `EKKO`.`EBELN`, RIGHT( `EKKO`.`LIFNR`, 6) AS LIFNR, `LFA1`.`NAME1` FROM `EKKO` INNER JOIN `LFA1` ON `EKKO`.`LIFNR`=`LFA1`.`LIFNR`
UNION SELECT `Documents`.`EBELN`, Right(`Documents`.`LIFNR`, 6), `LFA1`.`NAME1` FROM `Documents` INNER JOIN `LFA1` ON `Documents`.`LIFNR`=`LFA1`.`LIFNR` ;
Back to top
View user's profile Send private message
Barix
General User
General User


Joined: 02 Dec 2003
Posts: 26

PostPosted: Tue Feb 03, 2004 9:16 am    Post subject: Reply with quote

I have the same problem.. submitting the query via an OO macro I've no problem, then I try to update an existing query in the data source and seems to be no problems, but when I try to run the query in the data source window (F4) I get an error.

Do there is another way to "merge" results from two different queries in a unique query to use with the mail merge function?
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Tue Feb 03, 2004 10:41 am    Post subject: Reply with quote

Quote:
when I try to run the query in the data source window (F4) I get an error.

Turn " Run SQL Directly" on and retry
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group