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

Database

 
Questionfast way to copy from sql server table to access table Pin
sal2128-May-10 11:36
sal2128-May-10 11:36 
AnswerRe: fast way to copy from sql server table to access table Pin
Md. Marufuzzaman28-May-10 19:50
professionalMd. Marufuzzaman28-May-10 19:50 
GeneralRe: fast way to copy from sql server table to access table Pin
sal2129-May-10 5:42
sal2129-May-10 5:42 
Questioncursor in pl/sql Pin
richa02127-May-10 5:31
richa02127-May-10 5:31 
AnswerRe: cursor in pl/sql Pin
David Skelly27-May-10 6:04
David Skelly27-May-10 6:04 
AnswerRe: cursor in pl/sql Pin
Eddy Vluggen27-May-10 6:41
professionalEddy Vluggen27-May-10 6:41 
AnswerRe: cursor in pl/sql Pin
DABBee15-Jun-10 20:31
DABBee15-Jun-10 20:31 
QuestionSelect records using distinct and order by [modified] Pin
popchecker27-May-10 3:13
popchecker27-May-10 3:13 
I am using MS Sql 2005. In my database I have a table "Products" which has following structure and content

ProductName  CategoryId   AddedDate

Product1      1            04/12/2010
Product2      1            04/12/2010
Product3      2	           05/12/2010
Product4      1            06/12/2010


I want to fetch top 2 records order by AddedDate. To do that I can use sql

Select top 2 * From Products Order By AddedDate


This will populate first two records. Both are in CategoryId "1". I want to Select records from distinct categories.
I requirment is to select records order by AddedDate with distinct CategoryId. I can do it with temporary tables. But is there any simple query to do that?

Thanks and regards,
Poppy

modified on Thursday, May 27, 2010 9:33 AM

AnswerRe: Select records using distinct and order by [modified] Pin
Blue_Boy27-May-10 4:34
Blue_Boy27-May-10 4:34 
GeneralRe: Select records using distinct and order by Pin
popchecker27-May-10 5:46
popchecker27-May-10 5:46 
AnswerRe: Select records using distinct and order by Pin
Eddy Vluggen27-May-10 6:27
professionalEddy Vluggen27-May-10 6:27 
GeneralRe: Select records using distinct and order by Pin
i.j.russell27-May-10 9:45
i.j.russell27-May-10 9:45 
GeneralRe: Select records using distinct and order by [modified] Pin
Tripathi Swati27-May-10 19:39
Tripathi Swati27-May-10 19:39 
GeneralRe: Select records using distinct and order by Pin
Mycroft Holmes27-May-10 21:53
professionalMycroft Holmes27-May-10 21:53 
GeneralRe: Select records using distinct and order by Pin
Eddy Vluggen28-May-10 1:40
professionalEddy Vluggen28-May-10 1:40 
QuestionMS SQL Connection Failed eg: "Trusted Connection"... Pin
PDTUM26-May-10 19:08
PDTUM26-May-10 19:08 
AnswerRe: MS SQL Connection Failed eg: "Trusted Connection"... Pin
_Damian S_26-May-10 19:23
professional_Damian S_26-May-10 19:23 
AnswerRe: MS SQL Connection Failed eg: "Trusted Connection"... Pin
PDTUM27-May-10 5:10
PDTUM27-May-10 5:10 
QuestionExporting only Defination not data Pin
Hum Dum26-May-10 1:30
Hum Dum26-May-10 1:30 
AnswerRe: Exporting only Defination not data Pin
Mike Osbahr26-May-10 2:17
Mike Osbahr26-May-10 2:17 
AnswerRe: Exporting only Defination not data Pin
Wayne Gaylard26-May-10 15:45
professionalWayne Gaylard26-May-10 15:45 
AnswerRe: Exporting only Defination not data Pin
SomeGuyThatIsMe27-May-10 2:03
SomeGuyThatIsMe27-May-10 2:03 
AnswerRe: Exporting only Defination not data Pin
Md. Marufuzzaman28-May-10 20:05
professionalMd. Marufuzzaman28-May-10 20:05 
QuestionA tale of two queries [solved] Pin
Mike Osbahr25-May-10 7:47
Mike Osbahr25-May-10 7:47 
AnswerRe: A tale of two queries Pin
Chris Meech25-May-10 8:01
Chris Meech25-May-10 8:01 

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.