Skip to main content

Posts

sql get month & year from date

SELECT OTDate as Date ,CONVERT(CHAR(4), OTDate, 100) as Month ,CONVERT(CHAR(4), OTDate, 120)as Year FROM Payroll_tblEmployeeOTHour

SQL Query Execution time of you in SQL Management Studio

You can check the Execution time of you SQL Query in SQL Management Studio. like this It is very simple that you just put your SQL Query in to the Estimated time execution query DECLARE @StartTime datetime DECLARE @EndTime datetime SELECT @StartTime=GETDATE() -- Write Your Query SELECT @EndTime=GETDATE() --This will return execution time of your query SELECT DATEDIFF(NS,@StartTime,@EndTime) AS [Duration in millisecs]

how replace null to 0 in sql query

If you want to replace the null value in 0 in your sql query like the output: you have to just write as  ISNULL(DC_Requisition.MainStockID,0) as MainStockId

How to disable specific grid column in kendo ui Grid on inline editing

If you want to stop editing on specific Grid column in Kendo Ui grid like this Just use theDataAnnotations [ Editable ( false )] in your custom class for the grid i am just share my code for your help using System; using System . Collections . Generic; using System . ComponentModel . DataAnnotations; using System . Linq; using System . Web; namespace FEWO . ViewModel { public class Limitation { public long Id { get; set; } public int? LFDNR { get; set; } public Guid? ob_guid { get; set; } public DateTime? von { get; set; } public DateTime? bis { get; set; } public string einschrank { get; set; } public string wtagvon { get; set; } public string wtagbis { get; set; } public int numtagvon { get; set; } public int? numtagbis { get; set; } public int? nummonvon { get; set; } public int? nummonbis { get; set; } public int? numjahrvon { get; set; } public ...

kendo ui web selected combobox value set in textbox

Here i am using razor view <div class="editor-label"> @Html.LabelFor(model => model.ob_guid,"Im Objekt") </div> <div class="editor-field"> @(Html.Kendo().ComboBoxFor(model=>model.ob_guid) .Name("categories") .HtmlAttributes(new { style = "width:300px",id="categories" }) .Placeholder("Select category...") .DataTextField("CategoryName") .DataValueField("CategoryId") .Filter(FilterType.Contains) .DataSource(source => { source.Read(read => { read . Action ( "GetCascadeCategories" , "Limitations" ); }); }) ) </div> <div class="editor-label"> @Html.LabelFor(model => model.von,"Code") </div> ...