Click here to Skip to main content
15,891,248 members
Home / Discussions / Database
   

Database

 
AnswerRe: redundant data Pin
Ashfield11-Sep-08 3:15
Ashfield11-Sep-08 3:15 
AnswerRe: redundant data Pin
harcaype11-Sep-08 4:47
harcaype11-Sep-08 4:47 
GeneralRe: redundant data Pin
Ashfield11-Sep-08 8:31
Ashfield11-Sep-08 8:31 
AnswerRe: redundant data Pin
Paul Conrad11-Sep-08 6:32
professionalPaul Conrad11-Sep-08 6:32 
QuestionScheduled jobs problem Pin
annu0811-Sep-08 3:03
annu0811-Sep-08 3:03 
AnswerRe: Scheduled jobs problem Pin
Mycroft Holmes11-Sep-08 14:57
professionalMycroft Holmes11-Sep-08 14:57 
QuestionProblem On Querry help!! Pin
papy-boom11-Sep-08 2:11
papy-boom11-Sep-08 2:11 
AnswerRe: Problem On Querry help!! Pin
Blue_Boy11-Sep-08 2:53
Blue_Boy11-Sep-08 2:53 
If you get min of column4 (code4) then you have this result

2233229 411.80 2233231 1
960268 210.50 999710 1
999708 298.20 960269 1

but if you need result which u have post then you must find max of column4 (code4).

Query which gives result by getting min of column 4:

select code1, max(code2) as code2 ,min(code3) as code3,min(code4) as code4<br />
from mtable<br />
group by code1<br />
order by code1



Query which gives result by getting max of column 4:

select code1, max(code2) as code2 ,min(code3) as code3,max(code4) as code4<br />
from mtable<br />
group by code1<br />
order by code1



I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.


QuestionReading Excel cell type with OleDB (MFC) Pin
giangi8310-Sep-08 22:37
giangi8310-Sep-08 22:37 
QuestionUsing Between two Dates. Pin
Rajiya10-Sep-08 21:37
Rajiya10-Sep-08 21:37 
AnswerRe: Using Between two Dates. Pin
Ashfield10-Sep-08 23:12
Ashfield10-Sep-08 23:12 
GeneralRe: Using Between two Dates. Pin
Wendelius11-Sep-08 5:46
mentorWendelius11-Sep-08 5:46 
AnswerRe: Using Between two Dates. Pin
nelsonpaixao11-Sep-08 13:49
nelsonpaixao11-Sep-08 13:49 
QuestionJobs succeeds when executed manually but fails when scheduled Pin
annu0810-Sep-08 21:20
annu0810-Sep-08 21:20 
AnswerRe: Jobs succeeds when executed manually but fails when scheduled Pin
Ashfield10-Sep-08 23:14
Ashfield10-Sep-08 23:14 
GeneralRe: Jobs succeeds when executed manually but fails when scheduled Pin
annu0810-Sep-08 23:31
annu0810-Sep-08 23:31 
GeneralRe: Jobs succeeds when executed manually but fails when scheduled Pin
Ashfield10-Sep-08 23:56
Ashfield10-Sep-08 23:56 
GeneralRe: Jobs succeeds when executed manually but fails when scheduled Pin
annu0811-Sep-08 0:15
annu0811-Sep-08 0:15 
GeneralRe: Jobs succeeds when executed manually but fails when scheduled Pin
annu0811-Sep-08 1:42
annu0811-Sep-08 1:42 
GeneralRe: Jobs succeeds when executed manually but fails when scheduled Pin
Ashfield11-Sep-08 3:06
Ashfield11-Sep-08 3:06 
GeneralRe: Jobs succeeds when executed manually but fails when scheduled Pin
annu0811-Sep-08 3:19
annu0811-Sep-08 3:19 
QuestionHelp required with Joins Pin
Rajiya10-Sep-08 20:14
Rajiya10-Sep-08 20:14 
AnswerRe: Help required with Joins Pin
EBeylo10-Sep-08 20:43
EBeylo10-Sep-08 20:43 
GeneralRe: Help required with Joins Pin
Rajiya10-Sep-08 21:20
Rajiya10-Sep-08 21:20 
GeneralRe: Help required with Joins Pin
EBeylo10-Sep-08 22:56
EBeylo10-Sep-08 22:56 

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.