Mapping refresh without database access
Hello. I asked this before about 10 months ago (and the answer was in the
negative back then), but am wondering if there's been any change...
Is it now possible to run mappingtool refresh without it trying to access
the database? i.e. Without the need to specify the following Connection
parameters:
javax.jdo.option.ConnectionUserName: xxx
javax.jdo.option.ConnectionPassword: xxx
javax.jdo.option.ConnectionURL: jdbc:oracle:thin:@xyz:1521:ABC
I just want to update/create the (file based) mappings without connecting to
a database.
..droo.
No, it is not possible.
Similar Messages
-
Entity bean for shared acces without database access
Hi all,
I would like to create an entity bean to store data common for all application users. This bean does not have to have a database link, it should only keep data in memory until no user left.
Is it possible ? And if yes, how ?
I have already created a session bean that works but only keep data for one users session, and I have created an entity bean but it seems that it requires a database link.
Thanks
SylvainSylvain,
I am assuming that you are using webdynpro for this.
You have a provision to use 'Dictionary' objects to handle CRUD operations in webdynpro and also at EJB level.
I can suggest you to handle this scenario in two ways.
1) If you are trying to perform the persistance at Webdynpro level, You can create the dictionary object straightaway in the webdynpro component.
2) If you are trying to perform persistance at EJB level using entity bean, I suggest you to maintain/create a dictionary object using your NWDS and access that Dictionary object at your entity bean using dictionary by packagename. Ofcourse you may have to write the CRUD operations code by urself.
I hope that this information would be most useful. -
OAS 10.1.2.0.2 - How configure PHP with database access
I Installed OAS 10.1.2.0.2 on SuSe 9.3.
I put in $ORACLE_HOME/Apache/Apache/htdocs a php pages for test if this OAS versión supported php.
The test is ok, this versión support PHP, but not are configured to PHP with database access.
My question is: How I configure this OAS 10.1.2.0.2 to use PHP with database access?
I need install all PHP although my php pages is running (without database access) ??? or I only need configure database access?How I compile my PHP with --with-oci8??
-
I live in an area with poor data reception. Will the Maps app work without internet access?
Google Maps
Type in 'Ok maps' (no quotes) in the search and press enter
It will download the map area shown on the screen for offline use -
Frequent Database Access through Java Mapping ?
I have to implement a Java Mapping Program which will require frequent database Access to compare and read table data from some other data base .
What is the most optimum procedure to implement it ?
Should i make a jdbc call every time from the code or should i use EJB(Session beans + Entity beans)...
or any other process besides these 2 to acheive maximum performance
Please Suggest
regards
Nilesh Taunk.Hi Nilesh,
I would suggest you to use XI DB Lookup API's for accessing Database. Eventhough it will not give you maximum performance, it will be very easy to change the configuration parameters in JDBC Adapter (No need for hardcoding user id/password/Driver details etc.) and you can refer the same in your Lookup API's.
Please refer the link: <a href="/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler Weblog</a>
Regards,
Ananth -
Export to PDF from populated c# Dataset without Database connection
I have Crystal Reports Developer Full version 11.5.12.1838, all versions of Visual Studio and about 100+ reports targeting printed paper.
They were developed over the last decade with the Developer Designer (and it's predecessors) and are based on SQL Server Stored Procedures. In the past, they were produced at runtime using a MS Access VBA application that either printed them or exported them to PDF files. I have successfully converted that application to C#, however a few problems: despite loading a populated dataset and setting all parameters, the runtime still wants to refresh the dataset. That works for 95% of all reports, but some just use null values for the parameters (despite having set them correctly), others mix the sequence of the parameters (despite querying them correctly) and some don't use the provided credentials. But that is not the main problem.
Now I need a way to produce (export to PDF) these reports at runtime based on a populated C# Dataset without database connectivity for the Crystal environment. The structure of the data in the Dataset is identical to what the stored procedure return in the development environment.
The question is: is that possible and what do I need in terms of version, SDK etc. Any advice (sample links) would be much appreciated.Hi Ludek;
Thanks for the hints. After many many hours of research and trial and error here are my findings:
Assigning a dataset to CR does NOT work - seems CR is just ignoring it completely. What does (partially) work is assigning a DataTable, however, if you try to do that with a main report and more than ONE sub-report, it fails with likely unrelated error messages (not yet implemented).
I took one of my reports and deleted all sub-reports. Assigned a DataTable at runtime - works fine. Added one sub-report that has a single field (picture) and loaded at runtime with a DataTable. No problem.
Removed that subreport and added another subreport that has a single text field. All good.
Now: having both sub-reports and having both subreports loaded from a DataTable fails. It works if one of the datasets is empty. It also works with 2 sub-reports returning text into their single field.
The DataTables are populated from the exact same stored procedures (and data source) that are embedded in the report from the design (CR XI) - essentially this should be a swap from internal to external fetch with no consequences.
I tried assigning using subDocument.SetDataSource and subDocument.Databas.Tables[0].SetDataSource - no difference.
The background of this: all my reports work just fine using VBA (Access), but that app will be retired and replaced by something C# based. In the meantime, the same report file has to work with both engines.
If I cannot get the DataTable assignment for sub-reports to work, there is a plan-b type possibility: replacing the stored procedure for some sub-reports at runtime - which works using SubReport.Database.Tables[0].Location.= "newSPName" as long as the new sp has no parameters like the old one.
The problem is that the new procedure has 2 parameters and I did not find a way to add them to the parameters collection (not allowed in sub-reports)
Anything that comes to your mind ?
Any help will be much appreciated
Thanks
Rolf -
Hi All,
I'm still struggling with the same cube and this is my 3rd post and once i fix some thing the other breaks. Please forgive me. When i process my cube i'm getting the error:
Errors in the back-end database access module. OLE DB was unable to convert a value to the data type requested for column 5.
My question is when the error says column 5 (is it the column 5 in the DSV?) or is it the column 5 in the DIMENSION list?
My next question is the DSV Query works perfectly fine , so why this error in cube? This is what i have in the query in DSV.
Please need help. In the below query both the column 5 (ArEASSIGNED TO VENDOR) in the CUBE and underlying table have the same data type and length VARCHAR(4000). Why is the process failing still?
SELECT [High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[compliancejoin]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_0],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[mowingsector]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_1],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[caseclosedflag]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_2],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casehasvendorinfo]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_3],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[mowingstatus]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_4],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[assignedtovendor]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_5],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[reassignedtovendor]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_6],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[currentvendor]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_7],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[invoiced]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTSInvoiced0_8],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[invoicedstatus]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_9],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casecloseddateid]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_10],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[assignedtovendordateid] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_11],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[reassigneddateid] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_12],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[currentassigneddateid] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_13],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[mowingduedateid] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_14],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[vendormoweddateid] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_15],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[captypename] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_16],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casetype] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTSCaseType0_17],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casenumbersubgroup] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_18],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casetownship] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_19],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casestatus] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTSCaseStatus0_20],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[caseopendateid] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_21],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casereferredtolegalflag]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_22],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casemacinitiatedflag] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_23],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[caseconversionstatusdesc]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_24],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[reasonforinvestigation] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_25],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[investigationopendateid]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_26],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[receiveddateid] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_27],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[assigned_department_staff]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_28],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[caseinitiator] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_29],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[vendorinvoiceamount] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_30],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[inspection_result] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_31],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[reason_for_complaint] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_32],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[vendor_action] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_33],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[complaint_source] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_34],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[contractcompliancevendor]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_35],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[invoicedstatusdateid] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_36],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[date_of_complaint_id] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_37],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[date_of_inspection_id] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_38],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casenumber] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTSCaseNumber0_39],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[parcelnumber] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_40],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[row_index] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTSROW_INDEX0_41]
FROM (SELECT CASE Isnumeric(
accela_staging.dbo.fact_highweedsandgrassdetails.vendorinvoiceamount)
WHEN 1 THEN Cast(
fact_highweedsandgrassdetails.vendorinvoiceamount AS
VARCHAR(
10))
END AS
Total_Dollar_Amount,
fact_highweedsandgrassdetails.casenumber,
fact_highweedsandgrassdetails.row_index,
fact_highweedsandgrassdetails.mowingsector,
fact_highweedsandgrassdetails.caseclosedflag,
fact_highweedsandgrassdetails.casecloseddateid,
fact_highweedsandgrassdetails.maccomments,
fact_highweedsandgrassdetails.lastfeeinvoicedateid,
fact_highweedsandgrassdetails.casehasvendorinfo,
fact_highweedsandgrassdetails.mowingstatus,
fact_highweedsandgrassdetails.receiveddateid,
fact_highweedsandgrassdetails.assignedtovendordateid,
fact_highweedsandgrassdetails.assignedtovendor,
fact_highweedsandgrassdetails.reassigneddateid,
fact_highweedsandgrassdetails.reassignedtovendor,
fact_highweedsandgrassdetails.currentvendor,
fact_highweedsandgrassdetails.currentassigneddateid,
fact_highweedsandgrassdetails.mowingduedateid,
fact_highweedsandgrassdetails.vendormoweddateid,
fact_highweedsandgrassdetails.invoiced,
fact_highweedsandgrassdetails.invoicedstatus,
fact_highweedsandgrassdetails.invoicedstatusdateid,
fact_highweedsandgrassdetails.vendorinvoicenumber,
fact_highweedsandgrassdetails.vendorcomments,
fact_casedetails.captypename,
fact_casedetails.casenumbersubgroup,
fact_casedetails.casetype,
fact_casedetails.township AS
CaseTownship,
fact_casedetails.casestatus,
fact_casedetails.caseopendateid,
fact_casedetails.referredtolegalflag AS
CaseReferredToLegalFlag,
fact_casedetails.macinitiatedflag AS
CaseMACInitiatedFlag,
fact_casedetails.conversionstatusdesc AS
CaseConversionStatusDesc,
fact_casedetails.assignedstaff AS
CaseAssignedStaff,
fact_casedetails.completedstaff AS
CaseCompletedStaff,
fact_casedetails.closedbystaff AS
CaseClosedByStaff,
fact_casedetails.initiator AS
CaseInitiator,
fact_casedetails.reasonforinvestigation,
fact_casedetails.primaryaddress,
fact_casedetails.parcelnumber,
Cast(Datediff([day],
fact_highweedsandgrassdetails.receiveddatetime,
COALESCE (fact_highweedsandgrassdetails.casecloseddate,
fact_highweedsandgrassdetails.vendormoweddate,
fact_highweedsandgrassdetails.recordimportdatetime)) AS
DECIMAL(6, 2))
AS
DaysOpen,
Cast(Datediff([day],
fact_highweedsandgrassdetails.receiveddatetime,
COALESCE
(fact_highweedsandgrassdetails.vendormoweddate,
fact_highweedsandgrassdetails.casecloseddate,
fact_highweedsandgrassdetails.recordimportdatetime)) AS
NUMERIC(9, 2))
* 24 AS
HoursOpenToMow,
Cast(Datediff([day],
fact_highweedsandgrassdetails.assignedtovendordate,
COALESCE
(fact_highweedsandgrassdetails.vendormoweddate,
fact_highweedsandgrassdetails.casecloseddate,
fact_highweedsandgrassdetails.recordimportdatetime)) AS
NUMERIC(9, 2))
* 24 AS
HoursAssignedToMow,
CASE
WHEN mowingstatus = 'Mowed'
OR mowingstatus = 'Closed' THEN 1
ELSE 0
END AS
NumberComplete,
fact_highweedsandgrassdetails.recordimportdatetime,
fact_casedetails.macsiebelnumber,
fact_highweedsandgrassdetails.mowingduedate,
fact_highweedsandgrassdetails.vendormoweddate,
fact_highweedsandgrassdetails.lastfeeinvoicedate,
fact_highweedsandgrassdetails.investigationopendatetime,
fact_highweedsandgrassdetails.investigationopendate,
fact_highweedsandgrassdetails.investigationopendateid,
Cast(Datediff([day],
fact_highweedsandgrassdetails.investigationopendatetime,
CASE
WHEN
( vendormoweddatetime IS NOT NULL
AND vendormoweddatetime <=
fact_highweedsandgrassdetails.casecloseddate ) THEN
fact_highweedsandgrassdetails.vendormoweddatetime
ELSE
CASE
WHEN (
fact_highweedsandgrassdetails.casecloseddate IS
NOT NULL
AND fact_highweedsandgrassdetails.casecloseddate
<=
fact_highweedsandgrassdetails.recordimportdatetime )
THEN
fact_highweedsandgrassdetails.casecloseddate
ELSE fact_highweedsandgrassdetails.recordimportdatetime
END
END) AS NUMERIC(9, 2)) * 24 AS
AbatementDurationHoursOLD,
Cast(Datediff([day],
fact_highweedsandgrassdetails.investigationopendatetime,
CASE
WHEN
COALESCE (vendormoweddatetime,
fact_highweedsandgrassdetails.casecloseddate) IS
NOT NULL THEN COALESCE (vendormoweddatetime,
fact_highweedsandgrassdetails.casecloseddate)
ELSE
CASE
WHEN ( fact_highweedsandgrassdetails.casecloseddate IS NOT NULL
AND fact_highweedsandgrassdetails.casecloseddate <=
fact_highweedsandgrassdetails.recordimportdatetime ) THEN
fact_highweedsandgrassdetails.casecloseddate
ELSE fact_highweedsandgrassdetails.recordimportdatetime
END
END) AS NUMERIC(9, 2)) * 24 AS
AbatementDurationHours,
fact_casedetails.assigneddepartment,
COALESCE (fact_casedetails.assignedstaff, '[null]')
+ '/'
+ COALESCE (fact_casedetails.assigneddepartment, '[null]') AS
Assigned_Department_Staff,
fact_highweedsandgrassdetails.casecloseddate,
fact_highweedsandgrassdetails.receiveddatetime,
fact_highweedsandgrassdetails.assignedtovendordate,
fact_highweedsandgrassdetails.vendorinvoiceamount,
fact_highweedsandgrassdetails.invoicedstatusdate,
fact_highweedsandgrassdetails.complaint_source,
fact_highweedsandgrassdetails.inspection_result,
fact_highweedsandgrassdetails.reason_for_complaint,
fact_highweedsandgrassdetails.contractcompliancevendor,
fact_highweedsandgrassdetails.vendor_action,
fact_highweedsandgrassdetails.date_of_complaint_id,
fact_highweedsandgrassdetails.date_of_inspection_id,
CONVERT(INT, Replace(Replace(fact_highweedsandgrassdetails.casenumber,
'HWG', 0)
, '-', 0)) AS compliancejoin,
fact_highweedsandgrassdetails.maccomments AS Expr1,
dbo.dim_highweedscensustracts.b1_census_tract
FROM dbo.fact_highweedsandgrassdetails
INNER JOIN dbo.fact_casedetails
ON fact_highweedsandgrassdetails.casenumber =
fact_casedetails.casenumber
INNER JOIN dbo.dim_highweedscensustracts
ON fact_highweedsandgrassdetails.casenumber =
dbo.dim_highweedscensustracts.casenumber
GROUP BY fact_highweedsandgrassdetails.casenumber,
fact_highweedsandgrassdetails.row_index,
fact_highweedsandgrassdetails.mowingsector,
fact_highweedsandgrassdetails.caseclosedflag,
fact_highweedsandgrassdetails.casecloseddateid,
fact_highweedsandgrassdetails.maccomments,
fact_highweedsandgrassdetails.lastfeeinvoicedateid,
fact_highweedsandgrassdetails.casehasvendorinfo,
fact_highweedsandgrassdetails.mowingstatus,
fact_highweedsandgrassdetails.receiveddateid,
fact_highweedsandgrassdetails.assignedtovendordateid,
fact_highweedsandgrassdetails.assignedtovendor,
fact_highweedsandgrassdetails.reassigneddateid,
fact_highweedsandgrassdetails.reassignedtovendor,
fact_highweedsandgrassdetails.currentvendor,
fact_highweedsandgrassdetails.currentassigneddateid,
fact_highweedsandgrassdetails.mowingduedateid,
fact_highweedsandgrassdetails.vendormoweddateid,
fact_highweedsandgrassdetails.invoiced,
fact_highweedsandgrassdetails.invoicedstatus,
fact_highweedsandgrassdetails.invoicedstatusdateid,
fact_highweedsandgrassdetails.vendorinvoicenumber,
fact_highweedsandgrassdetails.vendorcomments,
fact_casedetails.captypename,
fact_casedetails.casenumbersubgroup,
fact_casedetails.casetype,
fact_casedetails.township,
fact_casedetails.casestatus,
fact_casedetails.caseopendateid,
fact_casedetails.referredtolegalflag,
fact_casedetails.macinitiatedflag,
fact_casedetails.conversionstatusdesc,
fact_casedetails.assignedstaff,
fact_casedetails.completedstaff,
fact_casedetails.closedbystaff,
fact_casedetails.initiator,
fact_casedetails.reasonforinvestigation,
fact_casedetails.primaryaddress,
fact_casedetails.parcelnumber,
fact_highweedsandgrassdetails.vendormoweddatetime,
Cast(Datediff([day],
fact_highweedsandgrassdetails.receiveddatetime,
COALESCE (
fact_highweedsandgrassdetails.casecloseddate,
fact_highweedsandgrassdetails.vendormoweddate,
fact_highweedsandgrassdetails.recordimportdatetime))
AS
NUMERIC(9, 2)),
Cast(Datediff([day],
fact_highweedsandgrassdetails.receiveddatetime,
COALESCE (
fact_highweedsandgrassdetails.vendormoweddate,
fact_highweedsandgrassdetails.casecloseddate,
fact_highweedsandgrassdetails.recordimportdatetime))
AS
NUMERIC(9, 2)),
Cast(Datediff([day],
fact_highweedsandgrassdetails.assignedtovendordate,
COALESCE (
fact_highweedsandgrassdetails.vendormoweddate,
fact_highweedsandgrassdetails.casecloseddate,
fact_highweedsandgrassdetails.recordimportdatetime))
AS
NUMERIC(9, 2)),
CASE
WHEN mowingstatus = 'Mowed'
OR mowingstatus = 'Closed' THEN 1
ELSE 0
END,
fact_highweedsandgrassdetails.recordimportdatetime,
fact_casedetails.macsiebelnumber,
fact_highweedsandgrassdetails.mowingduedate,
fact_highweedsandgrassdetails.vendormoweddate,
fact_highweedsandgrassdetails.lastfeeinvoicedate,
fact_highweedsandgrassdetails.investigationopendatetime,
fact_highweedsandgrassdetails.investigationopendate,
fact_highweedsandgrassdetails.investigationopendateid,
Cast(Datediff([day],
fact_highweedsandgrassdetails.investigationopendatetime,
CASE
WHEN
( vendormoweddatetime IS NOT NULL
AND vendormoweddatetime <=
fact_highweedsandgrassdetails.casecloseddate ) THEN
fact_highweedsandgrassdetails.vendormoweddatetime
ELSE
CASE
WHEN (
fact_highweedsandgrassdetails.casecloseddate
IS NOT NULL
AND
fact_highweedsandgrassdetails.casecloseddate <=
fact_highweedsandgrassdetails.recordimportdatetime )
THEN
fact_highweedsandgrassdetails.casecloseddate
ELSE
fact_highweedsandgrassdetails.recordimportdatetime
END
END) AS NUMERIC(9, 2)),
Cast(Datediff(ss,
fact_highweedsandgrassdetails.investigationopendatetime,
CASE
WHEN
COALESCE (vendormoweddatetime,
fact_highweedsandgrassdetails.casecloseddate) IS
NOT NULL THEN COALESCE (vendormoweddatetime,
fact_highweedsandgrassdetails.casecloseddate)
ELSE
CASE
WHEN
( fact_highweedsandgrassdetails.casecloseddate IS NOT NULL
AND fact_highweedsandgrassdetails.casecloseddate <=
fact_highweedsandgrassdetails.recordimportdatetime ) THEN
fact_highweedsandgrassdetails.casecloseddate
ELSE fact_highweedsandgrassdetails.recordimportdatetime
END
END) AS NUMERIC(18, 2)) * 60,
fact_casedetails.assigneddepartment,
COALESCE (fact_casedetails.assignedstaff, '[null]')
+ '/'
+ COALESCE (fact_casedetails.assigneddepartment, '[null]'),
fact_highweedsandgrassdetails.casecloseddate,
fact_highweedsandgrassdetails.receiveddatetime,
fact_highweedsandgrassdetails.assignedtovendordate,
fact_highweedsandgrassdetails.vendorinvoiceamount,
fact_highweedsandgrassdetails.invoicedstatusdate,
fact_highweedsandgrassdetails.complaint_source,
fact_highweedsandgrassdetails.inspection_result,
fact_highweedsandgrassdetails.reason_for_complaint,
fact_highweedsandgrassdetails.contractcompliancevendor,
fact_highweedsandgrassdetails.vendor_action,
fact_highweedsandgrassdetails.date_of_complaint_id,
fact_highweedsandgrassdetails.date_of_inspection_id,
CONVERT(INT, Replace(
Replace(fact_highweedsandgrassdetails.casenumber, 'HWG', 0)
, '-', 0)),
fact_highweedsandgrassdetails.maccomments,
dbo.dim_highweedscensustracts.b1_census_tract) AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS]
ORDER BY [High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[compliancejoin]
ASC
SVI just counted the columns from the top:
1) compliancejoin, 2) mowingsector, 3) caseclosedflag, 4) casehasvendorinfo, 5) mowingstatus, 6) assignedtovendor.
I see now that your subject line talks about column 6, but you say column 5 in body of your original post.
I don't know anything about cubes, but apparently there is some mapping problem when you run it from SSAS. (I assume it is SSAS, a part of the product I'm entirely ignorant of.) I figured that if you had got tripped by the zero-based numbering, you
might be staring on the wrong column.
Erland Sommarskog, SQL Server MVP, [email protected] -
Hi All,
I'm still struggling with the same cube and this is my 3rd post and once i fix some thing the other breaks. Please forgive me. When i process my cube i'm getting the error:
Errors in the back-end database access module. OLE DB was unable to convert a value to the data type requested for column 5.
My question is when the error says column 5 (is it the column 5 in the DSV?) or is it the column 5 in the DIMENSION list?
My next question is the DSV Query works perfectly fine , so why this error in cube? This is what i have in the query in DSV.
Please need help. In the below query both the column 5 (ArEASSIGNED TO VENDOR) in the CUBE and underlying table have the same data type and length VARCHAR(4000). Why is the process failing still?
SELECT [High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[compliancejoin]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_0],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[mowingsector]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_1],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[caseclosedflag]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_2],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casehasvendorinfo]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_3],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[mowingstatus]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_4],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[assignedtovendor]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_5],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[reassignedtovendor]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_6],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[currentvendor]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_7],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[invoiced]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTSInvoiced0_8],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[invoicedstatus]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_9],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casecloseddateid]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_10],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[assignedtovendordateid] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_11],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[reassigneddateid] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_12],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[currentassigneddateid] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_13],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[mowingduedateid] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_14],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[vendormoweddateid] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_15],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[captypename] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_16],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casetype] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTSCaseType0_17],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casenumbersubgroup] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_18],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casetownship] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_19],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casestatus] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTSCaseStatus0_20],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[caseopendateid] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_21],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casereferredtolegalflag]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_22],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casemacinitiatedflag] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_23],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[caseconversionstatusdesc]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_24],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[reasonforinvestigation] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_25],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[investigationopendateid]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_26],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[receiveddateid] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_27],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[assigned_department_staff]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_28],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[caseinitiator] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_29],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[vendorinvoiceamount] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_30],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[inspection_result] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_31],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[reason_for_complaint] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_32],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[vendor_action] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_33],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[complaint_source] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_34],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[contractcompliancevendor]
AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_35],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[invoicedstatusdateid] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_36],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[date_of_complaint_id] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_37],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[date_of_inspection_id] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_38],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[casenumber] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTSCaseNumber0_39],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[parcelnumber] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS0_40],
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[row_index] AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTSROW_INDEX0_41]
FROM (SELECT CASE Isnumeric(
accela_staging.dbo.fact_highweedsandgrassdetails.vendorinvoiceamount)
WHEN 1 THEN Cast(
fact_highweedsandgrassdetails.vendorinvoiceamount AS
VARCHAR(
10))
END AS
Total_Dollar_Amount,
fact_highweedsandgrassdetails.casenumber,
fact_highweedsandgrassdetails.row_index,
fact_highweedsandgrassdetails.mowingsector,
fact_highweedsandgrassdetails.caseclosedflag,
fact_highweedsandgrassdetails.casecloseddateid,
fact_highweedsandgrassdetails.maccomments,
fact_highweedsandgrassdetails.lastfeeinvoicedateid,
fact_highweedsandgrassdetails.casehasvendorinfo,
fact_highweedsandgrassdetails.mowingstatus,
fact_highweedsandgrassdetails.receiveddateid,
fact_highweedsandgrassdetails.assignedtovendordateid,
fact_highweedsandgrassdetails.assignedtovendor,
fact_highweedsandgrassdetails.reassigneddateid,
fact_highweedsandgrassdetails.reassignedtovendor,
fact_highweedsandgrassdetails.currentvendor,
fact_highweedsandgrassdetails.currentassigneddateid,
fact_highweedsandgrassdetails.mowingduedateid,
fact_highweedsandgrassdetails.vendormoweddateid,
fact_highweedsandgrassdetails.invoiced,
fact_highweedsandgrassdetails.invoicedstatus,
fact_highweedsandgrassdetails.invoicedstatusdateid,
fact_highweedsandgrassdetails.vendorinvoicenumber,
fact_highweedsandgrassdetails.vendorcomments,
fact_casedetails.captypename,
fact_casedetails.casenumbersubgroup,
fact_casedetails.casetype,
fact_casedetails.township AS
CaseTownship,
fact_casedetails.casestatus,
fact_casedetails.caseopendateid,
fact_casedetails.referredtolegalflag AS
CaseReferredToLegalFlag,
fact_casedetails.macinitiatedflag AS
CaseMACInitiatedFlag,
fact_casedetails.conversionstatusdesc AS
CaseConversionStatusDesc,
fact_casedetails.assignedstaff AS
CaseAssignedStaff,
fact_casedetails.completedstaff AS
CaseCompletedStaff,
fact_casedetails.closedbystaff AS
CaseClosedByStaff,
fact_casedetails.initiator AS
CaseInitiator,
fact_casedetails.reasonforinvestigation,
fact_casedetails.primaryaddress,
fact_casedetails.parcelnumber,
Cast(Datediff([day],
fact_highweedsandgrassdetails.receiveddatetime,
COALESCE (fact_highweedsandgrassdetails.casecloseddate,
fact_highweedsandgrassdetails.vendormoweddate,
fact_highweedsandgrassdetails.recordimportdatetime)) AS
DECIMAL(6, 2))
AS
DaysOpen,
Cast(Datediff([day],
fact_highweedsandgrassdetails.receiveddatetime,
COALESCE
(fact_highweedsandgrassdetails.vendormoweddate,
fact_highweedsandgrassdetails.casecloseddate,
fact_highweedsandgrassdetails.recordimportdatetime)) AS
NUMERIC(9, 2))
* 24 AS
HoursOpenToMow,
Cast(Datediff([day],
fact_highweedsandgrassdetails.assignedtovendordate,
COALESCE
(fact_highweedsandgrassdetails.vendormoweddate,
fact_highweedsandgrassdetails.casecloseddate,
fact_highweedsandgrassdetails.recordimportdatetime)) AS
NUMERIC(9, 2))
* 24 AS
HoursAssignedToMow,
CASE
WHEN mowingstatus = 'Mowed'
OR mowingstatus = 'Closed' THEN 1
ELSE 0
END AS
NumberComplete,
fact_highweedsandgrassdetails.recordimportdatetime,
fact_casedetails.macsiebelnumber,
fact_highweedsandgrassdetails.mowingduedate,
fact_highweedsandgrassdetails.vendormoweddate,
fact_highweedsandgrassdetails.lastfeeinvoicedate,
fact_highweedsandgrassdetails.investigationopendatetime,
fact_highweedsandgrassdetails.investigationopendate,
fact_highweedsandgrassdetails.investigationopendateid,
Cast(Datediff([day],
fact_highweedsandgrassdetails.investigationopendatetime,
CASE
WHEN
( vendormoweddatetime IS NOT NULL
AND vendormoweddatetime <=
fact_highweedsandgrassdetails.casecloseddate ) THEN
fact_highweedsandgrassdetails.vendormoweddatetime
ELSE
CASE
WHEN (
fact_highweedsandgrassdetails.casecloseddate IS
NOT NULL
AND fact_highweedsandgrassdetails.casecloseddate
<=
fact_highweedsandgrassdetails.recordimportdatetime )
THEN
fact_highweedsandgrassdetails.casecloseddate
ELSE fact_highweedsandgrassdetails.recordimportdatetime
END
END) AS NUMERIC(9, 2)) * 24 AS
AbatementDurationHoursOLD,
Cast(Datediff([day],
fact_highweedsandgrassdetails.investigationopendatetime,
CASE
WHEN
COALESCE (vendormoweddatetime,
fact_highweedsandgrassdetails.casecloseddate) IS
NOT NULL THEN COALESCE (vendormoweddatetime,
fact_highweedsandgrassdetails.casecloseddate)
ELSE
CASE
WHEN ( fact_highweedsandgrassdetails.casecloseddate IS NOT NULL
AND fact_highweedsandgrassdetails.casecloseddate <=
fact_highweedsandgrassdetails.recordimportdatetime ) THEN
fact_highweedsandgrassdetails.casecloseddate
ELSE fact_highweedsandgrassdetails.recordimportdatetime
END
END) AS NUMERIC(9, 2)) * 24 AS
AbatementDurationHours,
fact_casedetails.assigneddepartment,
COALESCE (fact_casedetails.assignedstaff, '[null]')
+ '/'
+ COALESCE (fact_casedetails.assigneddepartment, '[null]') AS
Assigned_Department_Staff,
fact_highweedsandgrassdetails.casecloseddate,
fact_highweedsandgrassdetails.receiveddatetime,
fact_highweedsandgrassdetails.assignedtovendordate,
fact_highweedsandgrassdetails.vendorinvoiceamount,
fact_highweedsandgrassdetails.invoicedstatusdate,
fact_highweedsandgrassdetails.complaint_source,
fact_highweedsandgrassdetails.inspection_result,
fact_highweedsandgrassdetails.reason_for_complaint,
fact_highweedsandgrassdetails.contractcompliancevendor,
fact_highweedsandgrassdetails.vendor_action,
fact_highweedsandgrassdetails.date_of_complaint_id,
fact_highweedsandgrassdetails.date_of_inspection_id,
CONVERT(INT, Replace(Replace(fact_highweedsandgrassdetails.casenumber,
'HWG', 0)
, '-', 0)) AS compliancejoin,
fact_highweedsandgrassdetails.maccomments AS Expr1,
dbo.dim_highweedscensustracts.b1_census_tract
FROM dbo.fact_highweedsandgrassdetails
INNER JOIN dbo.fact_casedetails
ON fact_highweedsandgrassdetails.casenumber =
fact_casedetails.casenumber
INNER JOIN dbo.dim_highweedscensustracts
ON fact_highweedsandgrassdetails.casenumber =
dbo.dim_highweedscensustracts.casenumber
GROUP BY fact_highweedsandgrassdetails.casenumber,
fact_highweedsandgrassdetails.row_index,
fact_highweedsandgrassdetails.mowingsector,
fact_highweedsandgrassdetails.caseclosedflag,
fact_highweedsandgrassdetails.casecloseddateid,
fact_highweedsandgrassdetails.maccomments,
fact_highweedsandgrassdetails.lastfeeinvoicedateid,
fact_highweedsandgrassdetails.casehasvendorinfo,
fact_highweedsandgrassdetails.mowingstatus,
fact_highweedsandgrassdetails.receiveddateid,
fact_highweedsandgrassdetails.assignedtovendordateid,
fact_highweedsandgrassdetails.assignedtovendor,
fact_highweedsandgrassdetails.reassigneddateid,
fact_highweedsandgrassdetails.reassignedtovendor,
fact_highweedsandgrassdetails.currentvendor,
fact_highweedsandgrassdetails.currentassigneddateid,
fact_highweedsandgrassdetails.mowingduedateid,
fact_highweedsandgrassdetails.vendormoweddateid,
fact_highweedsandgrassdetails.invoiced,
fact_highweedsandgrassdetails.invoicedstatus,
fact_highweedsandgrassdetails.invoicedstatusdateid,
fact_highweedsandgrassdetails.vendorinvoicenumber,
fact_highweedsandgrassdetails.vendorcomments,
fact_casedetails.captypename,
fact_casedetails.casenumbersubgroup,
fact_casedetails.casetype,
fact_casedetails.township,
fact_casedetails.casestatus,
fact_casedetails.caseopendateid,
fact_casedetails.referredtolegalflag,
fact_casedetails.macinitiatedflag,
fact_casedetails.conversionstatusdesc,
fact_casedetails.assignedstaff,
fact_casedetails.completedstaff,
fact_casedetails.closedbystaff,
fact_casedetails.initiator,
fact_casedetails.reasonforinvestigation,
fact_casedetails.primaryaddress,
fact_casedetails.parcelnumber,
fact_highweedsandgrassdetails.vendormoweddatetime,
Cast(Datediff([day],
fact_highweedsandgrassdetails.receiveddatetime,
COALESCE (
fact_highweedsandgrassdetails.casecloseddate,
fact_highweedsandgrassdetails.vendormoweddate,
fact_highweedsandgrassdetails.recordimportdatetime))
AS
NUMERIC(9, 2)),
Cast(Datediff([day],
fact_highweedsandgrassdetails.receiveddatetime,
COALESCE (
fact_highweedsandgrassdetails.vendormoweddate,
fact_highweedsandgrassdetails.casecloseddate,
fact_highweedsandgrassdetails.recordimportdatetime))
AS
NUMERIC(9, 2)),
Cast(Datediff([day],
fact_highweedsandgrassdetails.assignedtovendordate,
COALESCE (
fact_highweedsandgrassdetails.vendormoweddate,
fact_highweedsandgrassdetails.casecloseddate,
fact_highweedsandgrassdetails.recordimportdatetime))
AS
NUMERIC(9, 2)),
CASE
WHEN mowingstatus = 'Mowed'
OR mowingstatus = 'Closed' THEN 1
ELSE 0
END,
fact_highweedsandgrassdetails.recordimportdatetime,
fact_casedetails.macsiebelnumber,
fact_highweedsandgrassdetails.mowingduedate,
fact_highweedsandgrassdetails.vendormoweddate,
fact_highweedsandgrassdetails.lastfeeinvoicedate,
fact_highweedsandgrassdetails.investigationopendatetime,
fact_highweedsandgrassdetails.investigationopendate,
fact_highweedsandgrassdetails.investigationopendateid,
Cast(Datediff([day],
fact_highweedsandgrassdetails.investigationopendatetime,
CASE
WHEN
( vendormoweddatetime IS NOT NULL
AND vendormoweddatetime <=
fact_highweedsandgrassdetails.casecloseddate ) THEN
fact_highweedsandgrassdetails.vendormoweddatetime
ELSE
CASE
WHEN (
fact_highweedsandgrassdetails.casecloseddate
IS NOT NULL
AND
fact_highweedsandgrassdetails.casecloseddate <=
fact_highweedsandgrassdetails.recordimportdatetime )
THEN
fact_highweedsandgrassdetails.casecloseddate
ELSE
fact_highweedsandgrassdetails.recordimportdatetime
END
END) AS NUMERIC(9, 2)),
Cast(Datediff(ss,
fact_highweedsandgrassdetails.investigationopendatetime,
CASE
WHEN
COALESCE (vendormoweddatetime,
fact_highweedsandgrassdetails.casecloseddate) IS
NOT NULL THEN COALESCE (vendormoweddatetime,
fact_highweedsandgrassdetails.casecloseddate)
ELSE
CASE
WHEN
( fact_highweedsandgrassdetails.casecloseddate IS NOT NULL
AND fact_highweedsandgrassdetails.casecloseddate <=
fact_highweedsandgrassdetails.recordimportdatetime ) THEN
fact_highweedsandgrassdetails.casecloseddate
ELSE fact_highweedsandgrassdetails.recordimportdatetime
END
END) AS NUMERIC(18, 2)) * 60,
fact_casedetails.assigneddepartment,
COALESCE (fact_casedetails.assignedstaff, '[null]')
+ '/'
+ COALESCE (fact_casedetails.assigneddepartment, '[null]'),
fact_highweedsandgrassdetails.casecloseddate,
fact_highweedsandgrassdetails.receiveddatetime,
fact_highweedsandgrassdetails.assignedtovendordate,
fact_highweedsandgrassdetails.vendorinvoiceamount,
fact_highweedsandgrassdetails.invoicedstatusdate,
fact_highweedsandgrassdetails.complaint_source,
fact_highweedsandgrassdetails.inspection_result,
fact_highweedsandgrassdetails.reason_for_complaint,
fact_highweedsandgrassdetails.contractcompliancevendor,
fact_highweedsandgrassdetails.vendor_action,
fact_highweedsandgrassdetails.date_of_complaint_id,
fact_highweedsandgrassdetails.date_of_inspection_id,
CONVERT(INT, Replace(
Replace(fact_highweedsandgrassdetails.casenumber, 'HWG', 0)
, '-', 0)),
fact_highweedsandgrassdetails.maccomments,
dbo.dim_highweedscensustracts.b1_census_tract) AS
[High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS]
ORDER BY [High_x0020_Weeds_x0020_and_x0020_Grass_x0020_FACTS].[compliancejoin]
ASC
SVI just counted the columns from the top:
1) compliancejoin, 2) mowingsector, 3) caseclosedflag, 4) casehasvendorinfo, 5) mowingstatus, 6) assignedtovendor.
I see now that your subject line talks about column 6, but you say column 5 in body of your original post.
I don't know anything about cubes, but apparently there is some mapping problem when you run it from SSAS. (I assume it is SSAS, a part of the product I'm entirely ignorant of.) I figured that if you had got tripped by the zero-based numbering, you
might be staring on the wrong column.
Erland Sommarskog, SQL Server MVP, [email protected] -
Database access code in objects constructor, or in data access object
Given an object that is stored in a database, is it better to have the database access code in a constructor method, or a data access layer object? E.g. I have a Person class
public class Person{
int Id;
String name;
int age;
}When I want to read a person's details from the database, I could use a constructor something like this:
public Person(int id){
Connection con = getDatabaseConnection();
ResultSet rs = con.createStatement().executeQuery("Select name, age from person where person_id = " + id);
rs.next();
this.name = rs.getString(1);
this.age=rs.getInt(2);
}Or I could use a method in a data access object :
public Person getPerson(int id){
Person p = new Person();
Connection con = getDatabaseConnection();
ResultSet rs = con.createStatement().executeQuery("Select name, age from person where person_id = " + id);
rs.next();
p.setName(rs.getString(1));
p.setAge(rs.getInt(2));
return p;
}It seems to me that the constructor approach has two advantages
(1) the SQL code is kept in the relevant class (so if I want to add a field to Person, I only have to make changes to the Person class)
(2) I don't have to have a setter method for each field
Is one or other of these ways generally recognized as 'best practise'?malcolmmc wrote:
But then, on the other hand, everytime a Person gains a new field that's two places you have to change it. if the persistence interface is written in terms of the object and uses ORM, I don't have to touch the implementation. all i have to do is update the object, the database, and the mapping - just like you and your home brew ORM.
besides, so what? i'd fear the resource leak, bad layering, more difficult testing more.
Actually lately I've used annotations to label setters with database field names and run a simple home brew ORM to convert rows into objects even when not using a more complex persistence manager.home brew ORM? why is that necessary when you can choose from hibernate, ibatis, jdo, jpa, etc.? that's just nuts.
% -
How to handle and manage a multi Database access in runtime with LCDS?
Hello there
I got several customer working with the same application and I wonder how, with LCDS, to manage in a runtime a multi dataBase access; without creating a configuration "mxl" file in
the folder catalina for each database.
Indeed, each customer have their own dataBase, and so far, I did not find out how to avoid creating a config xml file in catalina for every single database; which force me to create as well for each customer a folder application, since the name of the config file in catalina require a folder application to be ran under tomcat....
Thus, my question is :
Is there anyway to create only one configuration mxl file in catalina (in the server side) and then from the client side (application) let the user select its environment (meaning its database) to run the application.... this technic can be also used for multi database environment such as : Dev / Test / Prod environment (or database) where the same application can access to.
Please if any one have an idea or already delt with; just let me know, because I'm entering in a bootle neck and the situation is getting serioulsy critical....
RegardsHello Ulrich,
with compact and repair I mean the MSAccess function "Compact and Repair".
Please follow the link below for more details:
http://office.microsoft.com/en-us/access-help/compact-and-repair-an-access-file-HP005187449.aspx
Normally you can execute this function directly in Access or with the Windows ODBC Data Sources Administrator => "Control Panel" => "Administrative Tools" => "Data Sources (ODBC)"...
I want to execute this function via cvi code and not by hand ;-).
Thank you for your support.
Frank -
simple idea, impossble method.
I am training to allow acces to a local database either through Flash, Captivate or other application. The only issues are i need to do it without internet access or the executable being installed on user machine.
So unless im an missing something, that rules out AS3, Javascript ( as i cannot rely on all user having a virtual server to run php) or use of Abode Air.
If there is a way or something that i am completey over looking please tell me.apg wrote:
Where does the lag occur? In the original post you say it's after
When I initiate pacman -Syu, during the "Synchronizing package database..." dialogue it lags for way too long.
but then later you say
Typically that dialogue lasts for like half a second before going straight to the mirror. This lags for about 15-20 seconds or so.
I'm referring to the same "Synchronizing package database..." dialogue. I'm watching the internet monitor to see if during that time its pinging the mirrors, but there is no internet activity for a good while. Which suggests it could be related to a lag in accessing the local database on my desktop.
rgedit: I should be more specific. Typically the Synchronizing package database dialogue would take maybe .5 of a second but since about three days ago it is taking much longer. Even after changing the mirrorlist (even switching the top mirror in the mirrorlist file) and issuing the "pacman-optimize && sync" command I still get the same results.
Last edited by rg_arc (2014-11-07 21:42:39) -
How to handle and Manage Multi DataBase access with LCDS in runtime ?
Hello there
I got several customer working with the same application and I wonder how, with LCDS, to manage in a runtime a multi dataBase access; without creating a configuration "mxl" file in
the folder catalina for each database.
Indeed, each customer have their own dataBase, and so far, I did not find out how to avoid creating a config xml file in catalina for every single database; which force me to create as well for each customer a folder application, since the name of the config file in catalina require a folder application to be ran under tomcat....
Thus, my question is :
Is there anyway to create only one configuration mxl file in catalina (in the server side) and then from the client side (application) let the user select its environment (meaning its database) to run the application.... this technic can be also used for multi database environment such as : Dev / Test / Prod environment (or database) where the same application can access to.
Please if any one have an idea or already delt with; just let me know, because I'm entering in a bootle neck and the situation is getting serioulsy critical....
RegardsHello Ulrich,
with compact and repair I mean the MSAccess function "Compact and Repair".
Please follow the link below for more details:
http://office.microsoft.com/en-us/access-help/compact-and-repair-an-access-file-HP005187449.aspx
Normally you can execute this function directly in Access or with the Windows ODBC Data Sources Administrator => "Control Panel" => "Administrative Tools" => "Data Sources (ODBC)"...
I want to execute this function via cvi code and not by hand ;-).
Thank you for your support.
Frank -
Hi All,
I am using oracle 11g client library on Linux 64bit machine and trying to connect to oracle database using jdbc thin driver.
The url format what I am trying to use is:
jdbc:oracle:thin:@IP address:port:service_name
When service_name = orcl : I am able to connect with the above syntax.
But when the service_name is having . e.g service_name = orcl.177.39.45, with the above format I get the above error.
If I change the URL syntax to following, it works
jdbc:oracle:thin:@IP address:port/service_name
But both seems to be valid syntax.
So I would like to undestand the reason behind the same.
When service_name is having ".", why ":" does not work and "/" works and when the service_name is without " ." , 1st format works.
Is there any specific reason behind same?
Please let me know,
Thanks,
AaratiHello,
as per the suggetion, I replaced the URL in the format
URL=jdbc:oracle:thin:@15.154.47.235:1521/ORCL
original URL :
URL=jdbc:oracle:thin:@15.154.47.235:1521:ORCL
With this I was able to access the main page and was not getting database access.
But when I tried to perform some operations say list the submitted jobs, our application internally contacts Oracle database and gets the information stored in the database.
its not able to get and it throws exception.
So is there any reason behind this?
Pasting our application logs for your referance
Thu Aug 08 17:03:33 http-0.0.0.0-9000-1: [ERROR] Exception occurred
com.hp.om.hpos.model.OperationException: Error listing jobs
at com.hp.om.hpos.model.DPAUtils.DPAlistJobsInDB(DPAUtils.java:98)
at com.hp.om.hpos.model.DomainGroup.listSubJobsInDB(DomainGroup.java:96)
at com.hp.om.hpos.model.DomainGroup.listSubJobs(DomainGroup.java:91)
at com.hp.om.wc.model.jobmanager.pagingmanager.PagingManager.ListJobs(PagingManager.java:381)
at com.hp.om.wc.webapp.jobmanager.actions.AbstractJobSearchAction.loadSortedJobListing(AbstractJobSearchAction.java:49)
at com.hp.om.wc.webapp.jobmanager.actions.AbstractJobSearchAction.loadJobListing(AbstractJobSearchAction.java:30)
at com.hp.om.wc.webapp.jobmanager.actions.BasicSearchAction.doExecute(BasicSearchAction.java:358)
at com.hp.om.wc.webapp.jobmanager.actions.WCBaseAction.execute(WCBaseAction.java:81)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
~
~
Thanks,
aarati -
Database access from session bean
Hello,
I have a stateless session bean which performs some complex
calculations, and also does some database access.
For the database access the bean class has a datasource as
follows:
public class TestBean implements SessionBean {
private DataSource ds_;
public void ejbCreate() {
getDataSources();
private void getDataSources() {
try {
Context ictx = new InitialContext();
ds_ = (DataSource)ictx.lookup("java:comp/env/jdbc/TestDB");
} catch (Exception e) {
e.printStackTrace();
throw new EJBException(e);
Now this class has a method (which is also in the remote interface)
calculateSomething(). This method constructs a number of other
objects that do the actual calculation, and one of these objects
does the actual database access. How would another object be able to
use the datasource that was constructed in the bean class?
I could pass the datasource reference to that object, but that would
break my encapsulation. This is because that object does not get
created directly by the bean object, but rather the way the objects
interact is something like A -> B -> C, where A is the TestBean, and
C is the object that does the DB access. If I passed the datasource,
I would need to make B aware of the datasource, which doesn't
seem good design, because B doesn't do any database access.
Alternatively I could do the lookup in class C, but that would
degrade the performance, as an object C gets created and destroyed
every time the calculateSomething() method is called.
A third option I have thought of, is to add a public method to the
bean that returns a connection. Whenever another object gets
created, a reference to the bean object will be passed along. Then,
if another object needs to do database access, it will call back
the bean to get a connection. This seems just as bad (if not worse)
than the first option.
Does anyone have an elegant solution for this situation? What is
the best practice of handling datasources when a bean class doesn't
do the database access itself? In all the examples I've seen so far,
all the functionality was in the session bean class, but again that
doesn't seem good OO design, and would result in a single huge class.
regards,
KostasThanks again to both for the replies. Here are my responses:
Yi Lin: Yes, I know that an entity bean would solve this problem, however it has been decided not to use entity beans so this is not my call (I think the reason entity beans are not allowed in this project is that they are considered risky: there are other applications that access the same database, so if the container caches entity bean data as you describe, then the users might get inconsistent results).
Gerard: Actually object B is the one that has the business logic and C is a peer object that only does database access and no calculaitons. For example B can be Customer, and C CustomerDB. This is why object B does not have any knowledge of datasources or connections. So my design does not appear to be that bad!
As far as the factory you propose is concerned, I cannot understand how this would solve my problem. In order to solve this situation the factory would need to be persistent, i.e. get created by the ejbCreate() method, and destroyed whenever the container decides to destroy the bean. There would be no point in object C creating the factory, as I would have the overhead of doing the JNDI lookup every time I create a C.
So the question remains the same: how would I pass a reference to the factory from A to C without making B aware of it? -
Servlet with Database Access!!!
Hi !!!!
I have deployed HelloServlet with Oracle Application Server 4.0.8.1.
Now I want to connect from Servlet to Oracle8i 8.1.5.
But, when I try to deploy a Servlet with Database Access, I receive the next:
"Get operation not allowed"
The URL used is:
http://host.domain:port/virtual_path/class_name
The servlet was compiled using the Sun's jdk from command line. There wasn't compilation errors.
I run a simple application with database access from command line without problems.
The drivers and JDBC libraries are operating for this simple application.
Any help will be appreciated.
Many thanks
SergioIf you are running OAS 4.0.8.1 and Oracle 8.1.5 on the same machine then this could be the problem. These products are not certified to run on the same machine as they give a path conflict.
Hope this helps.
Maybe you are looking for
-
Can't send text to a certain number
Hi I'm getting really frustrated, so I hope someone can help. Since yesterday, I have not been able to send a text message to a certain person in my address book. (Not sure how relevant it is, but she has an android phone). The message states it's
-
Vista Ultimate: Local Network Access Only (Wired and Wireless)
Alright, I am not very experienced working with Windows Vista, and I'm having serious trouble solving this problem. I've been searching for solutions for two days and not found anything that works. The computer is a Compaq Presario A900 running Windo
-
Unable To Export Using Internet Explorer 9 or Higher
My issue is this: I have a reportserver on an intranet which users have been using quite happily under IE 8, beacuse of legacy systems we are far from early adopters. I now have some users who have moved to IE 9, however they can now no longer export
-
I am trying to set my navigation links to be in a line rather than a column after setting them up as an Unordered List. I have already done it for the social network icons but the same css command just won't apply itself for the navigation. Any help
-
How to make iop server log refresh more frequently?
In v11x, the iop server log is updated in batches, much less frequently than was the case with 4x. Is there a way to tune this so that the log in 11x is more dynamic?