We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Sybase 12.5.1 vs 12.5.3

KAVINASH1313
KAVINASH1313 asked
on
Medium Priority
821 Views
Last Modified: 2012-06-27
In Sybase version 12.5.1 the select statement as attached throws error but in Sybase 12.5.3 version it runs fine.
I further checked and saw that when I comment below line :-

AND exists(select 1 from zzzzzz c where td.something_cd=c.something and td.something2 between c.something4StartRange and c.something4EndRange)    

and run the query in 12.5.1 it runs fine. I think it is version issue .can you please confirm this and with some detail ( any sybase bug link) then it will be really great. a quick answer is highly appreciated.
Issue.txt
Comment
Watch Question

Kamaraj SubramanianApplication Support Analyst

Commented:
Hi,

In you sub query

you are misisng the table alias for the td. You are using td.something_cd (but you didnt define the table name)

select 1 from zzzzzz c where td.something_cd=c.something and td.something2 between c.something4StartRange and c.something4EndRange
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
(I can't download the attachmt ... but the alias refers to a table in the outer query, which by definition is not in the subquery.)

Both 12.5.1 and 12.5.3 are quite ancient, six and seven years out-of-date, respectively.  Is there some reason you are unable to use the current version 12.5.4 of 20 Apr 2009 ?

IIRC, yesm, there were changes specifically to handling subqueries and derived tables between 12.5.1 vs 12.5.2 vs 12.5.3 vs 12.5.4, when the issue finally settled down.  Good code was fine, but sub-standard code and code that took advantage of undocumented operation (which was corrected in some later version or demand-changed due to ANSI compliance issue) did break.  And if it wasn't corrected properly in 12.5.2, then it broke again in 12.5.3.  (The same thing is happening with 15.0 and that certainly has not settled down yet; I am not recommending it.)  The nasty bit was, there were no errors, just a changed result set.  

IIRC It was documented in the New Features Guide and the Cover Letter, but I no longer have such ancient versions handy.

I can still find a few ancient CRs (Solved Cases) that relate to the problem, but this is for supported customers and partners only (if you had a support contract, I am sure you could get it yourself).  But I did not find anything in the public domain.  Maybe you can spend some time googling.
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
I agree with you guys.....that I am stuck the prod is the older one...can't change :-(....however, I did a workaround with temp tables....avoided the derived table and managed to get it working. Thanks for your information though...I really appreciate.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.