Click here to Skip to main content
15,899,549 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Dynamic Linq with Where and ObjectParameter doesn't work Pin
Richard Deeming10-Feb-15 1:32
mveRichard Deeming10-Feb-15 1:32 
Questionhow to create RDLC report using multiple sql columns with same values to count in vb.net Pin
DHARM PAL5-Feb-15 1:45
DHARM PAL5-Feb-15 1:45 
AnswerRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
Richard Deeming5-Feb-15 3:52
mveRichard Deeming5-Feb-15 3:52 
Your output doesn't seem to match your input data, but something like this should work:
SQL
SELECT
    T.Course,
    S.subject,
    SUM(CASE T.Adcat WHEN 'Reg' THEN 1 ELSE 0 END) As Reg,
    SUM(CASE T.Adcat WHEN 'Pri' THEN 1 ELSE 0 END) As Pri
FROM
    YourTable As T
    CROSS APPLY
    (
        VALUES (sub1), (sub2), (sub3), (sub4), (sub5)
    ) As S (subject)
GROUP BY
    T.Course,
    S.subject
ORDER BY
    T.Course,
    S.subject
;

http://sqlfiddle.com/#!3/095e8/1[^]



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
DHARM PAL5-Feb-15 4:44
DHARM PAL5-Feb-15 4:44 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
Richard Deeming5-Feb-15 4:46
mveRichard Deeming5-Feb-15 4:46 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
DHARM PAL5-Feb-15 4:50
DHARM PAL5-Feb-15 4:50 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
Richard Deeming5-Feb-15 4:51
mveRichard Deeming5-Feb-15 4:51 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
DHARM PAL5-Feb-15 5:00
DHARM PAL5-Feb-15 5:00 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
Richard Deeming5-Feb-15 5:13
mveRichard Deeming5-Feb-15 5:13 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
DHARM PAL5-Feb-15 5:17
DHARM PAL5-Feb-15 5:17 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
Richard Deeming5-Feb-15 5:51
mveRichard Deeming5-Feb-15 5:51 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
DHARM PAL5-Feb-15 6:19
DHARM PAL5-Feb-15 6:19 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
Richard Deeming5-Feb-15 6:53
mveRichard Deeming5-Feb-15 6:53 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
DHARM PAL5-Feb-15 7:13
DHARM PAL5-Feb-15 7:13 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
Richard Deeming5-Feb-15 8:00
mveRichard Deeming5-Feb-15 8:00 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
DHARM PAL5-Feb-15 8:06
DHARM PAL5-Feb-15 8:06 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
Richard Deeming5-Feb-15 8:11
mveRichard Deeming5-Feb-15 8:11 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
DHARM PAL5-Feb-15 8:22
DHARM PAL5-Feb-15 8:22 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
Richard Deeming5-Feb-15 8:35
mveRichard Deeming5-Feb-15 8:35 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
DHARM PAL5-Feb-15 9:09
DHARM PAL5-Feb-15 9:09 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
DHARM PAL5-Feb-15 20:44
DHARM PAL5-Feb-15 20:44 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
Richard Deeming6-Feb-15 2:03
mveRichard Deeming6-Feb-15 2:03 
GeneralRe: how to create RDLC report using multiple sql columns with same values to count in vb.net Pin
DHARM PAL6-Feb-15 2:48
DHARM PAL6-Feb-15 2:48 
QuestionHow To Start a Remote Desktop Connection to remote host from VB Pin
Member 111939643-Feb-15 4:57
Member 111939643-Feb-15 4:57 
AnswerRe: How To Start a Remote Desktop Connection to remote host from VB Pin
Eddy Vluggen3-Feb-15 7:23
professionalEddy Vluggen3-Feb-15 7:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.