Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Select in a view for more result Expand / Collapse
Author
Message
Posted Saturday, March 23, 2013 7:12 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, March 25, 2013 9:40 AM
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 ........
Post #1434605
Posted Saturday, March 23, 2013 8:39 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 7:19 PM
Points: 7,127, Visits: 12,655
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
Post #1434616
Posted Monday, March 25, 2013 9:48 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, March 25, 2013 9:40 AM
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 ...
Post #1434993
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse