Click here to Skip to main content
15,893,381 members
Home / Discussions / Database
   

Database

 
GeneralRe: Urgent: SQL Server log: Login succeeded for user 'APPL_ACCOUNT'. Connection: Non-Trusted. Pin
devvvy19-Feb-06 17:10
devvvy19-Feb-06 17:10 
AnswerAn answer... Pin
devvvy19-Feb-06 17:45
devvvy19-Feb-06 17:45 
QuestionPer-user connection string to get good perf, good idea? Pin
Judah Gabriel Himango16-Feb-06 10:04
sponsorJudah Gabriel Himango16-Feb-06 10:04 
AnswerRe: Per-user connection string to get good perf, good idea? Pin
Colin Angus Mackay16-Feb-06 12:52
Colin Angus Mackay16-Feb-06 12:52 
GeneralRe: Per-user connection string to get good perf, good idea? Pin
Judah Gabriel Himango16-Feb-06 15:45
sponsorJudah Gabriel Himango16-Feb-06 15:45 
GeneralPartitioning Pin
Edbert P16-Feb-06 16:20
Edbert P16-Feb-06 16:20 
GeneralRe: Partitioning Pin
Judah Gabriel Himango16-Feb-06 16:44
sponsorJudah Gabriel Himango16-Feb-06 16:44 
QuestionT- SQL Inner Select Pin
Greeky16-Feb-06 1:21
Greeky16-Feb-06 1:21 
There is two tables HP_AccountName and T_Values. HP_AccountName includes all main accounts,T_Values includes all operations about accounts. Sample Tables r fallowing.

HP_AccountName............................|T_Values (An Account can be writen different lines. )
------------------------------------------|-----------------------------
HP_Level..HP_No..HP_AccountName...........|....MFD_AccountNo..MFD_Total
1.........1......Main1Account.............|....1200254........10,000
2.........10.....Main1SubAccount1.........|....1002865........15,000
3.........100....SafeBoxes................|....1009431........20,000
2.........12.....Main1SubAccount2.........|....2005454.........0,500
3.........120....Customers................|....2000024.........5,000
1.........2......Main2Account.............|....1205471........35,000
2.........20.....Main2SubAccount1.........|....1205471.........0,600
3.........200....Renders..................|....1205471.........0,400
...............................................2006300........48,500

All I want is a result Set Like
HP_No..HP_AccountName.........TOTAL
1......Main1Account...........81,000
10.......Main1SubAccount1.....35,000
100........SafeBoxes..........35,000
20.......Main1SubAccount2.....46,000
120........Customers..........46,000
2......Main2Account...........54,000
20.......Main2SubAccount1.....54,000
200........Renders............54,000

I worte something like that but i couldnt do axactly what i want
Select SPACE(HP_Level*3)+ HP_AccountName,
(Select SUM(MFD_Total) FROM T_VALUES WHERE MFD_AccountNo LIKE HP_No + '%') FROM T_ACCOUNTS
WHERE HP_Level<=1 order by HP_No

-- modified at 7:22 Thursday 16th February, 2006
AnswerRe: T- SQL Inner Select Pin
Colin Angus Mackay16-Feb-06 2:16
Colin Angus Mackay16-Feb-06 2:16 
QuestionUML modeling Pin
Klempie15-Feb-06 23:57
Klempie15-Feb-06 23:57 
AnswerRe: UML modeling Pin
Juan Pedro Prez16-Feb-06 2:05
Juan Pedro Prez16-Feb-06 2:05 
GeneralRe: UML modeling Pin
Paul Conrad16-Feb-06 17:14
professionalPaul Conrad16-Feb-06 17:14 
AnswerRe: UML modeling Pin
Klempie16-Feb-06 19:25
Klempie16-Feb-06 19:25 
QuestionHelp with ADO.NET, please Pin
Juan Pedro Prez15-Feb-06 23:20
Juan Pedro Prez15-Feb-06 23:20 
AnswerRe: Help with ADO.NET, please Pin
Mike Ellison16-Feb-06 8:04
Mike Ellison16-Feb-06 8:04 
GeneralRe: Help with ADO.NET, please Pin
Juan Pedro Prez17-Feb-06 6:06
Juan Pedro Prez17-Feb-06 6:06 
GeneralRe: Help with ADO.NET, please Pin
Mike Ellison17-Feb-06 6:32
Mike Ellison17-Feb-06 6:32 
GeneralRe: Help with ADO.NET, please Pin
Juan Pedro Prez17-Feb-06 7:46
Juan Pedro Prez17-Feb-06 7:46 
QuestionHow to get record count from OledbDataReader? Pin
rushing15-Feb-06 23:00
rushing15-Feb-06 23:00 
AnswerRe: How to get record count from OledbDataReader? Pin
Colin Angus Mackay16-Feb-06 2:11
Colin Angus Mackay16-Feb-06 2:11 
GeneralRe: How to get record count from OledbDataReader? Pin
rushing16-Feb-06 17:04
rushing16-Feb-06 17:04 
QuestionAdventure Works Database Pin
Brendan Vogt15-Feb-06 22:56
Brendan Vogt15-Feb-06 22:56 
AnswerRe: Adventure Works Database Pin
Colin Angus Mackay16-Feb-06 2:24
Colin Angus Mackay16-Feb-06 2:24 
QuestionGood ADO/ SQL Server 2005 Books Pin
Brendan Vogt15-Feb-06 20:57
Brendan Vogt15-Feb-06 20:57 
QuestionSQL Log viewer Pin
devvvy15-Feb-06 20:52
devvvy15-Feb-06 20:52 

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.