Check subcategory id with main category using check constraint
Some time we have to insert in a foreign key reference table where we have to […]
How to add hour and format datetime in moment js
var DprtforScn = new Date($("#DateOfService").val() + ' ' + $("#StartTime").val()); //alert(DprtforScn); var mday = moment('11:28 PM','hh:mm […]
select last child passing by parent id sql server
ALTER function [dbo].[fn_LastChild_Select] ( @ParentId int ) returns int as BEGIN Declare @childid int Declare @Id […]
Insert into where no exist
INSERT INTO dbo.miscDemographics_Relation(miscDemographics_Id,miscDemographics_MasterId,miscDemographics_CreatedDate) SELECT i.miscDemographics_ID,i.miscDemographics_MasterId,GETDATE() FROM inserted i –END WHERE NOT EXISTS (SELECT * FROM dbo.miscDemographics_Relation […]
How to create dynamic json for jplayer dynamic media file type
var jsonmedia = {}; jsonmedia[mediatype] = mediafile; jsonmedia["poster"] = "/pccas/Uploads/AttachedDoc/Big_Buck_Bunny_Trailer_480x270.png"; $("#jquery_jplayer_1").jPlayer({ ready: function () { $(this).jPlayer("setMedia", […]
split and compare date in sql server
ALTER FUNCTION fn_Select_Age_Range ( @dob datetime ) RETURNS nvarchar(200) AS BEGIN declare @year int declare @month […]
How to show structure of table
exec sp_help 'tablename'
Convert date from dd/mm/yyyy and get last date of month
For selecting converting var char to date. and replace with last date of the month of […]