Click here to Skip to main content
15,434,755 members
Home / Discussions / Database
   

Database

 
GeneralRe: OPENXML() and performance Pin
Kjetil Svendsen10-Jul-08 2:34
MemberKjetil Svendsen10-Jul-08 2:34 
QuestionInternal Processor Error Pin
mehrnoosh9-Jul-08 21:58
Membermehrnoosh9-Jul-08 21:58 
AnswerRe: Internal Processor Error Pin
John_Adams10-Jul-08 1:34
MemberJohn_Adams10-Jul-08 1:34 
GeneralRe: Internal Processor Error Pin
mehrnoosh14-Jul-08 22:17
Membermehrnoosh14-Jul-08 22:17 
QuestionConvert Decimal into Date Query?? Pin
obarahmeh9-Jul-08 20:30
Memberobarahmeh9-Jul-08 20:30 
AnswerRe: Convert Decimal into Date Query?? Pin
Paddy Boyd9-Jul-08 20:56
MemberPaddy Boyd9-Jul-08 20:56 
AnswerRe: Convert Decimal into Date Query?? Pin
Ashfield9-Jul-08 21:07
MemberAshfield9-Jul-08 21:07 
GeneralRe: Convert Decimal into Date Query?? Pin
obarahmeh9-Jul-08 22:35
Memberobarahmeh9-Jul-08 22:35 
Ashfield wrote:
Your STUFF is wrong.

stuff(stuff(CAST(DayTransTime AS char(8)),5,0,':'),3,0,':')

should do it.



I used your query, but it did not work, and the following is my new query with its error:
SELECT * FROM MyTable
WHERE convert(datetime, cast(DayTransDate AS char(8))
+ ' ' + STUFF(STUFF(CAST(DayTransTime AS char(6)), 5, 0, ':'), 3, 0, ':'))
> DATEADD(minute, -30, getdate());

The error: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
Do you have an idea to solve the previous error??

About your question of why do I use Decimal instead of datetime... I am connecting my application to read the data from another source where they are using Decimal data types in all cases instead of Date. So I just have no idea about the reason Sniff | :^) Sigh | :sigh: Unsure | :~

Kind Regards
OBarahmeh

GeneralRe: Convert Decimal into Date Query?? [modified] Pin
Ashfield10-Jul-08 1:27
MemberAshfield10-Jul-08 1:27 
GeneralRe: Convert Decimal into Date Query?? Pin
obarahmeh10-Jul-08 2:02
Memberobarahmeh10-Jul-08 2:02 
GeneralRe: Convert Decimal into Date Query?? Pin
Ashfield10-Jul-08 9:22
MemberAshfield10-Jul-08 9:22 
AnswerRe: Convert Decimal into Date Query?? [modified] Pin
leoinfo10-Jul-08 2:44
Memberleoinfo10-Jul-08 2:44 
GeneralRe: Convert Decimal into Date Query?? [modified] Pin
obarahmeh12-Jul-08 21:46
Memberobarahmeh12-Jul-08 21:46 
Questionhow to use index? very simple i want some basic information........... Pin
Shaik Haneef9-Jul-08 20:27
MemberShaik Haneef9-Jul-08 20:27 
AnswerRe: how to use index? very simple i want some basic information........... Pin
Paddy Boyd9-Jul-08 20:54
MemberPaddy Boyd9-Jul-08 20:54 
AnswerRe: how to use index? very simple i want some basic information........... Pin
Ashfield9-Jul-08 21:13
MemberAshfield9-Jul-08 21:13 
QuestionTransaction (Process ID 156) was deadlocked on lock Pin
sujithkumarsl9-Jul-08 18:23
Membersujithkumarsl9-Jul-08 18:23 
AnswerRe: Transaction (Process ID 156) was deadlocked on lock Pin
Ashfield9-Jul-08 21:22
MemberAshfield9-Jul-08 21:22 
Questiondatabase conection_string Pin
nelsonpaixao9-Jul-08 13:56
Membernelsonpaixao9-Jul-08 13:56 
AnswerRe: database conection_string Pin
Paddy Boyd9-Jul-08 20:59
MemberPaddy Boyd9-Jul-08 20:59 
AnswerRe: database conection_string Pin
Ashfield9-Jul-08 21:17
MemberAshfield9-Jul-08 21:17 
QuestionSQL FOR XML issue [modified] Pin
DerekFL9-Jul-08 7:59
MemberDerekFL9-Jul-08 7:59 
AnswerRe: SQL FOR XML issue Pin
leoinfo9-Jul-08 9:26
Memberleoinfo9-Jul-08 9:26 
QuestionDataTable validation event Pin
benallen0029-Jul-08 7:54
Memberbenallen0029-Jul-08 7:54 
AnswerRe: DataTable validation event Pin
DerekFL9-Jul-08 8:05
MemberDerekFL9-Jul-08 8:05 

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.