Click here to Skip to main content
15,909,656 members
Home / Discussions / Database
   

Database

 
GeneralRe: out parameters workaround for Ms Access Pin
Dan Mos22-Jan-10 3:13
Dan Mos22-Jan-10 3:13 
AnswerRe: out parameters workaround for Ms Access Pin
Pranay Rana21-Jan-10 17:51
professionalPranay Rana21-Jan-10 17:51 
GeneralRe: out parameters workaround for Ms Access Pin
Dan Mos22-Jan-10 3:09
Dan Mos22-Jan-10 3:09 
QuestionComposite primary key Table Insertion Problem in SQL Pin
vishnukamath20-Jan-10 22:37
vishnukamath20-Jan-10 22:37 
AnswerRe: Composite primary key Table Insertion Problem in SQL Pin
Bassam Saoud22-Jan-10 5:03
Bassam Saoud22-Jan-10 5:03 
Questionselecting first 7 days from database Pin
benjamin yap20-Jan-10 18:02
benjamin yap20-Jan-10 18:02 
AnswerRe: selecting first 7 days from database Pin
Luc Pattyn20-Jan-10 18:12
sitebuilderLuc Pattyn20-Jan-10 18:12 
AnswerRe: selecting first 7 days from database Pin
Mycroft Holmes20-Jan-10 18:32
professionalMycroft Holmes20-Jan-10 18:32 
As Luc has said you need to change your data type to datetime, leaving it as varchar is a disaster. Think about this, to get the top 7 records you could do the following

SELECT TOP 2<br />
	Dt<br />
FROM (SELECT DISTINCT CONVERT(DATETIME,PeriodDate) Dt<br />
FROM Period ) X<br />
ORDER BY Dt desc


That will have to convert EVERY datestring in your table, creating an index is a waste of time and all the regional problem Luc mentioned will be visited upon you.

FIX YOUR DATA NOW!

Never underestimate the power of human stupidity
RAH

GeneralRe: selecting first 7 days from database Pin
David Skelly20-Jan-10 22:49
David Skelly20-Jan-10 22:49 
GeneralRe: selecting first 7 days from database Pin
Mycroft Holmes20-Jan-10 23:27
professionalMycroft Holmes20-Jan-10 23:27 
GeneralRe: selecting first 7 days from database Pin
David Skelly21-Jan-10 1:48
David Skelly21-Jan-10 1:48 
GeneralRe: selecting first 7 days from database Pin
Mycroft Holmes21-Jan-10 11:58
professionalMycroft Holmes21-Jan-10 11:58 
AnswerRe: selecting first 7 days from database Pin
David Skelly20-Jan-10 22:44
David Skelly20-Jan-10 22:44 
QuestionDatabase Schema to represent directory structure Pin
Fadi Yoosuf20-Jan-10 6:52
Fadi Yoosuf20-Jan-10 6:52 
AnswerRe: Database Schema to represent directory structure Pin
Bassam Saoud20-Jan-10 8:34
Bassam Saoud20-Jan-10 8:34 
AnswerRe: Database Schema to represent directory structure Pin
Mycroft Holmes20-Jan-10 18:36
professionalMycroft Holmes20-Jan-10 18:36 
QuestionOracle Boolean in a datatable with c# Pin
camau20-Jan-10 5:54
camau20-Jan-10 5:54 
AnswerRe: Oracle Boolean in a datatable with c# Pin
Jörgen Andersson20-Jan-10 11:12
professionalJörgen Andersson20-Jan-10 11:12 
QuestionOracle Installation Setting Pin
svs_shyam_2720-Jan-10 4:15
svs_shyam_2720-Jan-10 4:15 
AnswerRe: Oracle Installation Setting Pin
camau20-Jan-10 5:39
camau20-Jan-10 5:39 
AnswerRe: Oracle Installation Setting Pin
Chris Meech20-Jan-10 5:48
Chris Meech20-Jan-10 5:48 
AnswerRe: Oracle Installation Setting Pin
David Skelly20-Jan-10 6:28
David Skelly20-Jan-10 6:28 
QuestionCriteria for creating a new category table Pin
JHizzle20-Jan-10 2:46
JHizzle20-Jan-10 2:46 
AnswerRe: Criteria for creating a new category table Pin
David Mujica20-Jan-10 3:11
David Mujica20-Jan-10 3:11 
QuestionUpdate a column Pin
Hum Dum19-Jan-10 22:11
Hum Dum19-Jan-10 22:11 

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.