Viewing 15 posts - 1 through 15 (of 36 total)
Thanks alot Mark Cowne. I got the output as I requested.
Once again, Thank you very much.
September 17, 2019 at 3:56 pm
I tried with below SQL it worked :
select a.name,max(b.grp1) grp1,max(b.grp2) grp2,max(b.grp3) grp3,max(b.grp4) grp4 from test a
inner join
(
select
min(name) as name,
sum(case group_name when 'grp1' then 1 else 0 end) as grp1,
sum(case group_name...
December 28, 2013 at 10:49 pm
Suppose I wish to get the name of persons who are in group_name=2 and I got :
aaa,eee,abc,ccc and ddd.
Now, aaa person also belongs to grp3 and grp4, so...
December 28, 2013 at 10:07 pm
Hi,
Thank you for your query. Kindly check is the below sql is correct or not :
update books set book_cat=1 where book_name='.Net'
update books set book_cat=2 where book_name='Oracle'
update books set book_cat=3...
November 7, 2013 at 3:46 am
What if I forgets about row order too i.e. first I should get category name and then any order of books.
Regards
Girish Sharma
November 7, 2013 at 2:39 am
Hi,
Thanks for your reply. I am fully agree with you that this is purely design flaw and since he can not do any changes in the table, so it...
November 7, 2013 at 2:08 am
Thank you Chris for your continue support. Probably I am not able to find a bug in the query but when I am saying :
SELECT *
FROM #Results
WHERE...
October 2, 2013 at 10:27 am
Yes, result of your query match with 1st query output. In my original question, I have posted two more required output based upon output of 1st query. I...
October 2, 2013 at 4:47 am
Thanks Chris. This is giving me output of 1st query. Can you please help me how do I get rest 2nd and 3rd query outputs efficiently. Even...
October 2, 2013 at 4:11 am
Hi Chris,
Thanks for your reply. But I am getting :
Invalid object name '#students'.
and what is g.SetSize please?
Regards
Girish Sharma
October 2, 2013 at 3:27 am
Yes, now I am able to get 3rd output by using Whole query output Except 2nd query output :
select
a.course_id
,a.[Course]
,a.[Rollno]
,a.Description
,a.[Geog Marks]
,a.[Math Marks]
from
(
select
course_id
,min(course_name) as 'Course'
,min(roll_no) as 'Rollno'
,case when count(course_id)>1 then...
October 2, 2013 at 1:49 am
I am able to get 1st and 2nd output from below query :
For 1st output :
select
a.course_id
,a.[Course]
,a.[Rollno]
,a.Description
,a.[Geog Marks]
,a.[Math Marks]
from
(
select
course_id
,min(course_name) as 'Course'
,min(roll_no) as 'Rollno'
,case when count(course_id)>1 then min('Default') else min(student_name)...
October 2, 2013 at 1:22 am
Yes, now no error, no more doubt on this question... only big thanks from mine and my friend side.
We both learnt good stuff with your and Luis Cazares's great replies.
Regards
Girish...
July 23, 2013 at 9:56 am
Hi Sean Lange,
Thanks for correcting me for pronounce the name and I am sorry or my mistake on it. Since, I am an Oracle DBA, and actually this question...
July 23, 2013 at 9:40 am
I am really thankful to SSCrazy Eights and You (Ten Centuries). Your query is giving me the correct and required output. Its true that output can be easily...
July 23, 2013 at 9:16 am
Viewing 15 posts - 1 through 15 (of 36 total)