Click here to Skip to main content
15,885,365 members
Home / Discussions / Database
   

Database

 
AnswerRe: Table Database Advice Pin
Richard Deeming22-Feb-18 0:53
mveRichard Deeming22-Feb-18 0:53 
GeneralRe: Table Database Advice Pin
JackMisani22-Feb-18 2:10
JackMisani22-Feb-18 2:10 
GeneralRe: Table Database Advice Pin
Mycroft Holmes22-Feb-18 12:15
professionalMycroft Holmes22-Feb-18 12:15 
GeneralRe: Table Database Advice Pin
JackMisani25-Feb-18 22:43
JackMisani25-Feb-18 22:43 
AnswerRe: Table Database Advice Pin
Eddy Vluggen22-Feb-18 6:51
professionalEddy Vluggen22-Feb-18 6:51 
AnswerRe: Table Database Advice Pin
jschell23-Feb-18 13:44
jschell23-Feb-18 13:44 
GeneralRe: Table Database Advice Pin
JackMisani25-Feb-18 22:49
JackMisani25-Feb-18 22:49 
QuestionError converting data type nvarchar to datetime Pin
indian14321-Feb-18 11:13
indian14321-Feb-18 11:13 
Hi All,

I have a stored procedure as below,
ALTER  PROCEDURE [dbo].[usp_Update_Service_Program_Detail] 
    @PK_Service_Program_County_RateCap_Detail int,
    @Unit_Type int,
    @Rate_Cap decimal(15,2),
    ----@County int,
    @ModifiedBy nvarchar(50),<br />
    @ModifiedOn datetime=getdate
AS
BEGIN 

select '220' 'Col' -- Test statement
    --Logic is here         
END  
But when I am running the stored procedure as below:
exec usp_Update_Service_Program_Detail @PK_Service_Program_County_RateCap_Detail= 53196434
, @Unit_Type=1
, @Rate_Cap=100
, @ModifiedBy='aaleemmo'
, @ModifiedOn=getdate

I am getting the following error:
Error converting data type nvarchar to datetime at @ModifiedOn=getdate

Why is it an error, when getdate returns datetime why should I convert it into Datetime again, when I try it, its giving me error. Can anybody please help me what is the way to execute it and I am getting similar problem from my C# code also, can anybody please help me in this regards.

Thanks in advance.

Thanks,

Abdul Aleem

"There is already enough hatred in the world lets spread love, compassion and affection."
AnswerRe: Error converting data type nvarchar to datetime Pin
Mycroft Holmes21-Feb-18 12:11
professionalMycroft Holmes21-Feb-18 12:11 
AnswerRe: Error converting data type nvarchar to datetime Pin
Member 1226788921-Feb-18 19:21
Member 1226788921-Feb-18 19:21 
QuestionNeed some suggestion Pin
indian14321-Feb-18 7:58
indian14321-Feb-18 7:58 
QuestionDBAs- What is your biggest pet peeve with developers? Pin
Member 1320002419-Feb-18 13:32
Member 1320002419-Feb-18 13:32 
JokeRe: DBAs- What is your biggest pet peeve with developers? Pin
Mycroft Holmes19-Feb-18 15:25
professionalMycroft Holmes19-Feb-18 15:25 
AnswerRe: DBAs- What is your biggest pet peeve with developers? Pin
Eddy Vluggen19-Feb-18 17:13
professionalEddy Vluggen19-Feb-18 17:13 
AnswerRe: DBAs- What is your biggest pet peeve with developers? Pin
ZurdoDev20-Feb-18 2:10
professionalZurdoDev20-Feb-18 2:10 
AnswerRe: DBAs- What is your biggest pet peeve with developers? Pin
S Douglas8-Mar-18 5:13
professionalS Douglas8-Mar-18 5:13 
QuestionCan a computer install multiple versions of SQL Server Management Studio ? Pin
Member 245846712-Feb-18 15:58
Member 245846712-Feb-18 15:58 
AnswerRe: Can a computer install multiple versions of SQL Server Management Studio ? Pin
Chris Quinn12-Feb-18 21:53
Chris Quinn12-Feb-18 21:53 
AnswerRe: Can a computer install multiple versions of SQL Server Management Studio ? Pin
phil.o13-Feb-18 0:16
professionalphil.o13-Feb-18 0:16 
GeneralRe: Can a computer install multiple versions of SQL Server Management Studio ? Pin
jschell13-Feb-18 15:26
jschell13-Feb-18 15:26 
GeneralRe: Can a computer install multiple versions of SQL Server Management Studio ? Pin
phil.o13-Feb-18 15:39
professionalphil.o13-Feb-18 15:39 
AnswerRe: Can a computer install multiple versions of SQL Server Management Studio ? Pin
MadMyche23-Feb-18 3:37
professionalMadMyche23-Feb-18 3:37 
QuestionHow can I convert SQL Server data file version ? Pin
Member 24584678-Feb-18 14:39
Member 24584678-Feb-18 14:39 
AnswerRe: How can I convert SQL Server data file version ? Pin
Mycroft Holmes8-Feb-18 14:57
professionalMycroft Holmes8-Feb-18 14:57 
AnswerRe: How can I convert SQL Server data file version ? Pin
Chris Quinn8-Feb-18 22:56
Chris Quinn8-Feb-18 22:56 

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.