Query in Sql server -


i have table contains data of ledger. contains field account name,debit credit. data entered in table @ end of month ie. sum of days.

here problem want display data of 2 months i.e current month , month. real problem displayed in crosstab

accname    dated     debit     credit -------    -----     ------    ------ 

account name in both months , want display 1 entry both month , corresponding data ie credit , debit field fill. query work on 2 conditions fields account name , dated checked.

is possible use case statement in query

please help

sql server/sql not display default. doesn't matter in form return data query, long visualized way want it. write query return required data , care visualization.

it might if told how you're planning visualize data.

to answer question: yes, can use case within query in

select     case when <condition1> <value1>          when <condition2> <value2>          else <value3>     end <fieldname> 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -