Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

ms sql query

taproot9

Professional
Advanced Member
Messages
161
Reaction score
0
Points
26
SELECT cidate,
cinum,
cicustomername,
SUM(cidamt) as cigrsamt,

CASE
WHEN ciisforeign=1
THEN SUM(cidamt)*.2
ELSE SUM(cidamt)*.1
END as cilesscpa,

CASE
WHEN ciiszerorated=0
THEN SUM(cidamt)*.12
ELSE 0
END as civat,

ciiszerorated,
ciisforeign

FROM tblcidetail LEFT JOIN tblcimaster ON cidnum = cinum

WHERE cidcontdesc like 'OVERWEIGHT%'
AND cidate between '9/24/2015'
and '9/24/2017'
AND ciiscancel = 0

GROUP BY cinum
ORDER BY cidate ASC


pa help naman mga master.. thank you
 
ano ba ang problema mo?
kung magpapatulong ka sana lagyan mo ng details wag mo lang ilagay yung query?
hindi ka matutulungan kung ganyan lang nilagay mo.
ano gusto mong gawin?
 
Back
Top Bottom