Click here to Skip to main content
15,890,579 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: VB6 and XP Taskbar Pin
Henry Minute24-Jul-09 9:48
Henry Minute24-Jul-09 9:48 
Questionsearch a record Pin
waner michaud24-Jul-09 6:52
waner michaud24-Jul-09 6:52 
AnswerRe: search a record Pin
Ian Shlasko24-Jul-09 6:57
Ian Shlasko24-Jul-09 6:57 
GeneralRe: search a record Pin
waner michaud24-Jul-09 8:40
waner michaud24-Jul-09 8:40 
GeneralRe: search a record Pin
Ian Shlasko24-Jul-09 9:04
Ian Shlasko24-Jul-09 9:04 
GeneralRe: search a record Pin
waner michaud7-Aug-09 10:02
waner michaud7-Aug-09 10:02 
AnswerRe: search a record Pin
DJ Matthews24-Jul-09 7:10
DJ Matthews24-Jul-09 7:10 
Questioncalculating sum in a view Pin
Ebube24-Jul-09 3:18
Ebube24-Jul-09 3:18 
There is a table called QCR100 containing the following information



ITEM_CODE   ITEM_DESCRIPTION      DCODE            AMOUNT
111200         investments            24000003      1630000000.0000
111200         investments            126000005   1630000000.0000
111600         Other Assets            133000009   1700000000.0000
111600         Other Assets            150000002   1730000000.0000
111701         Leasehold               190010130   1740000000.0000
111705         Furniture               190010036   1750000000.0000
111706         Computer Software   190010141   46995799.1800
Then I created a view with this command statement:
SELECT      CASE WHEN LEFT(e.dcode, 1) = '1' THEN isnull(SUM(a.Dr_bal_lcy - a.CR_BAL_LCY), 0) WHEN LEFT(e.dcode, 1)
                                 = '2' THEN isnull(SUM(a.CR_BAL_LCY - a.Dr_bal_lcy), 0) ELSE 0 END AS amount, e.ITEM_DESCRIPTION, e.ITEM_CODE
FROM            dbo.GLTEMP_CONS AS a RIGHT OUTER JOIN
                                 dbo.QCR100 AS e ON LTRIM(a.GL_code) = e.Dcode
GROUP BY e.ITEM_DESCRIPTION, e.ITEM_CODE, e.Dcode

How I can modify this view to sum the amount for any duplicated item code and group by item code

Example

ITEM_CODE   ITEM_DESCRIPTION      DCODE            AMOUNT
111200         investments            24000003      1630000000.0000
111600         Other Assets            133000009   1700000000.0000
111701         Leasehold               190010130   1740000000.0000
111705         Furniture               190010036   1750000000.0000
111706         Computer Software   190010141   46995799.1800
AnswerRe: calculating sum in a view Pin
Mike Ellison24-Jul-09 4:04
Mike Ellison24-Jul-09 4:04 
Questionhow to select datagrid row using keyboard ??? Pin
JC.KaNNaN24-Jul-09 3:06
JC.KaNNaN24-Jul-09 3:06 
AnswerRe: how to select datagrid row using keyboard ??? Pin
Muhammad Mazhar24-Jul-09 3:25
Muhammad Mazhar24-Jul-09 3:25 
GeneralRe: how to select datagrid row using keyboard ??? Pin
JC.KaNNaN24-Jul-09 19:01
JC.KaNNaN24-Jul-09 19:01 
Questioncode change for right to left language Pin
MA Awan24-Jul-09 3:04
MA Awan24-Jul-09 3:04 
AnswerRe: code change for right to left language Pin
Muhammad Mazhar24-Jul-09 3:30
Muhammad Mazhar24-Jul-09 3:30 
GeneralRe: code change for right to left language Pin
MA Awan26-Jul-09 6:34
MA Awan26-Jul-09 6:34 
QuestionExcel - save without data connection and macros Pin
DaveyM6924-Jul-09 2:21
professionalDaveyM6924-Jul-09 2:21 
AnswerRe: Excel - save without data connection and macros Pin
EliottA24-Jul-09 2:51
EliottA24-Jul-09 2:51 
GeneralRe: Excel - save without data connection and macros Pin
DaveyM6924-Jul-09 3:01
professionalDaveyM6924-Jul-09 3:01 
GeneralRe: Excel - save without data connection and macros Pin
Mycroft Holmes24-Jul-09 23:27
professionalMycroft Holmes24-Jul-09 23:27 
GeneralRe: Excel - save without data connection and macros Pin
DaveyM6925-Jul-09 8:17
professionalDaveyM6925-Jul-09 8:17 
Questionfiscal printer or fiscal devise Pin
ivo7524-Jul-09 0:44
ivo7524-Jul-09 0:44 
AnswerRe: fiscal printer or fiscal devise Pin
DoctorMick24-Jul-09 1:13
DoctorMick24-Jul-09 1:13 
AnswerRe: fiscal printer or fiscal devise Pin
Mycroft Holmes24-Jul-09 23:31
professionalMycroft Holmes24-Jul-09 23:31 
QuestionDatagridview combobox issue Pin
Josejalapeno24-Jul-09 0:25
Josejalapeno24-Jul-09 0:25 
QuestionWhy does Microsoft do this or am I missing something:Keypress event missing in VB.NET 2008 Pin
Member 442053423-Jul-09 20:51
Member 442053423-Jul-09 20:51 

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.