TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Soner Gonul
NA
8
9.3k
SQL Group By Error
Apr 5 2011 4:58 AM
Hello
I have a SQL like this;
SELECT
..........
.........
(CASE WHEN GECIKME_CV(:TAR,B.HESAP_NO, 90, 9999, B.DOVIZ_KOD) > 0 THEN 100 ELSE 0 END) AS PROV,
.......
.......
FROM S_TEKLIF B
WHERE .........
..........
GROUP BY ........., ........, (CASE WHEN GECIKME_CV(:TAR,B.HESAP_NO, 90, 9999, B.DOVIZ_KOD) > 0 THEN 100 ELSE 0 END),......
I want to change this SQL like this;
SELECT
..........
.........
(CASE WHEN GECIKME_CV(:TAR,B.HESAP_NO, 90, 9999, B.DOVIZ_KOD) > 0 THEN 100
WHEN B.HESAP_NO IN (SELECT HESAP_NO FROM S_TAKIP_MUSTERI) THEN 100
ELSE 0 END) AS PROV,
.........
FROM S_TEKLIF B
WHERE .........
..........
GROUP BY ........., ........, (CASE WHEN GECIKME_CV(:TAR,B.HESAP_NO, 90, 9999, B.DOVIZ_KOD) > 0 THEN 100
WHEN B.HESAP_NO IN (SELECT HESAP_NO FROM S_TAKIP_MUSTERI) THEN 100
ELSE 0 END),......
But this query doesn't work. Getting a GROUP BY error.
I attach my full code this post
Attachment:
new text document.rar
Reply
Answers (
2
)
Store Procedure not working
Delete Multipal Record Query ?