Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Select in a view for more result


Select in a view for more result

Author
Message
mhmdsow
mhmdsow
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 4
hy !
There is my view
mvtDtate mvtMouvementDebCred TypemvtMouvementDebCred
1/1/2013 154 000 D
2/1/2013 210 000 C
3/1/2013 654 012 D
4/1/2013 213 000 564 C
After more essay : And I want a result as this : the mvtMDebCred type D in a Columm and the same for the type C
mvtDtate mvtMDebCred mvtMDeb mvtMCred TypemvtMDebCred
1/1/2013 154 000 154 000 ----------- D
2/1/2013 210 000 ----------- 210 000 C
3/1/2013 654 012 654 012 ---------- D
4/1/2013 213 000 ----------- 213 000 564 C
thanks ........
Orlando Colamatteo
Orlando Colamatteo
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8275 Visits: 14368
mhmdsow (3/23/2013)
hy !
There is my view
mvtDtate mvtMouvementDebCred TypemvtMouvementDebCred
1/1/2013 154 000 D
2/1/2013 210 000 C
3/1/2013 654 012 D
4/1/2013 213 000 564 C
After more essay : And I want a result as this : the mvtMDebCred type D in a Columm and the same for the type C
mvtDtate mvtMDebCred mvtMDeb mvtMCred TypemvtMDebCred
1/1/2013 154 000 154 000 ----------- D
2/1/2013 210 000 ----------- 210 000 C
3/1/2013 654 012 654 012 ---------- D
4/1/2013 213 000 ----------- 213 000 564 C
thanks ........

What you have posted is difficult to read and does not make it easy for people to help you by allowing them to run tests against your data on their own instance SQL Server. For better, faster answers please provide:

1. DDL in the form of CREATE TABLE statements to create your sample tables
2. DML in the form of INSERT INTO statements to populate the sample tables
3. Your expected result based on your sample data
4. Most importantly: what you have tried so far

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
mhmdsow
mhmdsow
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 4
hy , thanks members
my problems is resolved ...
there is my query :

SELECT mvtDtate
, mvtMDebCred
, CASE WHEN TypemvtMDebCred = 'D' THEN mvtMDebCred END AS mvtMDeb
, CASE WHEN TypemvtMDebCred = 'C' THEN mvtMDebCred END AS mvtMCred
, TypemvtMDebCred
FROM ...
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search