Showing posts with label specified. Show all posts
Showing posts with label specified. Show all posts

Monday, March 26, 2012

problem with an UPDATE...

trying to create an UPDATE but am getting and error.
"Only one expression can be specified in the select list when the subquery is not introduced with EXISTS."

update XAPCHECKS
set xapck_amt =
(select sum(apph_paymnts), * from APPHISTF
LEFT JOIN APTRANF on apt_comp = apph_comp and apt_vend = apph_vend and apt_type = apph_type and apt_id = apph_id
LEFT JOIN APBANKF ON apb_code = apt_bank
left join CHMASTF on chm_comp = apb_comp and chm_acct = apb_cash and chm_no = apph_payck
where (apph_comp = '01') and (apph_vend = '1010') and
xapck_check = apph_payck and xapck_chk_type = (CASE chm_type WHEN null THEN ' ' ELSE chm_type END) and xapck_check_status = (CASE chm_stat when null then ' ' ELSE chm_stat END)
and xapck_bank = apt_bank
GROUP by apph_comp, apph_vend, apph_payck, chm_type, chm_stat, apph_paymnts, apph_stat, apph_type, apt_bank, apph_id, apph_paymnts)the problem is here --

set xapck_amt = (select sum(apph_paymnts), *

the error says the subquery has more than one column|||"Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated."|||ah, that's because the subquery used in a SET can return only one column, one row

it's called a scalar subquery because it's supposed to return only a single scalar value|||not sure why i had that in there but it seems to working ok.
thanks

Monday, February 20, 2012

Problem using an AXIS Webservice

Helo:

I am trying to use an axis webservice as a datasource to a report.

I have an error : Failed to prepare web request for the specified URL

When I run the query in query designer.

I test the webservice in a windows aplication and works fine. I think that the problem I have is with the target namespace/url

I am using the folowing data in the report:

datasource conection string: http://191.158.134.200:8080/CatalogWS/services/CatalogWebService

dataset query:

<Query>

<Method Namespace="urn:CatalogWebService" Name="findArticulos"/>

<SoapAction>urn:CatalogWebService/findArticulos</SoapAction>

</Query>

And here is a fragment (the header) of the wsdl of the webservice:

http://191.158.134.200:8080/CatalogWS/services/CatalogWebService?wsdl

<wsdl:definitions targetNamespace="urn:CatalogWebService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:CatalogWebService" xmlns:intf="urn:CatalogWebService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://core.catalog.cepre.opp.gub.uy" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

- <wsdl:types>...

Someone can help me, to find the right way ?

Tanks!!

I had resolved the conection problem, the problem was the parameters of the method.

The problem now is that the dataset result is not the actual data, there are 3 columns and one row:

columns: href ns1 encodingStyle

values: #0 urn:CatalogWebService http://schemas.xmlsoap.org/soap/encoding/

The data type returned by the ws method is a complex object with an array inside, is this the problem ?

Tanks for any help!

|||

Yes the complex object may be the issue.

The following article may give you some ideas on how to use the element path and apply type casting in your xml data extension query: http://msdn.microsoft.com/library/en-us/dnsql90/html/RepServXMLDS.asp

-- Robert

|||

Robert

the link you send me is about Charts and have no information related to xml. Please review that.

Tanks.

|||

Sorry for the incorrect link. I fixed it.

-- Robert

Problem using an AXIS Webservice

Helo:

I am trying to use an axis webservice as a datasource to a report.

I have an error : Failed to prepare web request for the specified URL

When I run the query in query designer.

I test the webservice in a windows aplication and works fine. I think that the problem I have is with the target namespace/url

I am using the folowing data in the report:

datasource conection string: http://191.158.134.200:8080/CatalogWS/services/CatalogWebService

dataset query:

<Query>

<Method Namespace="urn:CatalogWebService" Name="findArticulos"/>

<SoapAction>urn:CatalogWebService/findArticulos</SoapAction>

</Query>

And here is a fragment (the header) of the wsdl of the webservice:

http://191.158.134.200:8080/CatalogWS/services/CatalogWebService?wsdl

<wsdl:definitions targetNamespace="urn:CatalogWebService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:CatalogWebService" xmlns:intf="urn:CatalogWebService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://core.catalog.cepre.opp.gub.uy" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

- <wsdl:types>...

Someone can help me, to find the right way ?

Tanks!!

I had resolved the conection problem, the problem was the parameters of the method.

The problem now is that the dataset result is not the actual data, there are 3 columns and one row:

columns: href ns1 encodingStyle

values: #0 urn:CatalogWebService http://schemas.xmlsoap.org/soap/encoding/

The data type returned by the ws method is a complex object with an array inside, is this the problem ?

Tanks for any help!

|||

Yes the complex object may be the issue.

The following article may give you some ideas on how to use the element path and apply type casting in your xml data extension query: http://msdn.microsoft.com/library/en-us/dnsql90/html/RepServXMLDS.asp

-- Robert

|||

Robert

the link you send me is about Charts and have no information related to xml. Please review that.

Tanks.

|||

Sorry for the incorrect link. I fixed it.

-- Robert