Click here to Skip to main content
15,868,048 members
Home / Discussions / Database
   

Database

 
AnswerRe: SQL 2008 Data Base Table Design suggestion Pin
Simon_Whale4-Dec-12 23:43
Simon_Whale4-Dec-12 23:43 
GeneralRe: SQL 2008 Data Base Table Design suggestion Pin
VishwaKL4-Dec-12 23:47
VishwaKL4-Dec-12 23:47 
GeneralRe: SQL 2008 Data Base Table Design suggestion Pin
Simon_Whale4-Dec-12 23:51
Simon_Whale4-Dec-12 23:51 
AnswerRe: SQL 2008 Data Base Table Design suggestion Pin
PIEBALDconsult5-Dec-12 3:56
mvePIEBALDconsult5-Dec-12 3:56 
Question[HELP] how to using array in my case? (Query & PHP) Pin
jimmy.suharry4-Dec-12 20:14
jimmy.suharry4-Dec-12 20:14 
AnswerRe: [HELP] how to using array in my case? (Query & PHP) Pin
Mycroft Holmes4-Dec-12 20:38
professionalMycroft Holmes4-Dec-12 20:38 
GeneralRe: [HELP] how to using array in my case? (Query & PHP) Pin
jimmy.suharry4-Dec-12 20:56
jimmy.suharry4-Dec-12 20:56 
QuestionSQL query Date Sort Problem Pin
AnirbanM 23-Dec-12 3:09
professionalAnirbanM 23-Dec-12 3:09 
I have a simple SQL table as follows:
SQL
CREATE TABLE [dbo].[DaysMonth](
    [SNo] [int] NOT NULL,
    [Month] [varchar](20) NOT NULL,
    [Year] [varchar](4) NOT NULL,
    [NoOfDays] [int] NOT NULL,
    [Days] [nchar](10) NULL,
    [Holiday] [nchar](1) NULL,
    [ToDate] [date] NULL,
    [Period] [nchar](30) NULL,

Following is the query:
Select SNo, NoOfDays, [Month], [Year], [Days], [Holiday] From DaysMonth Where [Period]='November,2012' order by ToDate

Now, i'm using this query in web application using ASP.Net environment and C# language within a loop. using SQL Server 2008. basic purpose here is to get all days within a period, say January,2012 in a sorted manner.
Out of 100 times running this query, 97-98 times, it's producing correct result, however, 1-2 times, sort is not working, so instead of 1st to 31st, output coming like 10th to 31st then 1st to 10th. Getting puzzled, as it's a huge application running on multi-user environment, getting very difficult to take care of error which is absolutely unpredictable and illogical. Please suggest where is the problem, thanks to all in advance.
AnswerRe: SQL query Date Sort Problem Pin
Ingo3-Dec-12 4:42
Ingo3-Dec-12 4:42 
GeneralRe: SQL query Date Sort Problem Pin
AnirbanM 23-Dec-12 18:46
professionalAnirbanM 23-Dec-12 18:46 
AnswerRe: SQL query Date Sort Problem Pin
Eddy Vluggen3-Dec-12 5:20
professionalEddy Vluggen3-Dec-12 5:20 
GeneralRe: SQL query Date Sort Problem Pin
AnirbanM 23-Dec-12 18:48
professionalAnirbanM 23-Dec-12 18:48 
GeneralRe: SQL query Date Sort Problem Pin
Eddy Vluggen3-Dec-12 23:00
professionalEddy Vluggen3-Dec-12 23:00 
AnswerRe: SQL query Date Sort Problem Pin
Corporal Agarn3-Dec-12 5:46
professionalCorporal Agarn3-Dec-12 5:46 
GeneralRe: SQL query Date Sort Problem Pin
AnirbanM 23-Dec-12 19:12
professionalAnirbanM 23-Dec-12 19:12 
AnswerRe: SQL query Date Sort Problem Pin
PIEBALDconsult3-Dec-12 8:50
mvePIEBALDconsult3-Dec-12 8:50 
GeneralRe: SQL query Date Sort Problem Pin
Mycroft Holmes3-Dec-12 13:12
professionalMycroft Holmes3-Dec-12 13:12 
GeneralRe: SQL query Date Sort Problem Pin
PIEBALDconsult3-Dec-12 13:18
mvePIEBALDconsult3-Dec-12 13:18 
GeneralRe: SQL query Date Sort Problem Pin
Mycroft Holmes3-Dec-12 16:18
professionalMycroft Holmes3-Dec-12 16:18 
GeneralRe: SQL query Date Sort Problem Pin
PIEBALDconsult3-Dec-12 17:29
mvePIEBALDconsult3-Dec-12 17:29 
GeneralRe: SQL query Date Sort Problem Pin
AnirbanM 23-Dec-12 18:57
professionalAnirbanM 23-Dec-12 18:57 
GeneralRe: SQL query Date Sort Problem Pin
AnirbanM 23-Dec-12 18:52
professionalAnirbanM 23-Dec-12 18:52 
AnswerRe: SQL query Date Sort Problem Pin
Mycroft Holmes3-Dec-12 16:24
professionalMycroft Holmes3-Dec-12 16:24 
GeneralRe: SQL query Date Sort Problem Pin
PIEBALDconsult3-Dec-12 17:28
mvePIEBALDconsult3-Dec-12 17:28 
GeneralRe: SQL query Date Sort Problem Pin
AnirbanM 23-Dec-12 19:07
professionalAnirbanM 23-Dec-12 19:07 

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.