Click here to Skip to main content
15,440,955 members
Home / Discussions / Database
   

Database

 
GeneralRe: LIKE Predicate Pin
TheIdleProgrammer20-Aug-09 23:07
MemberTheIdleProgrammer20-Aug-09 23:07 
AnswerRe: LIKE Predicate Pin
Luc Pattyn20-Aug-09 4:58
sitebuilderLuc Pattyn20-Aug-09 4:58 
GeneralRe: LIKE Predicate Pin
TheIdleProgrammer20-Aug-09 22:11
MemberTheIdleProgrammer20-Aug-09 22:11 
QuestionSql Problem Pin
AhmedGebaly19-Aug-09 23:37
MemberAhmedGebaly19-Aug-09 23:37 
AnswerRe: Sql Problem Pin
David Skelly20-Aug-09 2:26
MemberDavid Skelly20-Aug-09 2:26 
AnswerRe: Sql Problem Pin
Kschuler20-Aug-09 3:17
MemberKschuler20-Aug-09 3:17 
AnswerRe: Sql Problem Pin
Jerry Hammond20-Aug-09 3:41
MemberJerry Hammond20-Aug-09 3:41 
Questionset row number in select query Pin
nainakarri19-Aug-09 20:34
Membernainakarri19-Aug-09 20:34 
Hi
I have a table with duplicate rows and distinct id. I have written a select query using distinct and selecting only required fields to avoid duplicates.

Select dictinct(occassion), startdate from table1

Now what i want is to give unique row number to each distict row

For this i tried as below but could not succeed
Declare @num int
set @num =0
select (set @num = @num+1) as num,
dictinct(occassion), startdate from table1


After search in google , i got row_number(). But this i am unable to use as i am using distinct. Can u pls let me know how i can achieve this.

Thanks in advance
Naina

Naina

AnswerRe: set row number in select query Pin
_Damian S_19-Aug-09 20:41
professional_Damian S_19-Aug-09 20:41 
GeneralRe: set row number in select query Pin
nainakarri19-Aug-09 20:44
Membernainakarri19-Aug-09 20:44 
GeneralRe: set row number in select query Pin
Coding C#20-Aug-09 3:36
MemberCoding C#20-Aug-09 3:36 
Questionhow to connect to magic database Pin
elimpiado19-Aug-09 19:53
Memberelimpiado19-Aug-09 19:53 
AnswerRe: how to connect to magic database Pin
Mycroft Holmes19-Aug-09 20:22
professionalMycroft Holmes19-Aug-09 20:22 
GeneralRe: how to connect to magic database Pin
Ashfield19-Aug-09 21:00
MemberAshfield19-Aug-09 21:00 
Questionhow to attatch, restore database to msde using vb.net or c# .ne Pin
Ageesh18-Aug-09 22:43
MemberAgeesh18-Aug-09 22:43 
AnswerRe: how to attatch, restore database to msde using vb.net or c# .ne Pin
Mycroft Holmes19-Aug-09 17:46
professionalMycroft Holmes19-Aug-09 17:46 
QuestionHow to calculate the total memory occupied by the database Pin
Krishna Aditya18-Aug-09 22:42
MemberKrishna Aditya18-Aug-09 22:42 
AnswerRe: How to calculate the total memory occupied by the database Pin
dan!sh 18-Aug-09 23:07
professional dan!sh 18-Aug-09 23:07 
GeneralRe: How to calculate the total memory occupied by the database Pin
Krishna Aditya18-Aug-09 23:18
MemberKrishna Aditya18-Aug-09 23:18 
GeneralRe: How to calculate the total memory occupied by the database Pin
Mycroft Holmes18-Aug-09 23:23
professionalMycroft Holmes18-Aug-09 23:23 
GeneralRe: How to calculate the total memory occupied by the database Pin
Andy_L_J18-Aug-09 23:32
MemberAndy_L_J18-Aug-09 23:32 
GeneralRe: How to calculate the total memory occupied by the database Pin
dan!sh 18-Aug-09 23:41
professional dan!sh 18-Aug-09 23:41 
QuestionCopy data from MS Access tables to an XML file using C# Pin
Puneet Bhatnagar18-Aug-09 22:04
MemberPuneet Bhatnagar18-Aug-09 22:04 
AnswerRe: Copy data from MS Access tables to an XML file using C# Pin
Mycroft Holmes19-Aug-09 20:26
professionalMycroft Holmes19-Aug-09 20:26 
Questionchanging authentication mode in sql server 2000 Pin
myinstincts18-Aug-09 21:58
Membermyinstincts18-Aug-09 21:58 

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.