Sunday 31 August 2014

SQLSERVER TIPS & TRICKS

--For Single Quote Special Character, need to use Single quote 2 times.
CHARINDEX :
charindex('"',BRule)

LEAD & LAG :
select RId,a.t_Attribute, LEAD(a.t_Attribute) over(partition by RId,a.Ctribute order by RId,a.Ctribute) Leadvalue, LAG(a.t_Attribute) over(partition by RId,a.Ctribute order by RId,a.Ctribute) LagValue,a.Ctribute
from  PCOLS

SUBSTRING & REPLACE :
1)substring(ppin,1,len(RIdentifier)
2)replace(brule,'.','_')


 

COURTS : CASES : LAWYERS : JUDGES : ::::::::: VICTIMS : ACCUSED

  *We have got so many SMART people in our COUNTRY. *we have got so many IIT completed SMART students in our COUNTRY. * we have got so many ...