Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
lamineba
Starting Member
2 Posts |
Posted - 2013-03-23 : 08:48:57
|
hy !There is my view mvtDtate mvtMouvementDebCred TypemvtMouvementDebCred1/1/2013 154 000 D2/1/2013 210 000 C3/1/2013 654 012 D4/1/2013 213 000 564 CAfter more essay : And I want a result as this :mvtDtate mvtMDebCred mvtMDeb mvtMCred TypemvtMDebCred1/1/2013 154 000 154 000 ----------- D2/1/2013 210 000 ----------- 210 000 C3/1/2013 654 012 654 012 ---------- D 4/1/2013 213 000 ----------- 213 000 564 Cthanks ........ |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-03-23 : 17:17:19
|
[code]SELECT mvtDtate, mvtMouvementDebCred, CASE WHEN TypemvtMouvementDebCred = 'D' THEN mvtMouvementDebCred END AS mvtMDeb, CASE WHEN TypemvtMouvementDebCred = 'C' THEN mvtMouvementDebCred END AS mvtMCred, TypemvtMouvementDebCredFROM YourOriginalViewOrTable;[/code] |
|
|
lamineba
Starting Member
2 Posts |
Posted - 2013-03-25 : 11:46:26
|
hy thanks James , my problems is resolved |
|
|
|
|
|