Click here to Skip to main content
15,889,335 members
Home / Discussions / Database
   

Database

 
QuestionBest common connection type Pin
gavthegenius31-May-07 22:52
gavthegenius31-May-07 22:52 
Questionprimary key and foreign key Pin
saravanan0531-May-07 18:47
saravanan0531-May-07 18:47 
AnswerRe: primary key and foreign key Pin
sam#31-May-07 19:07
sam#31-May-07 19:07 
QuestionSetFieldValue Pin
hero199531-May-07 17:32
hero199531-May-07 17:32 
AnswerRe: SetFieldValue Pin
Mike Dimmick1-Jun-07 3:20
Mike Dimmick1-Jun-07 3:20 
QuestionError with SQL Server 2005 Endpoints Pin
duaatul31-May-07 6:19
duaatul31-May-07 6:19 
QuestionFuzzy Grouping performance issue Pin
seee sharp31-May-07 6:18
seee sharp31-May-07 6:18 
QuestionConvert SQL datetime to just date Pin
kozu31-May-07 5:29
kozu31-May-07 5:29 
Hi,
I need to convert the DateTime to a date format. I know I have to use Convert, but I don't think I use it right because I'm not getting the expected result.
Here's my scenarion: I want to do a sum for all products in the DB that were bought during a given period of time. My query looks like this

select convert(datetime,convert(char(10),OrderDate,101)), SUM(Qty)
from Orders
where convert(datetime,convert(char(10),OrderDate,101)) between '05/29/05' and '06/10/05'
group by convert(datetime,convert(char(10),OrderDate,101))
order by convert(datetime,convert(char(10),OrderDate,101))

the result looks like this:

OrderDate Qty
2005-05-30 00:00:00.000 1
2005-05-31 00:00:00.000 4

How can I get rid of the 0s at the end of OrderDate?
thanx
AnswerRe: Convert SQL datetime to just date Pin
kubben31-May-07 5:36
kubben31-May-07 5:36 
GeneralRe: Convert SQL datetime to just date Pin
kozu31-May-07 6:01
kozu31-May-07 6:01 
AnswerRe: Convert SQL datetime to just date Pin
Shahil Shah31-May-07 6:13
Shahil Shah31-May-07 6:13 
GeneralRe: Convert SQL datetime to just date Pin
kozu31-May-07 6:24
kozu31-May-07 6:24 
GeneralRe: Convert SQL datetime to just date Pin
kozu31-May-07 6:36
kozu31-May-07 6:36 
GeneralRe: Convert SQL datetime to just date Pin
Shahil Shah31-May-07 6:38
Shahil Shah31-May-07 6:38 
AnswerRe: Convert SQL datetime to just date Pin
Michael Potter31-May-07 9:45
Michael Potter31-May-07 9:45 
QuestionPlease Heeelp - connection error driving me crazy Pin
ComCoderCsharp31-May-07 4:11
ComCoderCsharp31-May-07 4:11 
AnswerRe: Please Heeelp - connection error driving me crazy Pin
Colin Angus Mackay31-May-07 4:17
Colin Angus Mackay31-May-07 4:17 
GeneralRe: Please Heeelp - connection error driving me crazy Pin
ComCoderCsharp31-May-07 5:07
ComCoderCsharp31-May-07 5:07 
GeneralRe: Please Heeelp - connection error driving me crazy Pin
Colin Angus Mackay31-May-07 8:13
Colin Angus Mackay31-May-07 8:13 
QuestionHow to check if a field already exists in a table Pin
SWDevil31-May-07 3:13
SWDevil31-May-07 3:13 
AnswerRe: How to check if a field already exists in a table Pin
Colin Angus Mackay31-May-07 4:14
Colin Angus Mackay31-May-07 4:14 
GeneralRe: How to check if a field already exists in a table Pin
SWDevil31-May-07 5:12
SWDevil31-May-07 5:12 
GeneralRe: How to check if a field already exists in a table Pin
Colin Angus Mackay31-May-07 8:14
Colin Angus Mackay31-May-07 8:14 
GeneralNormalising Single Table to Two Pin
Brady Kelly31-May-07 2:06
Brady Kelly31-May-07 2:06 
GeneralRe: Normalising Single Table to Two Pin
kubben31-May-07 2:34
kubben31-May-07 2:34 

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.