Click here to Skip to main content
15,915,094 members
Home / Discussions / Database
   

Database

 
Questionneed help about database Pin
ngAnhTuan24-Dec-05 20:54
ngAnhTuan24-Dec-05 20:54 
AnswerRe: need help about database Pin
Colin Angus Mackay26-Dec-05 2:37
Colin Angus Mackay26-Dec-05 2:37 
GeneralRe: need help about database Pin
Paul Conrad28-Dec-05 5:34
professionalPaul Conrad28-Dec-05 5:34 
QuestionPL/SQL Pin
sarojsneha24-Dec-05 19:40
sarojsneha24-Dec-05 19:40 
AnswerRe: PL/SQL Pin
rihdus26-Dec-05 1:29
rihdus26-Dec-05 1:29 
AnswerRe: PL/SQL Pin
rihdus26-Dec-05 3:56
rihdus26-Dec-05 3:56 
QuestionSQL DATENAME() QUESTION... Pin
lior654#hotmail.com24-Dec-05 18:58
lior654#hotmail.com24-Dec-05 18:58 
AnswerRe: SQL DATENAME() QUESTION... Pin
Colin Angus Mackay26-Dec-05 2:36
Colin Angus Mackay26-Dec-05 2:36 
lior654#hotmail.com wrote:
How can I use the DATENAME() function to get
the name of the month?


DATENAME() can accept a varchar as the date, so you can just create a random date, with the month as you want:
DECLARE @somedate varchar(20);
SET @somedate = '2005-01-01';
SELECT datename(month,@somedate);
This will return "January".

However, I would recommend that user interface type things like getting a month name are best carried out in the UI layer leaving the data layer to get on with things that it is good at (like manipulating the data in the database)


My: Blog | Photos

"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius


QuestionSQL Query Pin
karthik_dotnet123-Dec-05 20:09
karthik_dotnet123-Dec-05 20:09 
AnswerRe: SQL Query Pin
Gunvant Patel26-Dec-05 22:58
Gunvant Patel26-Dec-05 22:58 
GeneralRe: SQL Query Pin
Colin Angus Mackay27-Dec-05 0:38
Colin Angus Mackay27-Dec-05 0:38 
AnswerRe: SQL Query Pin
rihdus27-Dec-05 19:44
rihdus27-Dec-05 19:44 
QuestionCreate .Net SQL At Runtime Pin
Steve4523-Dec-05 6:46
Steve4523-Dec-05 6:46 
AnswerRe: Create .Net SQL At Runtime Pin
Colin Angus Mackay23-Dec-05 7:14
Colin Angus Mackay23-Dec-05 7:14 
GeneralRe: Create .Net SQL At Runtime Pin
Steve4523-Dec-05 7:47
Steve4523-Dec-05 7:47 
GeneralRe: Create .Net SQL At Runtime Pin
Colin Angus Mackay23-Dec-05 8:04
Colin Angus Mackay23-Dec-05 8:04 
GeneralRe: Create .Net SQL At Runtime Pin
Steve4523-Dec-05 13:33
Steve4523-Dec-05 13:33 
GeneralRe: Create .Net SQL At Runtime Pin
Glenn Dawson28-Dec-05 8:54
Glenn Dawson28-Dec-05 8:54 
QuestionDataset Thread Safety Pin
Tristan Rhodes23-Dec-05 2:25
Tristan Rhodes23-Dec-05 2:25 
QuestionQuery for display row as column Pin
PrakashBhaskar22-Dec-05 23:39
PrakashBhaskar22-Dec-05 23:39 
AnswerRe: Query for display row as column [edited] Pin
toxcct22-Dec-05 23:53
toxcct22-Dec-05 23:53 
GeneralRe: Query for display row as column Pin
PrakashBhaskar22-Dec-05 23:58
PrakashBhaskar22-Dec-05 23:58 
GeneralRe: Query for display row as column Pin
toxcct23-Dec-05 0:05
toxcct23-Dec-05 0:05 
Questionsound Pin
khurramzaidi22-Dec-05 21:32
khurramzaidi22-Dec-05 21:32 
AnswerRe: sound Pin
Colin Angus Mackay22-Dec-05 22:11
Colin Angus Mackay22-Dec-05 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.