Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Sybase > Problem in View

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-25-08, 07:48
karthi_syb karthi_syb is offline
Registered User
 
Join Date: Jun 2008
Location: India
Posts: 58
Problem in View

Hi Guys,

I have written a view like

create view w1
as
Select eno,ename
from Emp
union
select eno,emane
from Emp1

But while executing i got the below error message.

Server Message: Number 197, Severity 15
Server 'DEV', Line 4:
Set operators may not appear within the definition of a view.

what is the problem ?

Inputs are welcome !
Reply With Quote
  #2 (permalink)  
Old 06-25-08, 10:58
karthi_syb karthi_syb is offline
Registered User
 
Join Date: Jun 2008
Location: India
Posts: 58
I am using 12.0 version
Reply With Quote
  #3 (permalink)  
Old 06-25-08, 13:24
trvishi trvishi is offline
Registered User
 
Join Date: Sep 2003
Location: Switzerland
Posts: 370
Quote:
Originally Posted by karthi_syb
Hi Guys,

I have written a view like

create view w1
as
Select eno,ename
from Emp
union
select eno,emane
from Emp1

But while executing i got the below error message.

Server Message: Number 197, Severity 15
Server 'DEV', Line 4:
Set operators may not appear within the definition of a view.

what is the problem ?

Inputs are welcome !

You are using "set" somewhere? The SQL you pasted should work, but check the actual SQL you ran.
Reply With Quote
  #4 (permalink)  
Old 06-26-08, 04:12
shiya shiya is offline
Registered User
 
Join Date: Mar 2007
Posts: 29
Hi Karthi,

Sybase 12.0 doesn't support using UNION in view definition. All other versions from 12.5 support this feature.

To make it work you need to upgrade your version.

Regards,
Shiya
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On