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,'.','_')


 

TALEND TIPS & TRICKS

CONTAINS & EQUALS :

row1.contains("ram")
row2.equals("Name")

LASTINDEXOF :
("tFileList_1_CURRENT_FILE")).lastIndexOf("."))

SUBSTRING:
Input  :  "ABCD".substring(0,2)
Result :   ABC

GETTING CURRENT FILEPATH  IN tFILELIST :
((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))

GETTING CURRENT FILENAME FROM  tFILELIST :
((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(0,((String)globalMap.get
("tFileList_1_CURRENT_FILE")).lastIndexOf("."))

replace() Example :
-------------------------

we can use this for replacing special characters in a string
String input_row="abcd:[],kdkkxyzkll:[],";


 
String abc="{\"NOTIFICATION_RESPONSE\":{"+input_row.replace(":[],",":\"\"")+"}}";
System.out.println(abc);
Output : 
-----------
{"NOTIFICATION_RESPONSE":{abcd:""kdkkxyzkll:""}}
Note :  Go for replace() if  replaceAll() is not working.
replaceAll() will not work for dollar ($),doublequotes("),comma(,) etc special characters, in such
cases you can go for replace().

 

Saturday 30 August 2014

MICROSOFT WINDOWS SYSTEM TOOLS

SYSTEM RESTORE :
  1. Navigate to the Start -> All Programs -> Accessories -> System Tools program group.
     
  2. Click on the System Restore program icon.
GUI CHECK DISK COMMAND

1)Right Click on C drive. --> Properties.
2)Go to Tools Tab
3)Click on Check now Button
4) --Automatically File Fix System Errors
5) --Scan for And attempt recovery of Bad sectors
6)Check the above 2 properties
7)Click on Schedule Disk check

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 ...