Problem with query for Oracle
Hello Experts,
I'm tryng to develop my first application for EP (v7 SP12) with NWDS (without NWDI).
This application has to read and write data in the EP DB (oracle v10).
I'm using:
<u>a Dictionary Project</u> (define the DB Tables)
<u>a Java Project</u> (define class as DAO, DBManager etc)
<u>a Library Project</u>
<u>an EJB Project</u>
<u>an EAR Project</u>
With these projects I can deploy a <u>webService</u> in my EP server.
BUT I have some problem with a query that I'm tryng to sent to my DB through a DAO Class called by my WebService.
The query is simple and correct but it does not work...
This is the error message returned (the query id in bold)
(column names: GIORNO, NOMEDITTA, NOMEAREA, NOMESETTORE)
<i>HTTP/1.1 500 Internal Server Error
Connection: close
Server: SAP J2EE Engine/7.00
Content-Type: text/xml; charset=UTF-8
Date: Fri, 21 Sep 2007 14:29:57 GMT
Set-Cookie: <value is hidden>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>java.sql.SQLException: com.sap.sql.log.OpenSQLException: The SQL statement <b>"SELECT NOMESETTORE, MIN(? - "GIORNO") AS GIORNI FROM SRS_DATEINFORTUNI WHERE NOMEDITTA = ? AND NOMEAREA= ? GROUP BY NOMESETTORE ORDER BY NOMESETTORE"</b> <u>contains the syntax error[s]: - 1:25 - the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</u></faultstring><detail><ns1:getGiorniSettori_com.akhela.giorniSenzaInfortuni.ejb.exception.GiorniSenzaInfortuniException xmlns:ns1='urn:GiorniSenzaInfortuniWSWsd/GiorniSenzaInfortuniWSVi'></ns1:getGiorniSettori_com.akhela.giorniSenzaInfortuni.ejb.exception.GiorniSenzaInfortuniException></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope></i>
The variable '?' is the today date, the difference <b>"(?-GIORNO)"</b> is an int..
Moreover in my DAO class the query is <b>"SELECT NOMESETTORE, MIN(? - GIORNO) AS GIORNI FROM SRS_DATEINFORTUNI WHERE NOMEDITTA = ? AND NOMEAREA= ? GROUP BY NOMESETTORE ORDER BY NOMESETTORE</b>", instead in the error message is reported <b>MIN(? - "GIORNO")</b>...
We have tryed also with alternative query, for example we used <b>"MIN(SYSDATA - GIORNO)"</b> but <b>SYSDATA</b> was interpreted as column name and not found....
Any help???
Best Regards
Hi, I found something about the Host Variable (http://help.sap.com/saphelp_nw70/helpdata/en/ed/dbf8b7823b084f80a6eb7ad43bdbb9/content.htm), there explain that if you want to use an host variable you have to put ':' as prefix..
My problem is that <u>I need to extract the minimum of the subtraction between two dates:</u>
Query <b>MIN(? - GIORNO)</b> --> <i>Error: the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</i>
So I tried to use the ':' as indicated in the manual..
<b>MIN:(? - GIORNO)</b> --> - <i>SQL syntax error: the token ":" was not expected here
- expecting LPAREN, found ':'</i>
<b>MIN(:(? - GIORNO))</b> --> <i>- 1:25 - Open SQL syntax error: :PARAMETER not allowed
- 1:26 - SQL syntax error: the token "(" was not expected here
- 1:26 - expecting ID, found '('</i>
Then I tried to avoid the MIN() function and I tried to do just the subtraction:
<b>? - GIORNO</b> --><i> - 1:21 - the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</i>
<b>:(? - GIORNO)</b> --> <i>- 1:21 - Open SQL syntax error: :PARAMETER not allowed
- 1:22 - SQL syntax error: the token "(" was not expected here
- 1:22 - expecting ID, found '('</i>
<b>'2007-09-24' - GIORNO</b> --> <i>- 1:34 - SQL syntax error: first argument of operator "-" must be a number, date/time or interval
- 1:43 - SQL syntax error: arguments of operator "-" do not have correct types
- 1:43 - SQL syntax error: derived columns in SELECT list with AS must be values</i>
<b>GIORNO - GIORNO</b> --> <i>- 1:21 - the group by list and the select list are inconsistent: the column >>"GIORNO"<< is neither grouped nor aggregated
- 1:30 - the group by list and the select list are inconsistent: the column >>"GIORNO"<< is neither grouped nor aggregated</i>
Why these parts of query are not accepted???
I don't understand why... I hope you can help me.
Best Regards
Alessandro
Similar Messages
-
i have problems with a query, i need that have the follows fields.
SELECT T0.[DocNum] AS #Doc, T0.[NumAtCard] AS Referencia, T0.[docDate] AS Fecha, T0.[LicTradNum] AS RFC, T0.[CardName] AS 'Nombre del Cliente', T0.[DocTotalFC] AS TotME, T0.[DocRate] AS 'TC Fact', T0.[DocTotal] AS TotMS, T0.[VatSumFC] AS 'IVA ME', T0.[VatSum] FROM [dbo].[OINV] T0
But i need to know if this invoices have a PR, RF, RC,etc.
I saw that ORIN(RIN1) is for -> RC, OINV(INV9) -> RF, ORCT -> PR but i dont know how make a correctly INNER JOIN. When the invoice have a PR giveme Num of PR, if the invoice have a RC giveme the number of document destination.
So, how can i join these tables for get that information.
Thank you for you help.SELECT * FROM ORDR T0
INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
This is a basic inner join created from the SAP Query Generator
Template would be
Select <field names> FROM <base table name>
Inner join <table you want to join> on <<condition you want to two tables to joins>>
or
Simply you can write it
SELECT * FROM ORDR T0, RDR1 T1 WHERE T0.DocEntry = T1.DocEntry
it will do the same thing and you can simply join more tables.
Hope this will help...
Sanjaya -
Hello, I'm having problems setting up TDP for Oracle. When I run a backup, I get the following error stack from RMAN:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of allocate command on t1 channel at 02/21/2007 09:40:52
ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-27000: skgfqsbi: failed to initialize storage subsystem (SBT) layer
IBM AIX RISC System/6000 Error: 106: Reserved errno was encountered
Additional information: 7011
ORA-19511: Error received from media manager layer, error text:
SBT error = 7011, errno = 106, sbtopen: system error
I'm running AIX 5.2, TDP 5.3, level 3
Oracle version 9.2.0.4
My libobk.a file is linked in the following manner
libobk.a@ -> /usr/lib/libobk64.a
/usr/lib/libobk64.a@ -> /usr/tivoli/tsm/client/oracle/bin64/libobk64.a
I'm not sure if the version of AIX i'm running is 64 bit or not, does anyone know how I can check this?
Oh and the sbtio.log file is empty.Check this website for the error stack:
http://www-1.ibm.com/support/docview.wss?uid=swg21197242
This command will tell you 32 or 64 bit, more exactly when it is 32bit you will see bos.64bit not installed.
lslpp -l bos.64bit
Werner -
Problems with Download of Oracle IFS /IFS Devkit for NT
I am having problems with download of Oracle IFS and Oracle IFS Devkit for NT.
When I ran the ifsdevkit.bat file the last four files did not get copied over. Subsequently when I ran the upload_ifsdevkit batch file as indicated in document I got error message saying
'System cannot find the path specified'.
When I opened the batch file it is looking for BIN directory under the C:\OraHome1\ifs directory but none exists. I wonder if this is the cause of problem. This would mean that the ifs1081.zip file has a bug in that it did not create the BIN directory and files under C:\OraHome1\ifs
Would appreciate if somebody can help. Thanks
nullIs C:\OraHome1 your ORACLE_HOME directory? (Usually, it's C:\Oracle\Ora81)
Also, have you installed iFS (successfully) in that ORACLE_HOME? If so, you are guaranteed to have an %ORACLE_HOME%\ifs\bin directory.
Finally, did you enter the correct directory as the parameter to the DEVKIT script? -
View with columns based on function - problem with query
Hi,
I'm using Oracle 9i;
I've created a view which has columns based on a table columns (multiple columns from 1 table) and funtion (multiple columns based on 1 function).
The function takes ID as the first argument and name of the column to determine which value to return as the second one.
Here is a sample of such function (simplified):
FUNCTION my_function
(in_id IN NUMBER, in_col_name IN VARCHAR2)
RETURN VARCHAR2
IS
c_name VARCHAR2(100);
c_last_name VARCHAR2(100);
BEGIN
SELECT T.NAME, T.LAST_NAME
INTO c_name, c_last_name
FROM TABLE_1 T, TABLE_2 Z
WHERE T.PK = Z.FK
AND Z.ID = in_id;
IF in_col_name = 'NAME' THEN
RETURN c_name;
ELSIF in_col_name = 'LAST_NAME' THEN
RETURN c_last_name;
END IF;
END;
For simplicty I've restricted the number of columns.
CREATE OR REPLACE VIEW my_view
(ID, NAME, LAST_NAME)
AS
SELECT
T.ID ID
,CAST(my_function(T.ID,'NAME') AS VARCHAR2(100)) NAME
,CAST(my_function(T.ID,'LAST_NAME') AS VARCHAR2(100)) LAST_NAME
FROM TABLE T;
There is no problem with query:
SELECT * FROM my_view;
The problem arises when I query the view (regardles of '=' or 'LIKE'):
SELECT * FROM my_view
WHERE name LIKE '%some_part_of_name%'
The query returns rows for same names, for same it doesn't. If I put '=' and the whole name the query returns nothing, but when I put 'LIKE' and the first letter it returns rows in some cases.
I've tried to debug this situation and I've discovered that the function recives ID not in the proper order and not the same amount of times - in explicit:
for each ID in (1, 2, 3, 4, 5, 6, ... , 100) the function should be called twice for each ID and in the same order, but it does not.
I get 1, 1, 2, 3, 3, 6, 20, 20 and so on.
Help needed.
Greetings.The problem is more complicated than the solutions provided here.
The reason why I'm using the function is this:
the original view was constructed using multiple union all selects and the speed was terrible. I've created the index on the base table to obtain a proper sort. For retriving all records at once the view works perfectly, but if one wants to query by columns based on function the results are suprisng - sometimes there are, some times there are none, or if you serch with "like" and only a part of string there are results, but with "=" there are no results.
Here are real DDLs:
View:
CREATE OR REPLACE VIEW V_DOK_ARCH
(ID_ZDAR, TYP, STAN, DATE_CREATED, CREATED_BY,
DATE_MODIFIED, MODIFIED_BY, SPRA_ID_SPRA, PODM_ID_PODM, PODM_UMOW_ID_UMOW,
NR_WFS, WFS_NR_INTER, UWAGI_OPER, FUNDUSZ, NUMER,
DATA_PODPISANIA, RODZAJ, TYP_PRZY, TYP_UBEZ, NAZWISKO,
IMIE, IMIE_OJCA, NAZWA_FIRMY, NAZWA_FIRMY_SKR, DANE_KLIE)
AS
SELECT /*+ INDEX(Z ZDAR_DATE_CREATED_DESC_I) */
Z.ID_ZDAR ID_ZDAR
, Z.TYP TYP
, Z.STAN STAN
, Z.DATE_CREATED DATE_CREATED
, Z.CREATED_BY CREATED_BY
, Z.DATE_MODIFIED DATE_MODIFIED
, Z.MODIFIED_BY MODIFIED_BY
, Z.SPRA_ID_SPRA SPRA_ID_SPRA
, Z.PODM_ID_PODM PODM_ID_PODM
, Z.PODM_UMOW_ID_UMOW PODM_UMOW_ID_UMOW
, Z.NR_WFS NR_WFS
, Z.WFS_NR_INTER WFS_NR_INTER
, Z.UWAGI_OPER UWAGI_OPER
, Z.FUNDUSZ FUNDUSZ
, CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NUMER') AS VARCHAR2(30)) NUMER
, F_Rej_Zdar_Date(Z.ID_ZDAR, 'DATA_PODPISANIA') DATA_PODPISANIA
, CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'RODZAJ') AS VARCHAR2(4)) RODZAJ
, CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'TYP_PRZY') AS VARCHAR2(4)) TYP_PRZY
, CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'TYP_UBEZ') AS VARCHAR2(3)) TYP_UBEZ
, CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWISKO') AS VARCHAR2(30)) NAZWISKO
, CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE') AS VARCHAR2(30)) IMIE
, CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE_OJCA') AS VARCHAR2(30)) IMIE_OJCA
, CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY') AS VARCHAR2(300)) NAZWA_FIRMY
, CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY_SKR') AS VARCHAR2(100)) NAZWA_FIRMY_SKR
, CAST(LTRIM(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWISKO')||' '||F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE')||' '||F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE_OJCA')||F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY')||DECODE(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY'),NULL,F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY_SKR'),NULL)) AS VARCHAR2(492)) DANE_KLIE
FROM T_ZDARZENIA Z
WHERE F_Rej_Zdar_Char(Z.ID_ZDAR, 'JEST') = 'T';
and functions:
CREATE OR REPLACE FUNCTION F_Rej_Zdar_Char
(WE_ID_ZDAR IN NUMBER
,WE_KOLUMNA IN VARCHAR2
RETURN VARCHAR2
IS
c_numer T_PRZYSTAPIENIA.NUMER%TYPE;--VARCHAR2(30);
c_rodzaj T_KLIENCI.RODZAJ%TYPE;--VARCHAR2(1);
c_typ_przy T_PRZYSTAPIENIA.TYP_PRZY%TYPE;--VARCHAR2(1);
c_typ_ubez T_PRZYSTAPIENIA.TYP_UBEZ%TYPE;--VARCHAR2(3);
c_nazwisko T_KLIENCI.NAZWISKO%TYPE;--VARCHAR2(30);
c_imie T_KLIENCI.IMIE%TYPE;--VARCHAR2(30);
c_imie_ojca T_KLIENCI.IMIE_OJCA%TYPE;--VARCHAR2(30);
c_nazwa_firmy T_KLIENCI.NAZWA_FIRMY%TYPE;--VARCHAR2(300);
c_nazwa_firmy_skr T_KLIENCI.NAZWA_FIRMY%TYPE;--VARCHAR2(100);
c_jest VARCHAR2(1) := 'T';
c EXCEPTION;
BEGIN
--dbms_output.put_line('id zdar wykonania '||WE_ID_ZDAR);
BEGIN
SELECT p.NUMER, k.RODZAJ,p.TYP_PRZY,p.TYP_UBEZ,k.nazwisko, k.imie, k.imie_ojca, k.nazwa_firmy, k.nazwa_firmy_skr
INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D1, T_PODMIOTY D2
WHERE p.KLIE_ID_KLIE = k.ID_KLIE
AND z.PODM_ID_PODM = D1.ID_PODM
AND D1.KLIE_ID_KLIE = p.KLIE_ID_KLIE
AND Z.PODM_UMOW_ID_UMOW = D2.ID_PODM
AND D2.PRZY_ID_PRZY = P.ID_PRZY
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT p.NUMER, k.RODZAJ,p.TYP_PRZY,p.TYP_UBEZ,k.nazwisko, k.imie, k.imie_ojca, k.nazwa_firmy, k.nazwa_firmy_skr
INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D
WHERE z.PODM_UMOW_ID_UMOW IS NULL
AND z.PODM_ID_PODM = D.ID_PODM
AND D.KLIE_ID_KLIE = k.ID_KLIE
AND p.KLIE_ID_KLIE = k.ID_KLIE
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT NULL NUMER, NULL RODZAJ,NULL TYP_PRZY,NULL TYP_UBEZ, I.nazwisko, I.imie, I.imie_ojca, I.NAZWA NAZWA_FIRMY, I.NAZWA_SKR nazwa_firmy_skr
INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
FROM T_ZDARZENIA z, T_INSTYTUCJE I
WHERE Z.TYP IN ('WFS526','WFS542','WFS553','WFS609','WFS611','WYP_KS','WYP_PO','WYP_SB','DI_ZAT')
AND z.PODM_UMOW_ID_UMOW IS NULL
AND Z.PODM_ID_PODM = I.ID_INST
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT p.NUMER NUMER, DECODE(a.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(a.TYP_AGENTA,'P','R',a.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,a.nazwisko, a.imie, a.imie_ojca, a.nazwa_firmy, a.nazwa_firmy_skr
INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
WHERE a.ID_AGAG = p.AGAG_ID_AGAG
AND z.PODM_UMOW_ID_UMOW = p.ID_AGUM
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT p.NUMER NUMER, DECODE(a.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(a.TYP_AGENTA,'P','R',a.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,a.nazwisko, a.imie, a.imie_ojca, a.nazwa_firmy, a.nazwa_firmy_skr
INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
WHERE a.ID_AGAG = p.AGAG_ID_AGAG
AND z.PODM_ID_PODM = a.ID_AGAG
AND z.PODM_UMOW_ID_UMOW IS NULL
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT p.NUMER_UMOWY NUMER, DECODE(p.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(p.TYP_AGENTA,'P','R',p.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,p.nazwisko, p.imie_pierwsze, p.imie_ojca, p.nazwa_firmy, p.nazwa_firmy_skr
INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
AND z.PODM_UMOW_ID_UMOW = p.TECH_ID_AGUMT
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT p.NUMER_UMOWY NUMER, DECODE(p.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(p.TYP_AGENTA,'P','R',p.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,p.nazwisko, p.imie_pierwsze, p.imie_ojca, p.nazwa_firmy, p.nazwa_firmy_skr
INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
AND z.PODM_ID_PODM = a.ID_AGKAN
AND z.PODM_UMOW_ID_UMOW IS NULL
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT k.NUMER_UMOWY NUMER, DECODE(k.TYP_PRZYSTAPIENIA,'P','F','P') RODZAJ,k.TYP_PRZYSTAPIENIA TYP_PRZY,'NPO' TYP_UBEZ, k.nazwisko, k.imie_pierwsze, k.imie_ojca, k.nazwa_firmy nazwa_firmy, k.nazwa_firmy_skr nazwa_firmy_skr
INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
FROM T_WE_UM_NPO_TAB k, T_ZDARZENIA z
WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
AND k.TYP_PRZYSTAPIENIA IN ('P','W')
AND z.PODM_ID_PODM IS NULL
AND z.PODM_UMOW_ID_UMOW IS NULL
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT k.NUMER_UMOWY NUMER, 'F' RODZAJ,'-' TYP_PRZY,'OPS' TYP_UBEZ, k.nazwisko, k.imie_pierwsze, k.imie_ojca, NULL nazwa_firmy, NULL nazwa_firmy_skr
INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
FROM T_WE_UM_OPS_TAB k,T_ZDARZENIA z
WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
AND z.PODM_ID_PODM IS NULL
AND z.PODM_UMOW_ID_UMOW IS NULL
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT NULL NUMER, NULL RODZAJ,NULL TYP_PRZY,NULL TYP_UBEZ, NULL nazwisko, NULL imie_pierwsze, NULL imie_ojca, NULL nazwa_firmy, NULL nazwa_firmy_skr
INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
FROM T_ZDARZENIA z
WHERE z.TYP NOT IN ('UM_OPS','UM_NPO','NPO_OP','UZUP_U')
AND z.PODM_ID_PODM IS NULL
AND z.PODM_UMOW_ID_UMOW IS NULL
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
--dbms_output.put_line('id zdar wykonania '||WE_ID_ZDAR||' ostatni wyjatek');
NULL;
END;
END;
END;
END;
END;
END;
END;
END;
END;
END;
--raise c;
IF WE_KOLUMNA = 'NUMER' THEN
RETURN c_numer;
ELSIF WE_KOLUMNA = 'RODZAJ' THEN
RETURN c_rodzaj;
ELSIF WE_KOLUMNA = 'TYP_PRZY' THEN
RETURN c_typ_przy;
ELSIF WE_KOLUMNA = 'TYP_UBEZ' THEN
RETURN c_typ_ubez;
ELSIF WE_KOLUMNA = 'NAZWISKO' THEN
RETURN c_nazwisko;
ELSIF WE_KOLUMNA = 'IMIE' THEN
RETURN c_imie;
ELSIF WE_KOLUMNA = 'IMIE_OJCA' THEN
RETURN c_imie_ojca;
ELSIF WE_KOLUMNA = 'NAZWA_FIRMY' THEN
RETURN c_nazwa_firmy;
ELSIF WE_KOLUMNA = 'NAZWA_FIRMY_SKR' THEN
RETURN c_nazwa_firmy_skr;
ELSIF WE_KOLUMNA = 'JEST' THEN
RETURN c_jest;
END IF;
END;
CREATE OR REPLACE FUNCTION F_Rej_Zdar_Date
(WE_ID_ZDAR IN NUMBER
,WE_KOLUMNA IN VARCHAR2
RETURN DATE
IS
d_data DATE;
BEGIN
BEGIN
SELECT p.DATA_PODPISANIA
INTO d_data
FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D1, T_PODMIOTY D2
WHERE p.KLIE_ID_KLIE = k.ID_KLIE
AND z.PODM_ID_PODM = D1.ID_PODM
AND D1.KLIE_ID_KLIE = p.KLIE_ID_KLIE
AND Z.PODM_UMOW_ID_UMOW = D2.ID_PODM
AND D2.PRZY_ID_PRZY = P.ID_PRZY
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT p.DATA_PODPISANIA
INTO d_data
FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D
WHERE z.PODM_UMOW_ID_UMOW IS NULL
AND z.PODM_ID_PODM = D.ID_PODM
AND D.KLIE_ID_KLIE = k.ID_KLIE
AND p.KLIE_ID_KLIE = k.ID_KLIE
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT NULL DATA_PODPISANIA
INTO d_data
FROM T_ZDARZENIA z, T_INSTYTUCJE I
WHERE Z.TYP IN ('WFS526','WFS542','WFS553','WFS609','WFS611','WYP_KS','WYP_PO','WYP_SB','DI_ZAT')
AND z.PODM_UMOW_ID_UMOW IS NULL
AND Z.PODM_ID_PODM = I.ID_INST
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT p.DATA_PODPISANIA DATA_PODPISANIA
INTO d_data
FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
WHERE a.ID_AGAG = p.AGAG_ID_AGAG
AND z.PODM_UMOW_ID_UMOW = p.ID_AGUM
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT p.DATA_PODPISANIA DATA_PODPISANIA
INTO d_data
FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
WHERE a.ID_AGAG = p.AGAG_ID_AGAG
AND z.PODM_ID_PODM = a.ID_AGAG
AND z.PODM_UMOW_ID_UMOW IS NULL
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT p.DATA_PODPISU_AGENTA DATA_PODPISANIA
INTO d_data
FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
AND z.PODM_UMOW_ID_UMOW = p.TECH_ID_AGUMT
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT p.DATA_PODPISU_AGENTA DATA_PODPISANIA
INTO d_data
FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
AND z.PODM_ID_PODM = a.ID_AGKAN
AND z.PODM_UMOW_ID_UMOW IS NULL
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT k.DATA_PODPISANIA_UM DATA_PODPISANIA
INTO d_data
FROM T_WE_UM_NPO_TAB k, T_ZDARZENIA z
WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
AND k.TYP_PRZYSTAPIENIA IN ('P','W')
AND z.PODM_ID_PODM IS NULL
AND z.PODM_UMOW_ID_UMOW IS NULL
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT k.DATA_PODPISANIA_UM DATA_PODPISANIA
INTO d_data
FROM T_WE_UM_OPS_TAB k,T_ZDARZENIA z
WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
AND z.PODM_ID_PODM IS NULL
AND z.PODM_UMOW_ID_UMOW IS NULL
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
SELECT NULL DATA_PODPISANIA
INTO d_data
FROM T_ZDARZENIA z
WHERE z.TYP NOT IN ('UM_OPS','UM_NPO','NPO_OP','UZUP_U')
AND z.PODM_ID_PODM IS NULL
AND z.PODM_UMOW_ID_UMOW IS NULL
AND z.ID_ZDAR = WE_ID_ZDAR;
EXCEPTION
WHEN NO_DATA_FOUND THEN
d_data := NULL;
END;
END;
END;
END;
END;
END;
END;
END;
END;
END;
IF WE_KOLUMNA = 'DATA_PODPISANIA' THEN
RETURN d_data;
END IF;
END; -
Problem with implicitly created Oracle pipes
Hi, I am having a problem with implicitly created Oracle pipes. I am not sure if this is the correct forum for this topic, but I could not see one which suited better..
I am using Oracle pipes as a commiunication mechanism between processes (some are written in PL/SQL and other in PRO*C).
The general problem I have is that if a timeout occurs during the communication process, I end up with 1 or perhaps 2 implicitly created pipes.
The biggest problem for me is that I am unable to determine if a create is implicitly created (via dbms_pipe.send_message or receive_message). This causes problems, since these implicitly created pipes are left behind and not deleted. I'll show you the basic flow of the processes and you shall see my problem.
server: create request pipe "req_pipe"
server: listen for request on requests pipe.
client: create two pipes for comms with server.
client: send request and the names of the newly created pipes to the server.
server: read request and pipename from request pipe (from this point all comms between the client and server are now done over the 2 pipes the client created).
server: send ack message to client to ensure they are still there (since requests can be queued in the request pipe and clients could have timed out before the request is received)
client: send "i'm still here" ack back to the server.
server: process request and send result back to client.
client: send ack back to server to let server know we have received the response.
server: send ack back to client to show that work is now committed.
OK thats the general event flow. I use the rule, that pipes created by a process are removed by a process. So the client always removes the pipes it created in all situations. But since this can happen at any point we can get in the situation:
client: timeout occurs, delete pipes.
server: send message to client (creates an implicit pipe) and therefor works (no errors raised)
server: do a read for response from previous message. (implicitly creates pipe) (will fail).
Now we have two implicitly created pipes! These pipes will exist until the database instance is shutdown, and in a poorly performing environment, we could get thousands of these pipes lying around... not a good situation.
How can I either stop pipes being implicilty created, or how do I detect if a pipe was implicitly created.
I have tried a couple of things, like using v$db_pipes to check if a pipe exists before doing send/reveive calls but this is FAR to slow to do a select on that view.
We have also looked at keeping a record of pipes created by the client then have some process (perhaps the server) clean up these pipes after some time frame. This is a workable solution but is not favourable since it adds extra overhead having to check these pipes often, and created an extra level of complexity which is not required..
Any suggestions will be greatly appreciated.
Feel free to email me with any suggestions on my email provided below, or just post a reply to this formum..
Many thanks,
Karl Bridger
[email protected]I solved the problem by changing the SOAP massage format from Document/Wrapped to Document/Literal
-
Problem with mail for exchange after update on E72...
Hi everyone,
I updated Nokia E-mail to ver 3.9 on E72. Now I am facing a problem with mail for exchange. I have configured gmail on mail for exchange. I recieve a warning that "unable to sync contact administrator if problem persist". It started to pop up just after the update was over and is very frustrating. Even previously i used to recieve mails instantly but now it generally takes half an hour for me to recieve them. I deleted and created mail for exchange several times but to no avail.
Also i am not able to automatically recieve mails other emails which i have configured. every time I have to manually download them everytime.
Can anybody suggest a way out.
Thanks
AnilIt could be a problem if you're using your network's connections...
I was on a Pay & Go tariff with o2 some time ago, and needed secure connections for various things, o2 told me they didn't provide secure connections on Pay & Go tariffs...
Could be worth checking with them to make sure it's supported.
Nokia History: 3110, 5110, 7110, 7110, 3510i, 6210, 6310i, 5210, 6100, 6610, 7250, 7250i, 6650, 6230, 6230i, 6260, N70, N70, 5300, N95, N95, E71, E72
Android History: HTC Desire, SE Xperia Arc, HTC Sensation, Sensation XE, One X+, Google Nexus 5 -
hello guy! I've got a problem with facetime for mac.My sister has a I-pod touch fourth generation with factime but i cna't phone her a message come on my mac.It say "xxx can't receive facetime's calls"!Can you help me??
Thanks, Dah•veed.
I did see mention of using Google Public DNS while I was searching the forums prior to posting, but to be honest didn't think it was a DNS-related problem.
However, to rule it out I've set the prefered DNS servers on my router to Google's, but FaceTime still disconnects after 4-5 seconds when calling between me and my brother-in-law. It doesn't matter who initiates the call.
As a test, before I made the changes to my router, I logged into FaceTime as him on my MBP and tried calling myself on my iMac, and that was successful.
The same test between the two iMacs when they were here was unsuccessful, so now I'm definitely thinking it's something on the '08 iMac.
Now I just need to figure out what... -
Problem with Twitter for Mac notifications
Hello,
I have a strange problem with Twitter for Mac. On both my home and office Macs. New posts appear in app window but there aren't any notifications even though notifications are set in preferences to show in both dock and menubar. Perhaps anyone noticed similar strange behaviour? I didn't find anything similar on Twitter forums.
Thanks in advance.Solved by
Dr.AvituvOct 20, 2014 11:09 PM
go to Terminal and post this:
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/support/lsregister -kill -seed
if it doesn't have that specific directory try this:
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -kill -seed
once the scanning is done (can be short or long, depends on how heavy your system is) RESTART the computer.
when you're back, go to Apple>system preferences>extensions.... guess who's there.
I hope it helped.
The Doctor.
iMac, OS X Yosemite (10.10)
To restore Actions extensions for good and other stuff
THANKS! -
Problem with GarageBand for iOS 6/7 Iphone 3gs / 4
Problem with GarageBand for iOS 6/7 Iphone 3gs / 4
Hello,
On February 16, bought the GarageBand for iOS which was free and so I find and install it on my 3GS .
Take the demo: Curtain Call Demo
and within the instruments :
audio Recorder
Sampler
Smart Drums
Smart Strings
Smart Bass
Smart Keyboard
Smart Guitar
Keyboard
Drums
Guitar Amp
1.4.1 is the latest version for ios 6.
Configure my AppleID on a Iphone 4 and install the program , the version I have the Iphone 4 is the orange ( different from 3gs ) icon and put it on the AppStore : ios 2.0.1 for ios7.
With these instruments :
audio Recorder
Sampler ( to download the instrument )
Smart Drums ( to download the instrument )
Smart Strings (Download the instrument )
Smart Bass ( to download the instrument )
Smart Keyboard ( to download the instrument )
Smart Guitar
Keyboard
Drums
Guitar Amp ( to download the instrument )
and if I give what I need to restore tells me if I bought it I did not restore anything and tells me to buy :
Complete collection of GarageBand instruments and sound at a price of : € 4.49
As they are 2 different versions ? More than anything I say because I have to pay for the instruments in the 2.0.1 version of the Iphone 4 ... ?
And besides not wearing demo Demo Curtain Call : (
GarageBand 1.x If you are upgrading it using iTunes on a Mac or PC, you can restore the original collection of instruments and sounds. There is no need to buy this collection. Press "You've already purchased?" When displayed on iPhone, iPad or iPod touch.
this puts on the AppStore but I have tried to restore as I wrote above, and does not work. There is nothing to restore.
regardsI've been having the same problem. However, I believe my problem is due to the 3G issues I've been having. I don't have internet access even when the 3G symbol appears, so probably my iphone keeps trying to connect to the network and has its battery drained! Have you been having the same issue?
-
i have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me
i have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me
-
Stacked 100% bar chart - Problem with datatips for zero value data points
I have a stacked 100% bar chart that shows datatips in Flex 4. However, I don't want it to show datatips for
data points with zero values. Flex 4 shows the datatip for a zero value data point on the left side of a bar if the data point is not the first in the series.
Here's the code that illustrates this problem. Of particular concern is the July bar. Because of the zero value data point problem, it's not possible to see the datatip for "aaa".
Any ideas on how we can hide/remove the datatips for zero value data points ? Thanks.
<?xml version="1.0"?>
<s:Application
xmlns:fx="
http://ns.adobe.com/mxml/2009"xmlns:mx="
library://ns.adobe.com/flex/mx"xmlns:s="
library://ns.adobe.com/flex/spark"creationComplete="initApp()"
height="
1050" width="600">
<s:layout>
<s:VerticalLayout/>
</s:layout>
<fx:Script><![CDATA[
import mx.collections.ArrayCollection;[
Bindable]
private var yearlyData:ArrayCollection = new ArrayCollection([{month:
"Aug", a:1, b:10, c:1, d:10, e:0},{month:
"July", a:1, b:10, c:10, d:10, e:0},{month:
"June", a:10, b:10, c:10, d:10, e:0},{month:
"May", a:10, b:10, c:10, d:0, e:10},{month:
"April", a:10, b:10, c:0, d:10, e:10},{month:
"March", a:10, b:0, c:10, d:10, e:10},{month:
"February", a:0, b:10, c:10, d:10, e:10},{month:
"January", a:10, b:10, c:10, d:10, e:10}]);
private function initApp():void {}
]]>
</fx:Script>
<s:Panel title="Stacked Bar Chart - Problems with DataTips for Zero Value Items" id="panel1">
<s:layout>
<s:HorizontalLayout/>
</s:layout>
<mx:BarChart id="myChart" type="stacked"dataProvider="
{yearlyData}" showDataTips="true">
<mx:verticalAxis>
<mx:CategoryAxis categoryField="month"/>
</mx:verticalAxis>
<mx:series>
<mx:BarSeries
xField="a"displayName="
aaa"/>
<mx:BarSeries
xField="b"displayName="
bbb"/>
<mx:BarSeries
xField="c"displayName="
ccc"/>
<mx:BarSeries
xField="d"displayName="
ddd"/>
<mx:BarSeries
xField="e"displayName="
eee"/>
</mx:series>
</mx:BarChart>
<mx:Legend dataProvider="{myChart}"/>
</s:Panel>
<s:RichText width="700">
<s:br></s:br>
<s:p fontWeight="bold">The problem:</s:p>
<s:p>Datatips for zero value data points appear on left side of bar (if data point is not the first point in series).</s:p>
<s:br></s:br>
<s:p fontWeight="bold">For example:</s:p>
<s:p>1) For "June", eee = 0, mouse over the left side of the bar to see a datatip for "eee". Not good.</s:p>
<s:br></s:br>
<s:p>2) For "July", eee = 0 and aaa = 1, can't see the datatip for "aaa", instead "eee" shows. Real bad.</s:p>
<s:br></s:br>
<s:p>3) For "Feb", aaa = 0, datatip for "aaa" (first point) does not show. This is good.</s:p>
<s:br></s:br>
<s:p>4) For "Mar", bbb = 0, datatip for "bbb" shows on the left side of the bar. Not good.</s:p>
<s:br></s:br>
<s:p fontWeight="bold">Challenge:</s:p>
<s:p>How can we hide/remove datatips for zero value data points?</s:p>
<s:br></s:br>
</s:RichText></s:Application>FYI.
Still have the issue after upgrading to the latest Flex Builder 4.0.1 with SDK 4.1.0 build 16076.
Posted this as a bug in the Adobe Flex Bug and Issue Management system. JIRA
http://bugs.adobe.com/jira/browse/FLEXDMV-2478
Which is a clone of a similar issue with Flex 3 ...
http://bugs.adobe.com/jira/browse/FLEXDMV-1984 -
I have problems with office for mac screen resolution, specially with excel
I have problems with office for mac screen resolution, specially with excel ?
For starters, make sure to Check for Updates on any of the Help menus, and make sure the product has all the latest patches. MS did come out with a patch addressing the display issues on Retina Macs. Latest patchlevel is 14.3.2.
We are talking about Office:Mac 2011, right? -
Please Help?! Problems with Viber for iPhone 4s
Please help!
I have had problems with Viber for a while now and had given up! But now a few contacts only have viber and not other free messaging apps so I’m trying to use it again but still having problems.
I have uninstalled and reinstalled a number of times and still have not received an access code. My main problem though is the messaging it would work fine and then I wouldn’t be able to send any messages and I would receive a message go into the app and the message would not appear.
The other day I reinstalled it whilst at work and worked perfectly could send and receive messages easily. Then when I went home the problem stated again. I then uninstalled and reinstalled again and it worked perfectly, but now back at work I’m having the issues again! I can’t keep uninstalling and reinstalling is there a way this can be fixed?!
If anyone is able to help me out it would be much appreciated! ThanksYou activated "Find My Mac," which disables the built-in Guest account and adds a Safari-only "Guest User" pseudo-account. To get the Guest account back, you would have to disable FMM.
-
We have been having a problem with newsletters for a client.
The newsletter works fine except if we add a button and/or link to the top zone on that newsletter it blows up ONLY ON iPhones!
This happened last month too. It seems to be related to length of the newsletter too. It works on every device except iPhones - so weird.Hi, is anyone else experiencing i-phone only problems on email campaigns? not bashing Apple, just having issues where our newsletter are only having issues on iPhones
Maybe you are looking for
-
My imac restarts insteads of shut down
hello i am new to the mac...so bare with me. i am using a 27" intel i7 mac os x lion, version 10.7.2 hmm ... i noticed from day one...that sometimes when i click the apple>shut down...it does everything like a shut down but it spins the dvd-r and res
-
Hi all, When sending email from a Support Desk Message, the sender is always the one who triggers the emailaction. Is there a way to set a generic email address for the sender. So the receiver of the email will see the generic email address as the se
-
Cant purchase ANY tv shows from itunes
Itunes keeps teling me that the shows i am trying to purchase became unavailabe as I was trying to purchase them. I am in Canada and am having problems with this Paul
-
Hi all, I am trying to achieve a certain effect with Maxwell Render and Photoshop. What I use from the Maxwell render mxi file are basically these layers: Background layer and on top of this the light layer: When I apply the Screen blend mode to the
-
Alternative VIs for In Port.vi and Out Port.vi for 64 bit Windows 7 platform
Hi Need to use the printer port for my application. In Port and Out Port VIs was the simplest option in 32 bit Windows XP machine. Now I hear In Port and Out Port VIs are not supported in 64 bit Windows ( VISTA/7) machine. Is there any working altern