[Solved] This procedure not working

[ad_1] The problem is not at the procedure it is at the calling. When you call the stored procedure, you need to declare and pass in the required parameter declare @NAME VARCHAR(50), @CITY VARCHAR(200), @MOBILE NUMERIC(20) execute GETDETAIL @AGE = 21, @NAME = @NAME OUTPUT, @CITY = @CITY OUTPUT, @MOBILE = @MOBILE OUTPUT SELECT @NAME, … Read more

[Solved] How can I write this stored procedure with EF in C# [closed]

[ad_1] SO is not a website when you throw everything here and expected people finish the job for you. Anyway, to give you some hint, I give you a straight suggestion: Select CostGroupId From CostGroups Where CostGroupType = 1 –> Stored these in A collection, like an array: var costGroupsIdArr = ctx.CostGroup.Where(x=>x.CostGroupType == 1).Select(x.CostGroupId).toArray(); Then … Read more

[Solved] How to convert the Varchar of sum to time using sql server 2008 [closed]

[ad_1] Try this: DECLARE @SUM VARCHAR(50)=’33.90′; SELECT CAST(CAST(LEFT(@SUM,CHARINDEX(‘.’,@SUM,0)-1) AS INT)+ CAST(SUBSTRING(@SUM,CHARINDEX(‘.’,@SUM,0)+1,LEN(@SUM)) AS INT)/60 AS VARCHAR(10))+’.’+ CAST(CAST(SUBSTRING(@SUM,CHARINDEX(‘.’,@SUM,0)+1,LEN(@SUM)) AS INT)%60 AS VARCHAR(10)) result: 34.30 1 [ad_2] solved How to convert the Varchar of sum to time using sql server 2008 [closed]

[Solved] Why is this cursor giving an error?

[ad_1] Given an input XML, you can use this simple XQuery statement to “shred” the XML into relational rows and columns – just do a simple INSERT INTO ….. and you’re done. No messy cursor nor OPENXML stuff needed… DECLARE @input XML = ‘<Salaray> <TransactionSalary EmpSL=”2″ Basic=”9860″ Grad_pay=”4100.00″ DA=”6282.00″ HRA=”2094″ MA=”300.00″ Ptax=”150.00″ pf=”2000″ Itax=”0.00″ LIC=”0.00″ … Read more

[Solved] Stored procedure takes too much time in if statement when i pass @ip=” and takes 0 sec with some value to @IP

[ad_1] As I wrote in the comment the answer of your first question is: If I understand your PRC well, in case of @IP = ” it should returns a wieder set of members. I think it is possible that the Username, Email or Country is longer in the member table then the @Temp table’s … Read more

[Solved] An unhandled exception of type ‘System.InvalidOperationException’ occurred in System.Data.dll?

[ad_1] You should either use this method: SqlCommand cmd = new SqlCommand(“dbo.workScheduleDataGrid”, sqlcon); or this method SqlCommand cmd = sqlcon.CreateCommand(); to create the command, but not both (the second assignment in your code overwrites the first one). With the second options, you need to specify the command to execute separarely: cmd.CommandText = “dbo.workScheduleDataGrid”; Also, do … Read more