Click here to Skip to main content
15,899,475 members
Home / Discussions / Database
   

Database

 
GeneralRe: Identity behavior in sql server 2008 and 2012 Pin
VK1912-Mar-18 2:27
VK1912-Mar-18 2:27 
GeneralRe: Identity behavior in sql server 2008 and 2012 Pin
jschell14-Mar-18 15:16
jschell14-Mar-18 15:16 
Questionmerge to output matched and not matched Pin
indian14328-Feb-18 11:09
indian14328-Feb-18 11:09 
AnswerRe: merge to output matched and not matched Pin
Jörgen Andersson7-Mar-18 11:07
professionalJörgen Andersson7-Mar-18 11:07 
Questionsql query to get code with max rank Pin
Member 927852427-Feb-18 6:55
Member 927852427-Feb-18 6:55 
AnswerRe: sql query to get code with max rank Pin
Richard Deeming27-Feb-18 7:58
mveRichard Deeming27-Feb-18 7:58 
AnswerRe: sql query to get code with max rank Pin
Paket Wisata Lombok28-Feb-18 6:01
professionalPaket Wisata Lombok28-Feb-18 6:01 
QuestionUnable to find Postgresql data source in Entity Data Model Wizard Pin
Sudhir Dehade27-Feb-18 1:19
Sudhir Dehade27-Feb-18 1:19 
Rant[REPOST] Unable to find Postgresql data source in Entity Data Model Wizard Pin
Richard Deeming27-Feb-18 2:12
mveRichard Deeming27-Feb-18 2:12 
GeneralMessage Closed Pin
27-Feb-18 2:14
Sudhir Dehade27-Feb-18 2:14 
RantRe: [REPOST] Unable to find Postgresql data source in Entity Data Model Wizard Pin
Richard Deeming27-Feb-18 2:20
mveRichard Deeming27-Feb-18 2:20 
GeneralMessage Closed Pin
27-Feb-18 2:23
Sudhir Dehade27-Feb-18 2:23 
GeneralRe: [REPOST] Unable to find Postgresql data source in Entity Data Model Wizard Pin
Richard Deeming27-Feb-18 2:26
mveRichard Deeming27-Feb-18 2:26 
GeneralRe: [REPOST] Unable to find Postgresql data source in Entity Data Model Wizard Pin
Sudhir Dehade27-Feb-18 2:30
Sudhir Dehade27-Feb-18 2:30 
QuestionTable Database Advice Pin
JackMisani22-Feb-18 0:36
JackMisani22-Feb-18 0:36 
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 

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.