4/19/17

DataStage Server Jobs - Date , TimeStamp Conversion

OConv(Iconv(YourField,"D/YMD"),"D-YMD[4,2,2]") : " 00:00:00"
OConv(Iconv(YourField,"D-YMD"),"D-YMD[4,2,2]") : " 00:00:00"
OConv(Iconv(YourField,"D/YMD"),"D-YM[2,2]") : " 00:00:00"


+++++++

OConv(Iconv(StageVar1,"D/MDY"),"D-YMD[4,2,2]"):" ":Oconv(StageVar2,"MT"):":":"00"

input > 9/30/2017 8:45   
Output> 2017-09-30 08:45:00

4/13/17

Date , Timestamp Conversions - SQL SERVER

select getdate()-90
Output :   2017-01-13 11:41:09.303

SELECT CONVERT(VARCHAR(19),getdate(),20) as X
Output : 2017-04-13 11:41:49

1/24/17

How to create a duplicate table in SQL Server


  • Login to the connection
  • Right click on the Database Name
  • Select Tasks
  • Select Export Data
  • Select Data Source Server Name and Database Name
  • Select Destination Server ( if you dont see your server name , add it manually) and Database Name
  • Then Select Copy Data from one or more tables or views
  • Then Select The Source Table you want to copy the data from                                                 Note : Change the Table Name if you are copying it to same Database
  • Then Select Next , check Run Immediately
  • Click Finish


Now the table will be created and Data will be copied.