Click here to Skip to main content
15,898,010 members
Home / Discussions / C#
   

C#

 
QuestionThe weird control problem Pin
doph5-Sep-05 4:34
doph5-Sep-05 4:34 
QuestionDLL in C++ with pointers. How to use it in C#? Pin
patgo5-Sep-05 4:18
patgo5-Sep-05 4:18 
AnswerRe: DLL in C++ with pointers. How to use it in C#? Pin
RobVai6-Sep-05 16:37
RobVai6-Sep-05 16:37 
QuestionDelay during first use of Exception Pin
harwanegg5-Sep-05 3:28
harwanegg5-Sep-05 3:28 
AnswerRe: Delay during first use of Exception Pin
Andy Brummer5-Sep-05 4:12
sitebuilderAndy Brummer5-Sep-05 4:12 
AnswerRe: Delay during first use of Exception Pin
Daniel Turini5-Sep-05 6:38
Daniel Turini5-Sep-05 6:38 
GeneralRe: Delay during first use of Exception Pin
harwanegg5-Sep-05 20:21
harwanegg5-Sep-05 20:21 
QuestionT-SQL Clause Pin
Greeky5-Sep-05 3:18
Greeky5-Sep-05 3:18 
I wanna ask easier way for an T-SQL Clause

Imagine a table AS following

CODE - TYPE - TOTAL<br />
1132    IN      100<br />
1134    IN      140<br />
1134    OUT     230<br />
1135    IN      240<br />
1135    OUT     50<br />
1136    IN      70<br />
1137    OUT     110


I need a sqlclause it will group by code and calculate Total, u have to multply OUT type with -1

the final table what i need to get is
CODE -  TOTAL<br />
1132    100<br />
1134    -90<br />
1135    190<br />
1136    70<br />
1137    -110


I assume The clause like that
select  CODE,SUM(If (TYPE='OUT',TOTAL*-1, TOTAL) from DETAILS<br />
group by CODE,TYPE Order by CODE


But something is missing Confused | :confused:


-- modified at 9:24 Monday 5th September, 2005
AnswerRe: T-SQL Clause Pin
Andy Brummer5-Sep-05 4:20
sitebuilderAndy Brummer5-Sep-05 4:20 
QuestionNumber Formatting Pin
Brendan Vogt5-Sep-05 1:56
Brendan Vogt5-Sep-05 1:56 
AnswerRe: Number Formatting Pin
Guffa5-Sep-05 2:37
Guffa5-Sep-05 2:37 
QuestionOverlapping Images Pin
dhanunjay5-Sep-05 1:49
dhanunjay5-Sep-05 1:49 
QuestionImage Resizing in a Picture box using c# Pin
dhanunjay5-Sep-05 1:41
dhanunjay5-Sep-05 1:41 
AnswerRe: Image Resizing in a Picture box using c# Pin
Martin#5-Sep-05 8:41
Martin#5-Sep-05 8:41 
QuestionTIFF file with included color schema Pin
yarns5-Sep-05 0:52
yarns5-Sep-05 0:52 
QuestionImporting a DLL at runtime Pin
totig4-Sep-05 23:09
totig4-Sep-05 23:09 
AnswerRe: Importing a DLL at runtime Pin
totig4-Sep-05 23:52
totig4-Sep-05 23:52 
GeneralRe: Importing a DLL at runtime Pin
mav.northwind5-Sep-05 2:17
mav.northwind5-Sep-05 2:17 
GeneralRe: Importing a DLL at runtime Pin
totig5-Sep-05 2:25
totig5-Sep-05 2:25 
GeneralRe: Importing a DLL at runtime Pin
mav.northwind5-Sep-05 10:26
mav.northwind5-Sep-05 10:26 
AnswerRe: Importing a DLL at runtime Pin
Luis Alonso Ramos5-Sep-05 7:26
Luis Alonso Ramos5-Sep-05 7:26 
QuestionHow to find inner length (number of cols) in a rectangular array? Pin
signbit4-Sep-05 22:46
signbit4-Sep-05 22:46 
AnswerRe: How to find inner length (number of cols) in a rectangular array? Pin
Guffa4-Sep-05 22:53
Guffa4-Sep-05 22:53 
AnswerRe: How to find inner length (number of cols) in a rectangular array? Pin
Andrew Kirillov4-Sep-05 22:56
Andrew Kirillov4-Sep-05 22:56 
GeneralRe: How to find inner length (number of cols) in a rectangular array? Pin
signbit4-Sep-05 23:00
signbit4-Sep-05 23:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.