Click here to Skip to main content
16,010,427 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Intelligent Datagrid Pin
mikone5-Sep-05 10:16
mikone5-Sep-05 10:16 
QuestionOpen default mail client with attachments Pin
marowle5-Sep-05 4:19
marowle5-Sep-05 4:19 
QuestionListview selects? Pin
dave@ennead5-Sep-05 3:26
dave@ennead5-Sep-05 3:26 
AnswerRe: Listview selects? Pin
dave@ennead5-Sep-05 3:35
dave@ennead5-Sep-05 3:35 
QuestionSlow WMI-Query, what reason? Pin
mikone5-Sep-05 3:26
mikone5-Sep-05 3:26 
AnswerRe: Slow WMI-Query, what reason? Pin
progload6-Sep-05 9:41
progload6-Sep-05 9:41 
GeneralRe: Slow WMI-Query, what reason? Pin
mikone7-Sep-05 21:28
mikone7-Sep-05 21:28 
QuestionT-SQL Clause Pin
Greeky5-Sep-05 3:17
Greeky5-Sep-05 3:17 
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
maximvs5-Sep-05 7:15
maximvs5-Sep-05 7:15 
QuestionBooks about .NET with examples for learning Pin
hcmuns5-Sep-05 0:59
susshcmuns5-Sep-05 0:59 
AnswerRe: Books about .NET with examples for learning Pin
Christian Graus5-Sep-05 11:29
protectorChristian Graus5-Sep-05 11:29 
QuestionRotation of Label control in vb.net Pin
premanand jha5-Sep-05 0:46
premanand jha5-Sep-05 0:46 
AnswerRe: Rotation of Label control in vb.net Pin
Briga5-Sep-05 2:51
Briga5-Sep-05 2:51 
QuestionSpecified argument was out of the range of valid values. Pin
Rabeek5-Sep-05 0:25
Rabeek5-Sep-05 0:25 
AnswerRe: Specified argument was out of the range of valid values. Pin
_mubashir5-Sep-05 3:23
_mubashir5-Sep-05 3:23 
Questionstucked newbie Pin
tatchung4-Sep-05 23:59
tatchung4-Sep-05 23:59 
AnswerRe: stucked newbie Pin
Christian Graus5-Sep-05 11:30
protectorChristian Graus5-Sep-05 11:30 
GeneralRe: stucked newbie Pin
tatchung5-Sep-05 14:59
tatchung5-Sep-05 14:59 
QuestionCrystal Report Pin
| Muhammad Waqas Butt |4-Sep-05 23:18
professional| Muhammad Waqas Butt |4-Sep-05 23:18 
QuestionMulti Line TextBox for Addresses Pin
Greeky4-Sep-05 22:17
Greeky4-Sep-05 22:17 
AnswerRe: Multi Line TextBox for Addresses Pin
Dave Kreskowiak5-Sep-05 3:10
mveDave Kreskowiak5-Sep-05 3:10 
AnswerRe: Multi Line TextBox for Addresses Pin
Greeky5-Sep-05 3:11
Greeky5-Sep-05 3:11 
QuestionOCR Pin
Anonymous4-Sep-05 16:34
Anonymous4-Sep-05 16:34 
AnswerRe: OCR Pin
Christian Graus4-Sep-05 16:36
protectorChristian Graus4-Sep-05 16:36 
QuestionAccessing a data file Pin
Mark064-Sep-05 11:44
Mark064-Sep-05 11:44 

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.