An expression of non boolean type specified in context near id
Hi
Sorry for duplicate posting. I am desperately looking to solve the issue for display image tif format using datawindow inkpict. I am little bit going progress .
My Sqlserver table <mpdoc>
id <int>, empdoc <image>
In datawindow object I have given id as id and large binary column as empdoc. But after when I retrieve the datawindow it is showing the error
'an expression of non Boolean type specified in context near id' how can I fix this error.Please help
dw_1.settransobject(sqlca)
dw_1.retrieve()
I am very desperate at the moment with the powerbuilder to display tif image and also I can only get the help from this site.
if it is not working in PB, I have to use C#.
With Many Thanks
Pol
Hi wendy,
After testing the issue in my environment, I can reproduce it when I select more than one values in the @reportID parameter drop-down list. As per my understanding, it seems that you are trying to filter the dataset with the @reportID parameter. When it
doesn’t contain value ‘0’, the dataset returns values. Otherwise, no value is returned in the dataset.
If in this scenario, we can achieve this requirement with filters in the dataset. For more details, please refer to the following steps:
Modify the dataset with the below query:
SELECT 'Students report 1' AS selectRptName, 1 AS rptNumValue
UNION
SELECT 'Students report 2', 2
UNION
SELECT 'Students report 3', 3
UNION
SELECT 'Students report 4', 4
UNION
SELECT 'Students report 5', 5
ORDER BY selectRptName
Click the Filters in the left pane of Dataset Properties dialog box.
Add a filter as below:
Expression: =INSTR(JOIN(Parameters!reportID.Value,","),"0")>0
Type: Boolean
Operator: =
Value: false
The following screenshot is for your reference:
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support
Similar Messages
-
the following sql is not working . If sum(salary) = null should be displayed 1 or 0
select empname,iif((isnull(sum(salary),0)),1,0) from salary group by empname
regards
Pol
polachanI think what you're looking at is this
select e.empname,
COALESCE(s.totalsal,0) as salary
from employee e
left join (select empname,sum(salary) as totalsal
from salary
group by empname
)s
on s.empname = e.empname
where employee represents your master table containing employee information
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
"An expression of non-boolean type specified in a context where a condition
I have below query and its respective result set "0 and NoofRows" in Execute SQL task
select count(*) from TEMP_InterfaceSAP_LoadFile
where (timeid = '20110100' and ([ENTITY_AFF] in (N'6050')))
When I run the task individually, there is no issue at all, but when I tried run it as whole, I'm getting below error.
"[Execute SQL Task] Error: Executing the query "select count(*) from TEMP_PM_InterfaceSAP_LoadFile..." failed with the following error: "An expression of non-boolean type specified in a context where a condition is expected, near ')'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."I have below query and its respective result set "0 and NoofRows" in Execute SQL task
select count(*) from TEMP_InterfaceSAP_LoadFile
where (timeid = '20110100' and (ENTITY_AFF in (N'6050')))
When I run the task individually, there is no issue at all, but when I tried run it as whole, I'm getting below error.
"Execute SQL Task Error: Executing the query "select count(*) from TEMP_PM_InterfaceSAP_LoadFile..." failed with the following error: "An expression of non-boolean type specified in a context where a condition is expected, near ')'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."
======================================================================
Hi Prabhu0505,
You may enclose the string with ' ' in SQL task if you use SQL command, then you need to adjust your delimeter to avoid wrong interepretation. I cannot say how you can fix the problem, but I remember there was more ' such as '''6050''' and so on, please find out correct SQL expression in an eclosed string.
This is one of thing I remember, I used ADO connection in SQL script task in SSIS and there were lots of SQL in command, the ' quatation is tricky one.
Regards,
YH Seo -
I am getting the error message, "An expression of non-boolean type specified in a context where a condition is expected, near ',' " when running an ssrs 2008 r2 report.
The sql embedded in the dataset is:
IF @reportID <> 0
BEGIN
SELECT 'Students report 1' AS selectRptName, 1 AS rptNumValue
UNION
SELECT 'Students report 2', 2
UNION
SELECT 'Students report 3', 3
UNION
SELECT 'Students report 4', 4
UNION
SELECT 'Students report 5', 5
ORDER BY selectRptName
END
The sql runs fine in managment studio when I declare @reportID.
The sql runs fine with I comment out 'IF @reportID <> 0'.
The @reportID is a parmeter value that is passed to the applicable dataset.
The @reportID can have more than one value.
Thus can you show me sql and/or tell me what I need to do to solve the issue for me?Hi wendy,
After testing the issue in my environment, I can reproduce it when I select more than one values in the @reportID parameter drop-down list. As per my understanding, it seems that you are trying to filter the dataset with the @reportID parameter. When it
doesn’t contain value ‘0’, the dataset returns values. Otherwise, no value is returned in the dataset.
If in this scenario, we can achieve this requirement with filters in the dataset. For more details, please refer to the following steps:
Modify the dataset with the below query:
SELECT 'Students report 1' AS selectRptName, 1 AS rptNumValue
UNION
SELECT 'Students report 2', 2
UNION
SELECT 'Students report 3', 3
UNION
SELECT 'Students report 4', 4
UNION
SELECT 'Students report 5', 5
ORDER BY selectRptName
Click the Filters in the left pane of Dataset Properties dialog box.
Add a filter as below:
Expression: =INSTR(JOIN(Parameters!reportID.Value,","),"0")>0
Type: Boolean
Operator: =
Value: false
The following screenshot is for your reference:
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
'expression is of wrong type' - but which and where..?
hello.
Hopefully this will be clear as day to someone.. Please could someone tell me why I'm getting the following error message..
[061010_042222995][][EXCEPTION] SQLException encounter while executing data trigger....
java.sql.SQLException: ORA-06550: line 4, column 20:
PLS-00382: expression is of wrong type
ORA-06550: line 4, column 1:
PL/SQL: Statement ignoreddata template where trigger is called..
<?xml version="1.0" encoding="utf-8" ?>
- <dataTemplate name="UofS_OutstandngExpenses_Report" defaultPackage="SUBIXCLT" dataSourceRef="FINDEV" version="1.0">
- <properties>
<property name="xml_tag_case" value="upper" />
<property name="include_parameters" value="true" />
<property name="debug_mode" value="on" />
</properties>
- <parameters>
<parameter name="p_claimant" dataType="character" defaultValue="" />
<parameter name="p_expense_date_from" dataType="date" defaultValue="" />
<parameter name="p_expense_date_to" dataType="date" defaultValue="" />
<parameter name="p_raisedby" dataType="character" defaultValue="" />
<parameter name="p_status" dataType="character" defaultValue="" />
<parameter name="p_ordered_by" dataType="varchar2" defaultValue="" />
</parameters>
- <dataQuery>
- <sqlStatement name="Q1">
- <![CDATA[
SELECT DISTINCT
erh.invoice_num,
pap.full_name EMP_CLAIMING,
DECODE(NVL(erh.expense_status_code, 'Not yet Submitted (NULL)'), 'CANCELLED', 'CANCELLED',
'EMPAPPR', 'Pending Individuals Approval', 'ERROR', 'Pending System Administrator Action',
'HOLD_PENDING_RECEIPTS ', 'Hold Pending Receipts', 'INPROGRESS', 'In Progress', 'INVOICED', 'Ready for Payment',
'MGRAPPR', 'Pending Payables Approval', 'MGRPAYAPPR', 'Ready for Invoicing', 'PAID', 'Paid',
'PARPAID', 'Partially Paid', 'PAYAPPR', 'Payables Approved', 'PENDMGR', 'Pending Manager Approval',
'PEND_HOLDS_CLEARANCE', 'Pending Payment Verification', 'REJECTED', 'Rejected', 'RESOLUTN', 'Pending Your Resolution',
'RETURNED', 'Returned', 'SAVED', 'Saved', 'SUBMITTED', 'Submitted', 'UNUSED', 'UNUSED',
'WITHDRAWN','Withdrawn', 'Not yet Submitted (NULL)') "EXPENSE_STATUS" ,
NVL(TO_CHAR(erh.report_submitted_date,'dd-MON-yyyy'),'NULL') SUBMIT_DATE,
NVL(TO_CHAR(erh.expense_last_status_date,'dd-MON-yyyy'),'NULL') LAST_UPDATE,
erh.override_approver_name ER_Approver,
fu.description EXP_ADMIN,
erh.total,
erh.description
FROM
AP_EXPENSE_REPORT_HEADERS_all erh,
per_all_people_f pap, fnd_user fu
WHERE erh.employee_id = pap.person_id
AND fu.user_id = erh.created_by
AND NVL(erh.expense_status_code, 'Not yet Submitted') NOT IN ('MGRAPPR', 'INVOICED', 'PAID', 'PARPAID')
AND pap.full_name = NVL(:p_claimant, pap.full_name)
AND TRUNC(erh.report_submitted_date) BETWEEN NVL(:p_expense_date_from, '01-JAN-1999') AND NVL(:p_expense_date_to,'31-DEC-2299')
AND fu.description = NVL(:p_raisedby,fu.description)
AND erh.expense_status_code = NVL(:p_status,erh.expense_status_code) &L_ORDERED_BY
]]>
</sqlStatement>
</dataQuery>
<dataTrigger name="beforeReport" source="SUBIXCLT.beforeReportTrigger" />
- <dataStructure>
- <group name="G_XP_CLM_TRACKNG" source="Q1">
<element name="INVOICE_NUM" value="INVOICE_NUM" />
<element name="EMP_CLAIMING" value="EMP_CLAIMING" />
<element name="EXPENSE_STATUS" value="EXPENSE_STATUS" />
<element name="SUBMIT_DATE" value="SUBMIT_DATE" />
<element name="LAST_UPDATE" value="LAST_UPDATE" />
</group>
</dataStructure>
</dataTemplate>and the package spec & body..
--THE SPEC...
CREATE OR REPLACE PACKAGE Subixclt IS
FUNCTION beforeReportTrigger RETURN VARCHAR2;
p_order_by VARCHAR2(50);
l_ordered_by VARCHAR2(350);
p_claimant VARCHAR2(80);
expense_date_from DATE;
expense_date_to DATE;
p_raisedby VARCHAR2(80);
p_status VARCHAR2(80);
p_ordered_by VARCHAR2(80);
--RETURN VARCHAR2;
END;
--THE BODY...
REATE OR REPLACE PACKAGE BODY Subixclt IS
FUNCTION BeforeReportTrigger RETURN VARCHAR2 IS
BEGIN
Fnd_File.PUT_LINE(Fnd_File.LOG,'L_ORDERED_by'||L_ORDERED_BY);
DECLARE
L_ORDERED_BY VARCHAR2(50);
P_ORDERED_BY VARCHAR2(50);
P_RAISEDBY VARCHAR2(50);
P_STATUS VARCHAR2(50);
P_CLAIMANT VARCHAR2(100);
P_EXPENSE_DATE_FROM DATE;
--P_EXPENSE_DATE_FROM VARCHAR2(50);
--P_EXPENSE_DATE_TO VARCHAR2(50);
P_EXPENSE_DATE_TO DATE;
BEGIN
IF (P_ORDERED_BY='Expense Report Number') THEN
L_ORDERED_BY :='order by 1 asc;';
ELSIF (P_ORDERED_BY='Person Claiming') THEN
L_ORDERED_BY :='order by 2 asc;';
ELSIF (P_ORDERED_BY='Submit Date') THEN
L_ORDERED_BY :='order by 4 asc;';
END IF;
RETURN(L_ORDERED_BY);
--RETURN NULL;
END;
END;
END;Many thanks for looking..
DThanks for the suggestion. I initially didnt have the RETURN TRUE after every IF statement and have since removed the 'WHEN OTHERS' section but I'm still getting the same error message. If its to be believed, doesn't it sound like its not finding any of the 3 possible parameter entries available? This can't be so, I've checked the ConC Program parameter name is correct, and the value set linked to it only has available the 3 options where I make the choice..
Body now reads:
CREATE OR REPLACE PACKAGE BODY Subixclt
AS
FUNCTION BEFOREREP (P_ORDERED_BY IN VARCHAR2)RETURN BOOLEAN IS
BEGIN
--FND_FILE.PUT_LINE(FND_FILE.LOG,'L_ORDERED_by'||L_ORDERED_BY);
DECLARE
L_ORDERED_BY VARCHAR2(50);
--P_RAISEDBY VARCHAR2(50);
--P_STATUS VARCHAR2(50);
--P_CLAIMANT VARCHAR2(100);
--P_EXPENSE_DATE_FROM DATE;
--P_EXPENSE_DATE_TO DATE;
BEGIN
IF (P_ORDERED_BY='Expense Report Number') THEN
L_ORDERED_BY :='order by 1 asc;';
ELSIF (P_ORDERED_BY='Person Claiming') THEN
L_ORDERED_BY :='order by 2 asc;';
ELSIF (P_ORDERED_BY='Submit Date') THEN
L_ORDERED_BY :='order by 4 asc;';
RETURN TRUE;
END IF;
-- EXCEPTION WHEN OTHERS THEN RETURN FALSE;
--RETURN(L_ORDERED_BY);
END;
END;
END;error log reads:
XDO Data Engine Version No: 5.6.3
Resp: 20707
Org ID : 102
Request ID: 2484872
All Parameters: p_raisedby=SUSAN HOLLIDAY:p_status=:p_claimant=:p_expense_date_from=:p_expense_date_to=:P_ORDERED_BY=Person Claiming
Data Template Code: SUBIXCLT
Data Template Application Short Name: PO
Debug Flag: N
{p_claimant=, p_expense_date_to=, p_status=, p_raisedby=SUSAN HOLLIDAY, p_expense_date_from=, P_ORDERED_BY=Person Claiming}
Calling XDO Data Engine...
[061110_114425280][][STATEMENT] Start process Data
[061110_114425282][][STATEMENT] Process Data ...
[061110_114425284][][STATEMENT] Executing data triggers...
[061110_114425284][][STATEMENT] BEGIN
SUBIXCLT.p_claimant := :p_claimant ;
SUBIXCLT.p_expense_date_from := :p_expense_date_from ;
SUBIXCLT.p_expense_date_to := :p_expense_date_to ;
SUBIXCLT.p_raisedby := :p_raisedby ;
SUBIXCLT.p_status := :p_status ;
SUBIXCLT.p_ordered_by := :p_ordered_by ;
:XDO_OUT_PARAMETER := 1;
END;
[061110_114425287][][STATEMENT] 1: :
[061110_114425287][][STATEMENT] 2:null :
[061110_114425287][][STATEMENT] 3:null :
[061110_114425288][][STATEMENT] 4:SUSAN HOLLIDAY :
[061110_114425288][][STATEMENT] 5: :
[061110_114425288][][STATEMENT] 6:null :
[061110_114425291][][STATEMENT] Executing data triggers...
[061110_114425292][][STATEMENT] Declare
l_flag Boolean;
BEGIN
l_flag := SUBIXCLT.beforerep(:p_ordered_by) ;
if (l_flag) then
:XDO_OUT_PARAMETER := 1;
end if;
end;
[061110_114425293][][STATEMENT] 1:null :
[061110_114425302][][EXCEPTION] SQLException encounter while executing data trigger....
java.sql.SQLException: ORA-06503: PL/SQL: Function returned without value
ORA-06512: at "APPS.SUBIXCLT", line 27
ORA-06512: at line 4Many thanks for staying with this..
S -
Problem with boolean type in Informix via ODBC
Hello,
I'm connecting to an Informix database from an Oracle database via the ODBC Gateway. The connection works fine.
However, when I select a boolean type column from a table in the Informix database, nothing is returned and I get the following error:
SQL> select "stat" from bt@informix;
ERROR:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Informix][Informix ODBC Driver]Restricted data type attribute violation.
{07006,NativeErr = -11013}
ORA-02063: preceding 2 lines from INFORMIX
no rows selected
Selecting a boolean type column with isql works fine. Other column types work from Oracle.
Can anyone help me resolve this issue? Please find configuration details and traces below.
Software stack:
Informix Database: Enterprise Edition 12.10 for Linux x86_64
Informix ODBC driver: Informix Client SDK Developer Edition 4.10 for Linux 64-bit
Oracle Database: Enterprise Edition 11.2.0.1.0 64-bit (Oracle Linux 6.6 64-bit)
UnixODBC: 2.3.2 x86_64
odbcinst.ini:
[Informix]
Driver=/opt/IBM/informix/lib/cli/libifcli.so
Setup=/opt/IBM/informix/lib/cli/libifcli.so
APILevel=1
ConnectFunctions=YYY
DriverODBCVer=03.51
FileUsage=0
SQLLevel=1
smProcessPerConnect=Y
[ODBC]
TraceFile=/tmp/odbc.log
Trace = Yes
odbc.ini:
[ol_informix1210]
Driver=Informix
Description=Test connection
Database=sysutils
LogonID=informix
pwd=informix
Servername=ol_informix1210
CursorBehavior=0
DB_LOCALE=en_us.8859-1
TRANSLATIONDLL=/opt/IBM/informix/lib/esql/igo4a304.so
[ODBC]
UNICODE=UCS-2
; Trace file Section
Trace=1
TraceFile=/tmp/odbctrace.out
InstallDir=/opt/IBM/informix
TRACEDLL=idmrs09a.so
Oracle Gateway init.ora:
HS_FDS_CONNECT_INFO=ol_informix1210
HS_FDS_SHAREABLE_NAME=/usr/local/lib/libodbc.so
HS_FDS_TRACE_LEVEL=debug
HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1
Oracle Gateway trace:
Entered hgoftch, cursor id 1 at 2015/04/14-12:22:03
hgoftch, line 130: Printing hoada @ 0x2007fe0
MAX:1, ACTUAL:1, BRC:100, WHT=5 (SELECT_LIST)
hoadaMOD bit-values found (0x20:NEGATIVE_HOADADTY)
DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
-7 BIT Y 1 1 0/ 0 0 0 20 stat
Performing delayed open.
SQLBindCol: column 1, cdatatype: -28, bflsz: 1
Entered hgopoer at 2015/04/14-12:22:03
hgopoer, line 233: got native error -11013 and sqlstate 07006; message follows...
[Informix][Informix ODBC Driver]Restricted data type attribute violation. {07006,NativeErr = -11013}
Exiting hgopoer, rc=0 at 2015/04/14-12:22:03
hgoftch, line 730: calling SQLFetch got sqlstate 07006
0 rows fetched
Exiting hgoftch, rc=28500 at 2015/04/14-12:22:03 with error ptr FILE:hgoftch.c LINE:730 FUNCTION:hgoftch() ID:Fetch resultset data
ODBC trace:
[ODBC][11041][1429005970.973443][SQLPrepare.c][196]
Entry:
Statement = 0x276ecb0
SQL = [SELECT A1. stat FROM BT A1][length = 29]
[ODBC][11041][1429005970.973914][SQLPrepare.c][371]
Exit:[SQL_SUCCESS]
[ODBC][11041][1429005970.973940][SQLNumResultCols.c][156]
Entry:
Statement = 0x276ecb0
Column Count = 0x26f5868
[ODBC][11041][1429005970.973970][SQLNumResultCols.c][248]
Exit:[SQL_SUCCESS]
Count = 0x26f5868 -> 1
[ODBC][11041][1429005970.974097][SQLDescribeCol.c][247]
Entry:
Statement = 0x276ecb0
Column Number = 1
Column Name = 0x7fffc3ff2d90
Buffer Length = 31
Name Length = 0x7fffc3ff2ed4
Data Type = 0x7fffc3ff2ed8
Column Size = 0x7fffc3ff2e70
Decimal Digits = 0x7fffc3ff2edc
Nullable = 0x7fffc3ff2ee0
[ODBC][11041][1429005970.974140][SQLDescribeCol.c][501]
Exit:[SQL_SUCCESS]
Column Name = [stat]
Data Type = 0x7fffc3ff2ed8 -> -7
Column Size = 0x7fffc3ff2e70 -> 1
Decimal Digits = 0x7fffc3ff2edc -> 0
Nullable = 0x7fffc3ff2ee0 -> 1
[ODBC][11041][1429005970.974192][SQLSetStmtAttr.c][265]
Entry:
Statement = 0x276ecb0
Attribute = SQL_ATTR_ROW_ARRAY_SIZE
Value = 0x64
StrLen = 0
[ODBC][11041][1429005970.974218][SQLSetStmtAttr.c][925]
Exit:[SQL_SUCCESS]
[ODBC][11041][1429005970.974230][SQLSetStmtAttr.c][265]
Entry:
Statement = 0x276ecb0
Attribute = SQL_ATTR_ROW_BIND_TYPE
Value = (nil)
StrLen = -5
[ODBC][11041][1429005970.974249][SQLSetStmtAttr.c][925]
Exit:[SQL_SUCCESS]
[ODBC][11041][1429005970.974837][SQLExecute.c][187]
Entry:
Statement = 0x276ecb0
[ODBC][11041][1429005970.975231][SQLExecute.c][348]
Exit:[SQL_SUCCESS]
[ODBC][11041][1429005970.975255][SQLSetStmtAttr.c][265]
Entry:
Statement = 0x276ecb0
Attribute = SQL_ATTR_ROW_STATUS_PTR
Value = 0x27f5b78
StrLen = -4
[ODBC][11041][1429005970.975280][SQLSetStmtAttr.c][925]
Exit:[SQL_SUCCESS]
[ODBC][11041][1429005970.975291][SQLSetStmtAttr.c][265]
Entry:
Statement = 0x276ecb0
Attribute = SQL_ATTR_ROWS_FETCHED_PTR
Value = 0x26f5850
StrLen = -4
[ODBC][11041][1429005970.975311][SQLSetStmtAttr.c][925]
Exit:[SQL_SUCCESS]
[ODBC][11041][1429005970.975326][SQLBindCol.c][236]
Entry:
Statement = 0x276ecb0
Column Number = 1
Target Type = -28 SQL_C_UTINYINT
Target Value = 0x27f5af8
Buffer Length = 1
StrLen Or Ind = 0x27f5eb8
[ODBC][11041][1429005970.975349][SQLBindCol.c][341]
Exit:[SQL_SUCCESS]
[ODBC][11041][1429005970.975367][SQLFetch.c][162]
Entry:
Statement = 0x276ecb0
[ODBC][11041][1429005970.975455][SQLFetch.c][348]
Exit:[SQL_ERROR]
DIAG [07006] [Informix][Informix ODBC Driver]Restricted data type attribute violation.
[ODBC][11041][1429005970.975574][SQLGetDiagRec.c][758]
Entry:
Statement = 0x276ecb0
Rec Number = 1
SQLState = 0x7fffc3ff2e20
Native = 0x7fffc3ff2c14
Message Text = 0x7fffc3ff2c20
Buffer Length = 510
Text Len Ptr = 0x7fffc3ff2e70
[ODBC][11041][1429005970.975615][SQLGetDiagRec.c][795]
Exit:[SQL_SUCCESS]
SQLState = 07006
Native = 0x7fffc3ff2c14 -> -11013
Message Text = [[Informix][Informix ODBC Driver]Restricted data type attribute violation.]
[ODBC][11041][1429005970.975642][SQLGetDiagRec.c][758]
Entry:
Statement = 0x276ecb0
Rec Number = 2
SQLState = 0x7fffc3ff2e20
Native = 0x7fffc3ff2c14
Message Text = 0x7fffc3ff2c20
Message Text = 0x7fffc3ff2c20
Buffer Length = 510
Text Len Ptr = 0x7fffc3ff2e70
[ODBC][11041][1429005970.975667][SQLGetDiagRec.c][795]
Exit:[SQL_NO_DATA]Here are my findings after consulting the unixODBC mailing list and the IBM documentation.
There are several levels of data types at play here: native Informix SQL types, Informix ODBC driver SQL types and Informix ODBC driver C types (as well as standard C types).
According to the Informix documentation (http://www-01.ibm.com/support/knowledgecenter/SSGU8G_11.70.0/com.ibm.odbc.doc/ids_odbc_108.htm), the ODBC driver SQL type for the native boolean type is SQL_BIT.
The traces show that the ODBC SQL type is SQL_BIT (type code -7) and that this should be converted into the SQL_C_UTINYINT ODBC C type (type code -28).
Oracle ODBC Gateway trace:
DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
-7 BIT Y 1 1 0/ 0 0 0 20 stat
Performing delayed open.
SQLBindCol: column 1, cdatatype: -28, bflsz: 1
unixODBC trace:
ODBC][11041][1429005970.975326][SQLBindCol.c][236]
Entry:
Statement = 0x276ecb0
Column Number = 1
Target Type = -28 SQL_C_UTINYINT
Target Value = 0x27f5af8
Buffer Length = 1
StrLen Or Ind = 0x27f5eb8
[ODBC][11041][1429005970.975349][SQLBindCol.c][341]
Oracle tries to bind the SQL_BIT type column to a buffer of SQL_C_UTINYINT type, which requires a conversion from SQL_BIT to SQL_C_UTINYINT that is apparently not supported by the Informix ODBC Driver.
According to the documentation (http://www-01.ibm.com/support/knowledgecenter/SSGU8G_11.70.0/com.ibm.odbc.doc/ids_odbc_108.htm) the Informix ODBC driver can only convert the SQL_BIT ODBC SQL type into SQL_C_BINARY, SQL_C_BIT and SQL_C_CHAR ODBC C types. (The ODBC C types are in turn converted into standard C types, for example the SQL_C_BIT type is converted into UCHAR which is a typedef for the standard C type unsigned char.)
A possible workaround could be to tell Informix to present boolean as a different ODBC SQL type, for example SQL_CHAR (as it would be possible with PostgreSQL by setting BoolAsCharater=1 in odbc.ini), but Informix only seems to supports the SQL_BIT ODBC SQL type.
A cumbersome workaround is to use the Gateway's pass-through feature that allows a query to be passed to Informix as is, which in turn allows us to cast the boolean field into a character field:
SQL> set serveroutput on
SQL> r
1 DECLARE
2 val VARCHAR2(1);
3 c INTEGER;
4 nr INTEGER;
5 BEGIN
6 c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@informix;
7 DBMS_HS_PASSTHROUGH.PARSE@informix(c,'select cast (stat as character) from bt');
8 LOOP
9 nr := DBMS_HS_PASSTHROUGH.FETCH_ROW@informix(c);
10 EXIT WHEN nr = 0;
11 DBMS_HS_PASSTHROUGH.GET_VALUE@informix(c, 1, val);
12 DBMS_OUTPUT.PUT_LINE(val);
13 END LOOP;
14 DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@informix(c);
15 END;
16*
t
f
PL/SQL procedure successfully completed
Easier solutions are still welcome. -
PLS-00382: expression is of wrong type
Hi,
oracle 9.2
I have to write one simple procedure to retrieve some column records from the table.
In the Begin... end block...I have written select statement
Now, if i include all the columns in the select query then procedure gets compile without any error...but when I remove any one column or select specific columns in the select query of that procedure then I get below error..
PLS-00382: expression is of wrong type
can anybody explain ?
RegardsHi,
below has been defined in the declaration part and using the below defined cur3 for the OUT parameter.
TYPE Rec3 IS RECORD
col1 tab.col1%TYPE,
col2 tab.col2%TYPE,
col3 tab.col3%TYPE,
col4 tab.col4%TYPE,
TYPE Cur3 IS REF CURSOR RETURN Rec3 ;
is it due to record type has been defined ?
Regards -
How to map Boolean Types in Import Manager
Hi,
I have a issue in Import Manager for mapping Boolean Types.
I have a field which has a single KEY and multilple values(for different languages).
I want to map it to a field in a Tuple.
I can map the Key to field name.
But the values, I am not able to map. Could you help me here please.
Thanks a lot in advance.
Regards,
RashmiHi Anton
Format your GM Time source as YYYY:MM:DD:HH:NN:SS:TTT (e.g. 2010:02:19:14:34:28:000). Deviations from this format seem to confuse the IM.
HTH,
Mark -
Hi,
I have an infopath web brower enabled form. In the form i have a date field.
I am passing the data from the database to that field using the C# code.
But, as the field from database is coming as string, i am getting an error, and i am not able to assign the value.
I get the date value from database as "3/25/2011 12:00:00 AM"
I used the below code:
[CODE]
if (objInfopathFormcData.myRecievedDate != null)
myRoot.SelectSingleNode("/my:myFields/my:field97", NamespaceManager).SetValue(objInfopathFormcData.myRecievedDate);
[/CODE]
I am getting the error as "Schema validation found non-data type errors".
How to set the value for a date field in Infopath.
Thank youHI,
I fixed it:
Below code is used to fix:
[CODE]
XPathNavigator xfield = null;
DateTime dtmyRecievedDate;
dtmyRecievedDate = Convert.ToDateTime(objInfopathFormcData.myRecievedDate);
if (objFormcData.FcCompletionDate != null)
xfield = myRoot.SelectSingleNode("/my:myFields/my:field97", NamespaceManager);
DeleteNil(xfield);
xfield.SetValue(dtmyRecievedDate.GetDateTimeFormats().GetValue(5).ToString());
// method to delete xsi:nil
private void DeleteNil(XPathNavigator nav1)
if (nav1.MoveToAttribute("nil", "http://www.w3.org/2001/XMLSchema-instance"))
nav1.DeleteSelf();
[/CODE]
Thank you -
Defs.h:a typedef name cannot be used in an elaborated type specifier
Hi,
I recently migrated from Workshop C++ 4.2 (Solaris 2.6) to C++5.0
When I recompiled all my programs, I get these errors in the header files :
"/opt/SUNWspro/SC5.0/include/CCios/stdiostream.h", line 29: Error: streamoff is
not defined.
"/opt/SUNWspro/SC5.0/include/CC/rw7/rw/defs.h", line 316: Error: A typedef name
cannot be used in an elaborated type specifier..
"/opt/SUNWspro/SC5.0/include/CC/rw7/rw/defs.h", line 317: Error: A typedef name
cannot be used in an elaborated type specifier..
"/opt/SUNWspro/SC5.0/include/CC/rw7/rw/defs.h", line 318: Error: A typedef name
cannot be used in an elaborated type specifier..
"/opt/SUNWspro/SC5.0/include/CC/rw7/rw/stringid.h", line 50: Error: A typedef na
me cannot be used in an elaborated type specifier..
"/opt/SUNWspro/SC5.0/include/CC/rw7/rw/stringid.h", line 51: Error: A typedef na
me cannot be used in an elaborated type specifier..
I've installed the following patches (107311-19, 107390-19, 107357-11) and compiled with the -library=rwtools7,iostream options.
It still doesn't work and I can't figure out why...
Any help would be appreciated.
Thanks
AnnieWorkshop 5.0 is EOLed. Please try the current version 'Sun One Studio 7, Compiler Collection'(http://wwws.sun.com/software/sundev/suncc/index.html) or 'Sun One Studio 7, Enterprise Edition'(http://wwws.sun.com/software/sundev/solde/index.html)
- Rose -
Plz help upgrade issue moving data from char type structure to non char typ
Hi Experts
plz help its very urgent
Data :workout(5000) .
FIELD-SYMBOLS : <FS_WORKOUT> TYPE ANY.
workout = ' u' .
ASSIGN WORKOUT TO <FS_WORKOUT> CASTING TYPE C .
BAPISDITM = <FS_WORKOUT>.
i am getting dump after BAPISDITM = <FS_WORKOUT>.
i think i am getting the dump bcoz i am moving character type structure to non character type structure but i think with field symbols we can remove this issue thats y i used it but its not working plz help me
its very urgent
*dump is :*
Short text
Data objects in Unicode programs cannot be converted.
What happened?
Error in the ABAP Application Program
The current ABAP program "ZSDR0009" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
How to correct the error
Use only convertible operands "dst" and "src" for the statement
"MOVE src TO dst"
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"UC_OBJECTS_NOT_CONVERTIBLE" " "
"ZSDR0009" or "ZSDR0009_I02"
"USER_COMMAND"
thanx in advancei got d solution in this thread
Hi all,
data: gv_line(6000) type c.
Bvbapkom = gv_line.
But i am getting the Error like : gv_line and Bvbapkom are not mutually convertable.
Note: Bvbapkom is a Structure
How do i solve this ?
Mahesh
KR
Posts: 210
Registered: 11/24/06
Forum Points: 0
Re: gv_line and Bvbapkom are not mutually convertable.
Posted: Nov 30, 2007 8:40 AM in response to: KR Reply
Hi ,
i got the solution
ANSWER:
Field-symbols: <X_Bvbapkom> type x,
<X_gv_line> type x.
Assign: Bvbapkom to <X_Bvbapkom> casting,
gv_line to <X_gv_line> casting.
<X_Bvbapkom> = <X_gv_line>.
Nasaka Ramakris...
Posts: 4
Registered: 1/19/08
Forum Points: 20
Re: gv_line and Bvbapkom are not mutually convertable.
Posted: Jan 19, 2008 7:42 AM in response to: KR Reply
Hi Check this answer.
ANSWER:
Field-symbols: <X_Bvbapkom> type x,
<X_gv_line> type x.
Assign: Bvbapkom to <X_Bvbapkom> casting,
gv_line to <X_gv_line> casting.
<X_Bvbapkom> = <X_gv_line>. -
Non-character-type structure need to be written in ASCI File in Unicode sys
Hi Gurus,
I am trying to write a structure into a ASCI file iapplication server.
My code is as follows.
data : ls_header type BBP_PDS_CTR_HEADER_D ,
lv_filename TYPE rlgrap-filename VALUE '/interface/AEE/IN/kalandi'.
CALL FUNCTION 'BBP_PD_CTR_GETDETAIL'
EXPORTING
I_OBJECT_ID = '4000000196'
IMPORTING
E_HEADER = ls_header.
open dataset lv_filename for output in text mode encoding default .
if sy-subrc = 0.
transfer ls_header to lv_filename.
close dataset lv_filename.
endif.
but it ives a dump .
Error is :
"TRANSFER f TO ..."
only character-type data objects are supported at the argument position
"f".
In this case. the operand "f" has the non-character-type
"BBP_PDS_CTR_HEADER_D". The
current program is a Unicode program. In the Unicode context, the type
'X' or structures containing not only character-type components are
regarded as non-character-type.
Thanks a lot in advance.
Points will be awared for appropriate Answers.
Regards
kalandiHi,
I think here ls_header and lv_filename are not compatible to transfer the data.
Regards,
Satish -
Hi i want to use boolean type in a procedure as out parameter !!
Hi
I need to use Boolean type as out parameter in my procedure which return true if the SELECT query in procedure returns any row otherwise it should return false
please HELP !!I need to use Boolean type as out parameter in my procedure which return true if the SELECT query in procedure returns any row otherwise it should return false
Sounds like basic PL/SQL stuff.
What problem are you experiencing?
Are you looking for something like this?
create or replace procedure check_emp (p_empno in number, p_result out boolean) is
dummy pls_integer;
begin
select 1
into dummy
from scott.emp
where empno = p_empno;
p_result := true;
exception
when no_data_found then
p_result := false;
end;
SQL> declare
2 emp_exists boolean;
3 begin
4 check_emp(7839, emp_exists);
5 if emp_exists then
6 dbms_output.put_line('Employee exists');
7 else
8 dbms_output.put_line('Employee does not exist');
9 end if;
10 end;
11 /
Employee exists
PL/SQL procedure successfully completed -
Union of non-compatible types error in column formula in obiee
Hi Experts,
Error: Union of non-compatible types
I used Case function in my column formula and got above error as a result.
The column formula goes below:
IFNULL(CASE WHEN EDM_TRD_IR_LEG.LEG_ID=1 THEN (EDM_TRD_IR_LEG.PAY_RECV_IND) ELSE 0 END, 0)
LEGID is numeric type. PAY_RECV_IND is varchar type.
Please let me know how to resolve this error.
Thanks in Advance.
-Regards
Mayuri898221 wrote:
Hi Experts,
Error: Union of non-compatible types
I used Case function in my column formula and got above error as a result.
The column formula goes below:
IFNULL(CASE WHEN EDM_TRD_IR_LEG.LEG_ID=1 THEN (EDM_TRD_IR_LEG.PAY_RECV_IND) ELSE 0 END, 0)
LEGID is numeric type. PAY_RECV_IND is varchar type.
Please let me know how to resolve this error.
Thanks in Advance.
-Regards
Mayuri@dpka, you have syntax errors in your solution. If you're casting as varchar, then your syntax should read '1' instead of 1. Also at the end, it should be '0' instead of 0.
Mayuri,
To use your syntax, try this:
IFNULL(CASE WHEN EDM_TRD_IR_LEG.LEG_ID=1 THEN CAST(EDM_TRD_IR_LEG.PAY_RECV_IND AS INTEGER) ELSE 0 END, 0)
...if you need the result as a numeric for aggregation purposes... -
What is the default value of boolean type transient attribute in VO?
Hi All,.
jdev version-11.1.2.1.0
i have created one vo based on eo where i add one boolean type transient attribute Marked(uihint checkbox).
now i have apply view criteria on this vo.
like---
ViewObject vo=getView(iterator);
vo.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
ViewCriteria vc=vo.createViewCriteria();
ViewCriteriaRow vcr=vc.createViewCriteriaRow();
vcr.setAttribute("Marked", "true");//Setting attribute on view criteria.
vcr.setConjunction(ViewCriteriaRow.VCROW_CONJ_AND);
vc.setCriteriaMode(ViewCriteria.CRITERIA_MODE_CACHE);
vo.applyViewCriteria(vc);//Apply view criteria on vo.
vo.executeQuery();
vc.add(vcr);
vo.executeQuery();this code running fine and that is selected only those row which i have cheked.
but now i want to apply view criteria that select select those rows that are not checked.
like-
vcr.setAttribute("Marked", "false");but it is not return any row.
if select checked any row and then uncheked that row so marked attribute for this row set false. but rows that are unchecked by default not return.
so my question is that what is default value of Marked attribute when user not take any action i will try
vcr.setAttribute("Marked","null");
but not working.i have tried this but this is not working.
follwing code working for Null case not for False
vcr.setAttribute("Marked","is null"); this code display all rows who has null but when i checked any row and then unchecked so that row get value "false" also not display.
Maybe you are looking for
-
Bom dia, Estou com uma dúvida, na transação FD32, existe um campo "Valor Venda". Neste campo fica um valor que está "bloqueado" para o cliente. Por exemplo: Um cliente possui esse campo Valor Venda = 16.036,32 Este valor, ele vem da onde? 1- Quando e
-
Dear All, One of user not able to remove the rejected report from Approval status report. Regards Aarati Kollur
-
Is it possible to get a free student copy of Photoshop?
Hello, I have just joined a local camera club and at a meeting the President was offering free copies of Photoshop to members. He said it was a free student version and we could download it from his Boxdrop overnight. He then said we should not load
-
Disable or Validate Order or Cost center in MIGO for Mvmt type 201/261
Hi All, I want to disable or validate 'Order' field in MIGO for the goods issue if the movement type is 201. I want to disable or validate 'Cost Center' field in MIGO for the goods issue if the movement type is 261. User do not want 'Order' field in
-
When I burn a DVD from my Sony camcorder, I cannot get the Date/Time on the burned DVD, although I can view the Date/Time on my camcorder video. How do I get it to appear on the DVD?