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

[Solved] UNION statement syntax error .

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


Joined: 18 Feb 2011
Posts: 92
Location: Czech Republic

PostPosted: Wed Mar 09, 2011 2:14 am    Post subject: [Solved] UNION statement syntax error . Reply with quote

I have selects which I want to bind by UNION statement
Code:

SELECT "BOZP_REAL", 'BOZP_REAL' , "JMENO_PRACOVNIKA"
  FROM "Renka_new"
 WHERE "BOZP_REAL" IS NOT NULL
ORDER BY "BOZP_REAL"
UNION
SELECT "BOZP_PLAN", 'BOZP_PLAN' , "JMENO_PRACOVNIKA"
  FROM "Renka_new"
WHERE "BOZP_PLAN" IS NOT NULL
ORDER BY "BOZP_PLAN"

but it pop-ups error “The given command is not SELECT statement"
What do I do wrong .
Thanx for advice

Cenda


Last edited by Cenda on Wed Mar 09, 2011 3:03 am; edited 1 time in total
Back to top
View user's profile Send private message Yahoo Messenger
Cenda
Power User
Power User


Joined: 18 Feb 2011
Posts: 92
Location: Czech Republic

PostPosted: Wed Mar 09, 2011 3:02 am    Post subject: It all of sudden begins to work . Reply with quote

It all of sudden begins to work and I don’t know why . I’ve just manipulated with „Run SQL command directly“ icon in query design window .
Cenda
Back to top
View user's profile Send private message Yahoo Messenger
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