Put together a TIMESTAMP column and a DATE column?
Anyone,
How can I piece together two columns one with a DATE and one with a TIMESTAMP and get the date with the timestamp.
Ex.
col_A = '4/1/1999 12:00:00.000 AM'
col_B = '1/1/1900 9:24:47.000 AM'
Desired Result
new_val = '4/1/1999 9:24:47.000 AM'
Thanks in advance,
Miller
Here is a pruned down version of code:
CREATE OR REPLACE PROCEDURE MAXIMO.load_multiple_eq IS
CURSOR c1 IS
SELECT LOCATION,
ACTSTART,
COMPLETIONDATE,
COMPLETIONTIME,
SCHEDSTARTDATE,
SCHEDSTARTTIME
FROM MAXIMO.NIEHS_FEB_WOEQLIST ;
rec c1%ROWTYPE;
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO rec;
EXIT WHEN c1%NOTFOUND;
Insert into MAXIMO.WORKORDER ( WORKORDER.LOCATION ,
WORKORDER.ACTSTART ,
WORKORDER.ACTFINISH ,
WORKORDER.SCHEDSTART ,
WORKORDER.SCHEDFINISH )
Values (
rec.LOCATION, /* LOCATION */
SYSDATE, /* ACTSTART */
TO_TIMESTAMP(TO_CHAR(rec.COMPLETIONDATE,'MM/DD/YYYY')||' '||TO_CHAR(rec.COMPLETIONTIME,'HH.MI.SS AM'),'MM/DD/YYYY HH.MI.SSXFF AM') , /* ACTFINISH */
TO_TIMESTAMP(TO_CHAR(rec.SCHEDSTARTDATE,'MM/DD/YYYY')||' '||TO_CHAR(rec.SCHEDSTARTTIME,'HH.MI.SS AM'),'MM/DD/YYYY HH.MI.SSXFF AM') , /* SCHEDSTART */
rec.SCHEDFINISHDATE /* SCHEDFINISH */ );
END LOOP;
CLOSE c1;
END;Thanks,
Miller
Similar Messages
-
To repeat my problem, I've put together a slide presentation and am trying to get it on Youtube...have compiled photos and music under IPhoto, then moved it to ITunes to dump into YouTube, but can't get anything to go thru. Have submitted two previous slideshows and don't remember ever having this probem. Am sure I'm doing something wrong. Anyone have suggestion(s) as to how to get this on to Youtube. Have been stonewalled for the last two hours. Thank You.
Sanjam....you are having the identical problem I'm having. Re the response to your dilemma, I'm gonna see if there is a way to export. If I figure something out to get on YouTube will let you know and would appreiate you doing the same.
-
Is it possible to create an invoive that keeps a running total in one column and in another column keep total of monies spent from a starting amount of funding?
Hi Sara,
Many thanks for your reply. We just brought Adobe Acrobat XI Pro complete
with Adobe Forms Central, My manager asked whether I could use the forms
part to create a summary tracking sheet for all of our contracts.
Having looked at it I could see how to create a table that in the first
column deleted costs from a starting fund, and in the last keeps a running
total of all monies spent.
I agree, Excel does seem to be much better suited to the task. I was try
trying to comply with her request
Regards, -
OSB DB-Adapter and a date column: JCA exception ISO 8601 date format?
Hello
I work with Oracle Service Bus (eclipse oepe and jdev)
On database side I've a view with a date column (datatype=date!)
With JDev I create a DB Adapter with a select operation on that view. This db adapter can be successfully generated.
Now I import the generated artefacts (xsd, wsdl, jca) into my eclipse service-bus-project. Then I generate a business service based on the jca. Also this works fine.
Then I deploy the project to my developement osb. Also this works fine.
When I test my business service (osb test console), I get a runtime error:
Exception: com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException:
Exception Description: The object [03.07.70], of class [class java.lang.String], from mapping [org.eclipse.persistence.mappings.DirectToFieldMapping[geburtsdatum-->XYZ_VIW.GEBURTSDATUM]] with descriptor [ObjectRelationalDataTypeDescriptor(DB_Adabper_XZY.XZY--> [DatabaseTable(XYZ_XYZ_VIE)])], could not be converted to [class java.sql.Timestamp].
Zeichenfolgenwert im XML-Code kann nicht in java.sql.Date konvertiert werden.
Datenbanken akzeptieren zwar Zeichenfolgen, die Datumsangaben in verschiedenen Formaten darstellen, jedoch akzeptiert der Adapter nur Zeichenfolgen, die Datumsangaben im ISO-XML-Datumsformat darstellen.
Der Eingabewert muss das ISO 8601-Datumsformat YYYY-MM-DD aufweisen.
==> so this seems to be a date format problem. but why?
I've checked the view ---> it's a date!
After that I do not have any influence to change it - and actually I don't want to change it. It still should be a datatype of DATE.
Why does JDEV not correctly convert it?
Anyone had the same problem?
Any help would be appreciated.
Thanks
Best regards,
RetoOS is winXP
database is Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
Yes it is a datetime:
<xs:element name="geburtsdatum" type="xs:dateTime" minOccurs="0" nillable="true"/>
This is absolutelly correct. But on runtime, I'll get the date convertion error as mentionend above. It seems as the date cannot be converted from database date column to a osb date.
Strange, I didn't expect to have date format problems here.
I use
1.) Oracle Database (view) with a DATE column
2.) Oracle JDeveloper database adapter (generated db adapter based on view, point 1)
3.) Oracle Service Bus using the jca of generated database adapter, point 2)
So I think I don't have to set any date format, everything shoult be a DATE and therefore no formating has to be done by me, or am I wrong?
Best regards
Reto -
Calculate number of days based on System Date and a date column!
Hi everyone,
I have a query to run a report where the results has a column named “Due Date” which holds a date value based on the project submission date.
Now, I need to add 4 columns named, “45 Days Expectant”, “30 Days Overdue”, “60 Days Overdue” and “90 Days Overdue”.
I need to do a calculation based on the “Due Date” and “System (I mean default computer date) Date” that if “System Date” is 45 days+ to “Due Date” than put “Yes” in “45 Days Expectant” row.
Also, if “Due Date” is less than or equal to system date by 30 days, put “Yes” in “30 Days Overdue” and same for the 60 and 90 days.
For example the output should be like:
Is this possible? Can someone help me how to write this Case Statement please? I have some answers how to do it in SSRS (Report Designer) but I want to get the results using T-SQL...Thanks heaps...cheers...
artistdedigitalHi Jay,
Thanks but those dates are just a reference. The actual table contains hundreds of date rows... so I guess this technique will not work (not sure though)...
I am quite cool with this bit:
select duedate,
case when days > -45 and days < 0 then 'YES' else '' end as '45 Days Expectant',
case when days between 30 and 60 then 'YES' else '' end as '30 Days overdue',
case when days between 60 and 90 then 'YES' else '' end as '60 Days overdue',
case when days > 90 then 'YES' else '' end as '90 Days overdue'
from cte--------------------------------------------------------------------------------------------------But can you please explain this bit a more? Thanks for being so prompt though : )declare @tab table (duedate datetime)
insert @tab select '04/25/2014'
insert @tab select '02/10/2014'
insert @tab select '01/10/2014'
insert @tab select '12/10/2013'
;with cte
as
select duedate,datediff(dd,duedate,getdate()) as days
from @tab
artistdedigital -
Data Grid - issues resizing width of columns and with data refresh and sort
SQLDeveloper 1215 on Windows XP professional
Database : various 9.2
In the table data tab there are a few minor issues our developers have highlighted.
1) There seems to be a minimum column width in the data display. This restricts flexibility in reviewing the data, esp. where the data length is less than the minimum column width.
2) If a column is resized or the column order is changed and a refresh or a new filter is applied then the columns are restored to their original position and size making it frustrating to run more than one query via the GUI.
3) There is no quick sort option by clicking on the column heading which would be useful.I am still seeing this minimum column width in SQL Developer production (v1467) and I haven't seen any other posts relating to this. I have seen this all of the grids that I have looked at, including all of the grid based sub-tabs for the Object tabs (ie Columns, Data, Indexes, Constraints, etc) and the SQL Worksheet results tab.
It is very obvious with the Column Name and Data Type columns of the Table Columns tab - the Column Name column can be shrunk to truncate values but the Data Type column can only be shrunk to about the twice the width of the widest value.
Can anyone in development provide any comments about why we have this minimum width and how the minimum width is actually calculated? -
Point cloud and TIN data column types
Hi,
I am designing some tables using the new SQL Developer Data Modeler, and have added some columns which will store point clouds and TINs (both using the specialized Oracle data types). I have noticed in Data Modeler that the SDO_GEOMETRY data type is available to use as a column type, but the SDO_PC and SDO_TIN data types are not available for use. Or perhaps the column types for these data types are actually something else - perhaps integers (given that several tables may be used to store this specialized data)?
Thanks,
MattMaybe try Forum: SQL Developer:
SQL Developer -
Creating a view with existing GeoRaster columns and new SDO_GEOMETRY column
Hi,
In a nutshell, I already have 1 real table, which has several attributes including types such as text, numbers etc. but also a GeoRaster column. This table works great, has its metadata stored properly and is spatially indexed; no worries.
I am then creating a view based on the above mentioned table, including the GeoRaster column. This worked, no problems. However now I want the same view to also have a SDO_GEOMETRY column which explicitly stores the spatial extent for each GeoRaster. Note the original table does not have this SDO_GEOMETRY column. So, I have created a revised SQL statement to create the view, but now it dynamically adds a new column and puts the GeoRaster.spatialextents into the SDO_GEOMETRY column.
This worked, the data made it into the view, but when we try to view the SDO_GEOMETRY in a viewer, we get errors. I added a system metadata entry for the view, but this did not help. Also, it is not possible to spatially index a view so I knew that was not the problem.
I think what has happened is the SDO_GEOMETRY column is in a sort of "limbo", where because it was not contained in the original table (and indexed there) and it is not able to be indexed in a view, it cannot be manipulated/viewed/used spatially.
Here is a snippet describing the original table:
"IMAGERY_ID" NUMBER NOT NULL ENABLE,
"CAM_ANGLE_X" NUMBER,
"CAM_ANGLE_Y" NUMBER,
"CAM_ANGLE_Z" NUMBER,
"SPEED" NUMBER,
"HEADING" NUMBER,
"IMAGE_GEOR" "SDO_GEORASTER",
"ACQUISITION_TIME" TIMESTAMP (6),
"SENSOR_ID" NUMBER,
"DOWNWARD_LOOKING" CHAR(1 BYTE),
"ORG_ID" NUMBER,
"POC_ID" NUMBER,
"FILE_NAME" VARCHAR2(100 BYTE),
"CORRELATION_ID" VARCHAR2(256 BYTE),
And here is the statement I used to create the new view:
CREATE VIEW level_0_img_view (imagery_id, cam_angle_x, cam_angle_y, cam_angle_z, speed, heading, image_geor, acquisition_time, sensor_id, downward_looking, org_id, poc_id, file_name, correlation_id, geor_extents)
AS
SELECT a.imagery_id, a.cam_angle_x, a.cam_angle_y, a.cam_angle_z, a.speed, a.heading, a.image_geor, a.acquisition_time, a.sensor_id, a.downward_looking, a.org_id, a.poc_id, a.file_name, a.correlation_id, a.image_geor.spatialextent
FROM imagery a
WHERE a.file_name LIKE '%.lev0';
Note in the above statement that the "geor_extents" column is the new column added dynamically (and not in the original table). Note the new column with the SDO_GEOMETRY data is flawless, I have looked at the records in SQL developer and all the data is there.
Any ideas?
In case you're wondering, I do have reasons for: (i) wanting an explicit column with the SDO_GEOMTRY (serving via WFS), and (ii) not wanting to alter the original table to include the equivalent SDO_GEOMETRY column.
Cheers,
M.Hi,
if you are having problems to display your view spatial columns in MapBuilder/MapViewer, you may be missing to register the view information in the metadata (name and spatial columns).
For example, lets see the following table that simulates your case:
SQL> desc pci_image;
Name Null? Type
GEORID NOT NULL NUMBER
TYPE VARCHAR2(32)
GEORASTER MDSYS.SDO_GEORASTER
-- create a view
create view pci_img_view (georid,georaster,geor_extents)
as
select a.georid,a.georaster,a.georaster.spatialextent
from pci_image a;
-- register metadata for view spatial columns (GeoRaster and geometry column)
insert into user_sdo_geom_metadata
select 'PCI_IMG_VIEW','GEORASTER.SPATIALEXTENT', diminfo, srid
from user_sdo_geom_metadata where table_name = 'PCI_IMAGE'
insert into user_sdo_geom_metadata
select 'PCI_IMG_VIEW','GEOR_EXTENTS', diminfo, srid
from user_sdo_geom_metadata where table_name = 'PCI_IMAGE'
There is no need to index the spatial columns if they have been indexed before.
Now, if you go in MapBuilder you should see the the view name in the list of geometry tables, and be able to create a theme on column GEOR_EXTENTS (select it on the combo box) and to preview it.
For the GeoRaster column, currently the view name is not shown on the list of GeoRaster tables in MapBuilder.
For GeoRaster data, MapBuilder uses the contents of metadata view user_sdo_geor_sysdata, and then it would be needed to register the view contents there. We will talk with Jeffrey to check if there is any problem in registering
view contents in this metadata view. If the view name and georaster column is registered in user_sdo_geor_sysdata,
then it should show in MapBuilder. But you can still create a GeoRaster theme for this view using a SQL command, and should be able to preview it in MapBuilder.
-- create a GeoRaster theme based on view Georaster column.
insert into user_sdo_themes values (
'PCI_IMAGE_V_GEOR',
'View of georaster column',
'PCI_IMG_VIEW',
'GEORASTER',
'<?xml version="1.0" standalone="yes"?>
<styling_rules theme_type="georaster" raster_id="1" raster_table="RDT_PCI" raster_bands="0,1,2">
</styling_rules>');
-- commit changes
commit;
Joao -
I am developing an ETL tool which has to create SSIS packages dynamically (and later execute them without being edited in Data Tools). One of my proto type scenarios is a simple data flow from a flat file to a flat file - without anything in between.
However there is a problem with the columns of the flat file destination - it says it doesn't have any.
Saving the package to XML and opening the destination component in the advanced editor (tab "Input and Output Properties") really shows that are no input columns defined. One click on the tab "Column Mappings" however solves the
problem. The columns and the mapping are generated, the package can run.
I already tried to place "ReinitializeMetaData()" calls nearly anywhere in the code, for both components, unfortunately without success:
destinationComponentWrapper.AcquireConnections(null);
destinationComponentWrapper.ReinitializeMetaData();
destinationComponentWrapper.ReleaseConnections();
The actual error during validation is (When the line for column mapping in the code below is commented out):
"0xC020201B - The number of input columns for Flat File Destination.Inputs[Flat File Destination Inputs] cannot be zero"
I am also trying to insert a column mapping - this leads to a com error: 0xC020201B
In this case I am wondering why Data Tools tell me that there are no input columns yet I can iterate over them - they just don't have a valid ID (0x8000004B / -2147483573) which is then causing the 0xC020201B.
See also "PROBLEM HERE" marker in the code below.
How can I make the destination component recognize the columns programmatically, as when I click on the "Column Mappings" tab of the advanced editor of the component in Data Tools?
Here is the complete proto type code:
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dts = Microsoft.SqlServer.Dts;
namespace msdatapipe
class Program
static void Main(string[] args)
Dts.Runtime.Application application = new Dts.Runtime.Application();
Dts.Runtime.Package package = new Dts.Runtime.Package();
package.Name = "Data Commander DTS Package";
// ADD PIPELINE TASK
Dts.Runtime.Executable pipelineExecutable = package.Executables.Add("STOCK:PipelineTask");
Dts.Runtime.TaskHost pipelineTaskHost = (Dts.Runtime.TaskHost)pipelineExecutable;
pipelineTaskHost.Name = "Data Commander Pipeline Task";
Dts.Pipeline.Wrapper.MainPipe pipelineTask = (Dts.Pipeline.Wrapper.MainPipe) pipelineTaskHost.InnerObject;
// ADD SOURCE COMPONENT TO THE PIPELINE TASK
String sourceFilePath = "C:\\cmi\\tmp\\data.csv";
Dts.Runtime.ConnectionManager sourceConnectionManager = package.Connections.Add("FLATFILE");
sourceConnectionManager.ConnectionString = sourceFilePath;
sourceConnectionManager.Name = "Source Connection";
sourceConnectionManager.Description = "Source Connection Manager";
sourceConnectionManager.Properties["ColumnNamesInFirstDataRow"].SetValue(sourceConnectionManager, "True");
sourceConnectionManager.Properties["Format"].SetValue(sourceConnectionManager, "Delimited");
sourceConnectionManager.Properties["TextQualifier"].SetValue(sourceConnectionManager, "\"");
sourceConnectionManager.Properties["CodePage"].SetValue(sourceConnectionManager, "65001");
sourceConnectionManager.DelayValidation = false;
// START --- MANUALLY READ COLUMNS FROM TEXT FILE AND ADD TO SOURCE CONNECTION MANAGER COLUMNS
IDTSConnectionManagerFlatFile100 sourceConnectionInterface = sourceConnectionManager.InnerObject as IDTSConnectionManagerFlatFile100;
using (StreamReader reader = new StreamReader(sourceFilePath))
String firstSourceFileLine = reader.ReadLine();
String[] columnNames = firstSourceFileLine.Split(',');
for (int i = 0; i < columnNames.Length; ++i)
columnNames[i] = columnNames[i].Substring(1, columnNames[i].Length - 2);
IDTSConnectionManagerFlatFileColumns100 sourceColumns = sourceConnectionManager.Properties["Columns"].GetValue(sourceConnectionInterface) as IDTSConnectionManagerFlatFileColumns100;
IDTSConnectionManagerFlatFileColumn100 column = null;
foreach (String columnName in columnNames)
column = sourceColumns.Add();
column.DataType = DataType.DT_TEXT;
column.ColumnDelimiter = ",";
column.TextQualified = true;
(column as IDTSName100).Name = columnName;
Console.WriteLine(columnName);
column.ColumnDelimiter = "\r\n";
// END --- MANUALLY READ COLUMNS FROM TEXT FILE AND ADD TO SOURCE CONNECTION MANAGER COLUMNS
sourceConnectionInterface.RowDelimiter = "\r\n";
Dts.Pipeline.Wrapper.IDTSComponentMetaData100 sourceComponent = pipelineTask.ComponentMetaDataCollection.New();
sourceComponent.Name = "Flat File Source";
sourceComponent.ComponentClassID = "DTSAdapter.FlatFileSource";
sourceComponent.ValidateExternalMetadata = true;
CManagedComponentWrapper sourceComponentWrapper = sourceComponent.Instantiate();
sourceComponentWrapper.ProvideComponentProperties();
// LINK CONNECTION TO THE SOURCE COMPONENT
sourceComponent.RuntimeConnectionCollection[0].ConnectionManager = Dts.Runtime.DtsConvert.GetExtendedInterface(sourceConnectionManager);
sourceComponent.RuntimeConnectionCollection[0].ConnectionManagerID = sourceConnectionManager.ID;
// Connect to the data source, and then update the metadata for the source.
//sourceComponentWrapper.Validate();
//sourceComponentWrapper.ProvideComponentProperties();
sourceComponentWrapper.AcquireConnections(null);
sourceComponentWrapper.ReinitializeMetaData();
sourceComponentWrapper.ReleaseConnections();
// ADD DESTINATION CONNECTION MANAGER
Dts.Runtime.ConnectionManager destinationConnectionManager = package.Connections.Add("FLATFILE");
destinationConnectionManager.ConnectionString = "C:\\cmi\\tmp\\data_out.csv";
destinationConnectionManager.Name = "DatComConOut";
destinationConnectionManager.Description = "Data Commander Connection Manager";
destinationConnectionManager.DelayValidation = false;
destinationConnectionManager.Properties["Format"].SetValue(destinationConnectionManager, "Delimited");
destinationConnectionManager.Properties["TextQualifier"].SetValue(destinationConnectionManager, "\"");
destinationConnectionManager.Properties["CodePage"].SetValue(destinationConnectionManager, "65001");
// ADD DESTINATION COMPONENT
Dts.Pipeline.Wrapper.IDTSComponentMetaData100 destinationComponent = pipelineTask.ComponentMetaDataCollection.New();
destinationComponent.Name = "Flat File Destination";
destinationComponent.ComponentClassID = "DTSAdapter.FlatFileDestination";
destinationComponent.ValidateExternalMetadata = true;
CManagedComponentWrapper destinationComponentWrapper = destinationComponent.Instantiate();
destinationComponentWrapper.ProvideComponentProperties();
destinationComponent.RuntimeConnectionCollection[0].ConnectionManager = Dts.Runtime.DtsConvert.GetExtendedInterface(destinationConnectionManager);
destinationComponent.RuntimeConnectionCollection[0].ConnectionManagerID = destinationConnectionManager.ID;
// CREATE PATH
Dts.Pipeline.Wrapper.IDTSPath100 pipelinePath = pipelineTask.PathCollection.New();
pipelinePath.AttachPathAndPropagateNotifications(sourceComponent.OutputCollection[0], destinationComponent.InputCollection[0]);
// DESTION CONNECTION MANAGER COLUMNS
IDTSConnectionManagerFlatFile100 destinationConnectionInterface = destinationConnectionManager.InnerObject as IDTSConnectionManagerFlatFile100;
IDTSConnectionManagerFlatFileColumns100 destinationColumns = destinationConnectionManager.Properties["Columns"].GetValue(destinationConnectionManager) as IDTSConnectionManagerFlatFileColumns100;
// START --- MANUALLY READ COLUMNS FROM DESTINATION COMPONENT AND ADD THEM TO DESTIONATION CONNECTION MANAGER COLUMNS
foreach (IDTSInput100 input in destinationComponent.InputCollection)
IDTSVirtualInput100 virtualInput = input.GetVirtualInput();
IDTSConnectionManagerFlatFileColumn100 column = null;
foreach (IDTSVirtualInputColumn100 virtualInputColumn in virtualInput.VirtualInputColumnCollection)
column = destinationColumns.Add();
column.DataType = DataType.DT_TEXT;
column.ColumnDelimiter = ",";
column.TextQualified = true;
(column as IDTSName100).Name = virtualInputColumn.Name;
column.ColumnDelimiter = "\r\n";
// END --- MANUALLY READ COLUMNS FROM DESTINATION COMPONENT AND ADD THEM TO DESTIONATION CONNECTION MANAGER COLUMNS
// NEED TO CREATE NEW META DATA AFTER COLUMNS
destinationComponentWrapper.AcquireConnections(null);
destinationComponentWrapper.ReinitializeMetaData();
destinationComponentWrapper.ReleaseConnections();
// MAP INPUT COLUMNS
foreach (IDTSInput100 input in destinationComponent.InputCollection)
IDTSVirtualInput100 virtualInput = input.GetVirtualInput();
foreach (IDTSVirtualInputColumn100 virtualInputColumn in virtualInput.VirtualInputColumnCollection)
Console.WriteLine("VIC " + virtualInputColumn.Name + "(" + virtualInputColumn.ID + ")");
destinationComponentWrapper.SetUsageType(input.ID, virtualInput, virtualInputColumn.LineageID, DTSUsageType.UT_READONLY);
foreach (IDTSExternalMetadataColumn100 metadataColumn in input.ExternalMetadataColumnCollection)
if (virtualInputColumn.Name.Equals(metadataColumn.Name)) {
// PROBLEM HERE:
// An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in msdatapipe.exe
// Additional information: Exception HRESULT: 0xC0047072
// at this point is virtualInputColumn.ID = -2147483573
destinationComponentWrapper.MapInputColumn(input.ID, virtualInputColumn.ID, metadataColumn.ID);
// if the code is commented out and the program rerun there is a package validation error instead: 0xC020201B
// 0xC020201B - The number of input columns for Flat File Destination.Inputs[Flat File Destination Inputs] cannot be zero
// NEED TO CREATE META DATA AFTER COLUMNS HAVE BEEN ADDED TO THE DESTIONATION MANAGER
// AND USAGE TYPE HAS BEEN SET OR WE'LL GET A VS_NEEDSNEWMETADATA
destinationComponentWrapper.AcquireConnections(null);
destinationComponentWrapper.ReinitializeMetaData();
destinationComponentWrapper.ReleaseConnections();
// SAVING DTSX PACKAGE FOR DEBUGGING
application.SaveToXml("C:\\Users\\CMI\\documents\\visual studio 2010\\Projects\\SSIS Tutorial\\SSIS Tutorial\\generated.dtsx", package, null);
Microsoft.SqlServer.Dts.Runtime.DTSExecResult packageResults = package.Execute();
Console.WriteLine("package execution result: " + packageResults.ToString());
// Basic check for errors
foreach (DtsError error in package.Errors)
Console.WriteLine("ErrorCode : 0x{0:X}", error.ErrorCode);
Console.WriteLine(" SubComponent : {0}", error.SubComponent);
Console.WriteLine(" Description : {0}", error.Description);
Console.WriteLine("press the return key hard to continue...");
Console.Read();I suggest you revise your code against examples given in http://blogs.msdn.com/b/mattm/archive/2008/12/30/samples-for-creating-ssis-packages-programmatically.aspx
Arthur My Blog -
Transpose columns and rows / Switch columns and rows
Hello,
Is it possible to interchange columns and rows in order to create a left-to-right scrolling table instead of a top-to-bottom scrolling one?
In detail:
I have this:
| col 1 | col 2 | col 3
row 1 | | |
row 2 | | |
row 3 | | |
... | | |
...and want to have this:
| row 1 | row 2 | row 3 | ...
col 1 | | | |
col 2 | | | |
col 3 | | | |
Does anyone know if this is possible with the standard table or the ALV?
Thanks in advance & Kind regards,
RobertHi,
So there is no easy solution by just setting a flag in the ALV config!? ...too bad!
As for the dynamic creation:
Would there be an issue with different data types in one "column" (former row)? As a matter of fact there probably will be a mix of character, numbers, ...
Regards,
Robert -
Merge text formatted columns to single date column
Hi folks,
Not the most experienced of spreadsheet users, so hoping this is a quick fix:
I need to combine text data from columns A (Year), B (Month) & C (Date) into a new column as a date. I've tried a few combinations of =DATE(C2,B2,A2), but can't pinpoint the proper merge term.
I'd also like to know how to repeat the function down through several thousand rows without having to repeat the exercise for each row...
Many thanks,
MattDo you know that Apple designed two well done resources PDFs which every user may download from the Help Menu ?
There are :
Numbers User Guide
iWork Formulas and Functions User Guide.
In the second one we may see:
Your problem is that you used the reverse parameters ordering.
Yvan KOENIG (VALLAURIS, France) mercredi 14 avril 2010 18:32:27 -
Compare the values of multiple columns and take the column header
Hi all,
I have a table as follows:
acct-d1-d2-d3-d4-d5
101-1/2/2009- - - 3/2/2009-12/12/2009
102- - 10/10/2009- -12/25/2009-
acct is a number where as d,d2,d3,d4,d5 are date columns.
I need to write a query where i need to pick the maximum date for an acct.
for acct - 101 12/12/2009 should be picked up and for acct 102 12/25/2009.
output should be :
acct-dt
101-12/12/2009
102-12/25/2009
Thanks..Hi,
Starting in Oracle 11, you can use the UNPIVOT feature:
WITH unpivoted AS
SELECT acct
, column_name
, ROW_NUMBER () OVER ( PARTITION BY acct
ORDER BY dt DESC
) AS r_num
FROM mytab
UNPIVOT ( dt FOR column_name IN ( d1
, d2
, d3
, d4
, d5
SELECT acct
, column_name
FROM unpivoted
WHERE r_num = 1
; -
2 header columns and 3 body columns
Hi
i have designed a dynamic table with 2 header columns and the body rows are dynamic,
my requirement would have
an image attached to the cell1 of the body row each time it repeats ,i am getting the image field
from XML
my issue is
how to create a table with two header columns and have three body cloumns(including the image,
if say i have created a table with three columns , is there a way that we could supress the line between two cells that comes when we create a table.
Thanks in advance
please find the attached doc .Hi Paul
Thank you very much for the reply, yeah i tried to merge cells on my header colunm and it worked,
but on the body columns where i have 3 cells
cell1 -->LOGO_BENEFITS--> image field
cell2 ---> TITLE_BENEFITS -->text field
cell3---> STATUS_BENEFITS--->text field
here i have a issue (i dont know much of XML and i am passing the above 3 cells below as follows:
<SF5>
<LOGO_BENEFITS>C:\Logos\icon_SF5_grey.gif</LOGO_BENEFITS>
<TITLE_BENEFITS>BENEFIT1</TITLE_BENEFITS>
<STATUS_BENEFITS>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</STATUS_BENEFITS>
</SF5>
<SF5>
<LOGO_BENEFITS>C:\Logos\icon_SF6_grey.gif</LOGO_BENEFITS>
<TITLE_BENEFITS>BENEFIT2</TITLE_BENEFITS>
<STATUS_BENEFITS>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</STATUS_BENEFITS>
</SF5>
ISSUE 1.
1) i am not able to see the picture in the pdf. (for some reason it just showing blank space in place of the image_field) --(is there any thing wrong in the way i am appending the path for the pic in my XML)
2) considering the image shows up, how do i supress the two cells in to one in the body column (cell1 and cell2) .
Thanks again for your time
de1209 -
Compare a varchar2 segment column with a date column
Dear All ,
i have a segment column with datatype varchar2 with data sample like '2013/06/09 00:00:00' , i want to compare this column with date column
i tried many ways of conversion but not working like
select to_date(TO_NCHAR(substr('2013/06/09 00:00:00',1,11),'DD-MM-YY'))DATE_C from dual ---> giving invalid number
select TO_TIMESTAMP(TO_NCHAR(substr('2013/06/09 00:00:00',1,11),'DD-MM-YY'))DATE_C from dual ---> giving invalid number
can i have any suggestion for that please
thanks & best regardsHi,
Have you tried:
SELECT TO_DATE(SUBSTR('2013/06/09 00:00:00',1,10),'YYYY/MM/DD') DATE_C FROM dual
Octavio -
DIfference b/w expression builder logical column and derived logical column
Hi Experts,
Can anyone tellme the difference between expression builder (when we double click the logical column) of derived logical column and expression builder of logical column( we see this in column mapping of LTS) ??
Thanks in advance.Hi,
Formula given in the "expression builder of logical column( we see this in column mapping of LTS)" is performed on the physical layer of the RPD. I guess it is calculated in the Physical Query which is good for performance.
Formula in the expression builder of derived column is calculated in the BMM layer i.e in the logical query.
Regards,
Amrutha.
Maybe you are looking for
-
Keyword autocomplete not working in main interface (but works in import dialog)
Keyword autocompletion is not working for me in the Keywording panel of the Library. I type the first few letters o a known keyword, and nothing happens. The feature works as normal, however, in the Keyword section of the import diagog box. Does anyo
-
We are running payroll Run, after that prepayments.We have only two payment methods Cash And Bank Deposit.After running pre-payments system is showing payment status as Unpaid.How to Make it Paid
-
Doubt with FM 'GUI_UPLOAD'
DATA: BEGIN OF WA_MARA, matnr type matnr, numero type n, valor(2) type c, END OF WA_MARA. DATA: FF_PATH TYPE STRING. FF_PATH = 'C:\test_file.txt'. DATA: IT_MARA LIKE TABLE OF WA_MARA WITH HEADER LINE . CALL FUNCTION 'GUI_UPLOAD' EXPORTING FILENAME =
-
Photoshop opening 2 copies at the some time
Surprisingly could not find this in a search - At the moment its happening when I open a photo from Lightroom to edit in Photoshop. If I have one open and launch another from Lightroom it opens a separate copy of Photoshop. I can remember this also h
-
Long Connection Times Using ADO/ODBC and VB
I have written a Visual Basic program that connects to Oracle on the Unix server. When I first issue the connect command it takes 3 minutes to actually open the database. Once I am connected the program functions very efficiently. When I run the same