Tuesday, June 28, 2016

Oracle SQL Convert systemdate to JD Edwards Julian

select
to_number(concat('1',to_char(sysdate,'YYDDD')))
from dual ;

Tuesday, June 14, 2016

Get data from SQL Server and paste in a Activesheet VBA

SQL_Set_Connection

'Debug.Print SQL_Str
Set rst = cnt.Execute("budget.dbo.SP_PIP_Excel") '''' '" & CoFilter & "' ,'*','" & cbo_LT & "'")

If rst.RecordCount = 0 Then
  MsgBox "No Data available - contact Administrator"
  'GoTo Finish
End If



Dim RptName As String
Dim RptShtName As String

RptName = "\\dc01cxbudpv01\budget_software\MCE_Report1.xlsx"
RptShtName = "Sheet1"

Dim objXL
Set objXL = CreateObject("Excel.Application")

'AppActivate objXL
Workbooks.Open (RptName)

Workbooks("MCE_Report1.xlsx").Activate
ActiveWorkbook.Sheets("Sheet1").Activate
Debug.Print ActiveWorkbook.Name
Debug.Print ActiveSheet.Name
'objXL.Calculation = xlCalculationAutomatic
'Set WB = objXL.ActiveWorkbook

'On Error Resume Next
'WB.Sheets("Results").Range("Data1").EntireRow.Delete
'WB.Sheets("Results").Range("Data1").CopyFromRecordset rst

ActiveSheet.Range("A1:A10000").CopyFromRecordset rst

Monday, June 13, 2016

Oracle Excel Connection anf connectionstring



Data -> From Other Sources->From Data connection Wizard->Other/Advance->Microsoft OLE DB Provider for Oracle-> next-> sever name same as source name -> user name and password and test connection.

Sunday, June 12, 2016

get Checked radio button Value


        alert(document.querySelector('input[name = "ProductPermId"]:checked').value);

Sunday, June 5, 2016

Javascript populate textbox

    document.getElementById("textbox").innerHTML = "youe teext";

Friday, June 3, 2016

Oracle 12 SQL SERVER link Error JD Edwards



The OLE DB provider "OraOLEDB.Oracle" for linked server "JDED1" supplied inconsistent metadata for a column. The column "MCMCU" (compile-time ordinal 1) of object ""CRPDTA"."F0006"" was reported to have a "LENGTH" of 12 at compile time and 24 at run time.



following is working


Select * from OPENQUERY(JDED1,'SELECT substr(MCMCU,1,12) MCMCU,substr(MCDL01,1,60)MCDL01  FROM CRPDTA.F0006') ORDER BY 1;