How to determine column length semantics through ANSI Dynamic SQL ?
I am looking for a way to determine the length semantics used for a column through ANSI Dynamic SQL.
I have a database with NLS_CHARACTERSET=AL32UTF8.
In this database I have the following table:
T1(C1 varchar2(10 char), C2 varchar2(40 byte))
When I describe this table in SQL*Plus, I get:
C1 VARCHAR2(10 CHAR)
C2 VARCHAR2(40)
In my Pro*C program (mode=ansi), I get the select statement on input, use PREPARE method to prepare it and then use the GET DESCRIPTOR method to obtain colum information for output:
GET DESCRIPTOR 'output_descriptor' VALUE :col_num
:name = NAME, :type = TYPE,
:length = LENGTH, :octet_length = OCTET_LENGTH
For both C1 and C2 I get the following:
:type=12
:length=40
:octet_length=40
So, even if I know that my database is AL32UTF8, there doesn't seem to be a way for me to determine whether char or byte length semantics were used in C1 and C2 column definitions.
Does anybody know how I can obtain this information through ANSI Dynamic SQL?
Note: the use of system views such as ALL_TAB_COLUMNS is not an option, since we wish to obtain this information even for columns in a complex select statements which may involve multiple tables.
Note: I believe OCI provides the information that we need through OCI_ATTR_DATA_SIZE (which is in bytes) and OCI_ATTR_CHAR_SIZE (which is in chars). However, switching to OCI is something we would like to avoid at this point.
Yes, I was wondering which forum would be the best for my question. I see similar questions in various forums, Call Interface, SQL and PL/SQL and Database - General. Unfortunately there is no Pro*C or Dynamic SQL forum which would be my first choice for posting this question.
Anyway I now posted the same question (same subject) in the Call Interface forum, so hopefully I'll get some answers there.
Thank you for the suggestion.
Similar Messages
-
How to determine the length of a curved path in illustrator CS2
how to determine the length of a curved path in illustrator CS2?
bornfree,
The free Patharea/Pathlength Filters from Telegraphics is your friend (the former gives you both area and length, both in different units):
Telegraphics - Free plugins for Photoshop & Illustrator...and other software -
How to increase the length of internal table dynamically
How to increase the length of internal table dynamically depending on the number of fields fetched into the internal table ?
The requirement code :
types: begin of t_data,
form like zscr_data_hdr-form,
werks like zscr_data_hdr-werks,
matnr like zscr_data_hdr-matnr,
verid like zscr_data_hdr-verid,
lot like zscr_data_hdr-lot,
lot_qty like zscr_data_hdr-lot_qty,
udate like zscr_data_hdr-udate,
utime like zscr_data_hdr-utime,
zuser like zscr_data_hdr-zuser,
processed like zscr_data_hdr-processed,
defect like zscr_defect_data-defect,
vornr like zscr_route_data-vornr,
fld1 like zscr_defect_data-defect_val,
fld2 like zscr_defect_data-defect_val,
fld3 like zscr_defect_data-defect_val,
fld4 like zscr_defect_data-defect_val,
fld5 like zscr_defect_data-defect_val,
fld6 like zscr_defect_data-defect_val,
fld7 like zscr_defect_data-defect_val,
fld8 like zscr_defect_data-defect_val,
fld9 like zscr_defect_data-defect_val,
fld10 like zscr_defect_data-defect_val,
fld11 like zscr_defect_data-defect_val,
fld12 like zscr_defect_data-defect_val,
fld13 like zscr_defect_data-defect_val,
fld14 like zscr_defect_data-defect_val,
fld15 like zscr_defect_data-defect_val,
fld16 like zscr_defect_data-defect_val,
fld17 like zscr_defect_data-defect_val,
fld18 like zscr_defect_data-defect_val,
fld19 like zscr_defect_data-defect_val,
fld20 like zscr_defect_data-defect_val,
fld21 like zscr_defect_data-defect_val,
fld22 like zscr_defect_data-defect_val,
fld23 like zscr_defect_data-defect_val,
fld24 like zscr_defect_data-defect_val,
fld25 like zscr_defect_data-defect_val,
fld26 like zscr_defect_data-defect_val,
fld27 like zscr_defect_data-defect_val,
fld28 like zscr_defect_data-defect_val,
fld29 like zscr_defect_data-defect_val,
fld30 like zscr_defect_data-defect_val,
fld31 like zscr_defect_data-defect_val,
fld32 like zscr_defect_data-defect_val,
fld33 like zscr_defect_data-defect_val,
fld34 like zscr_defect_data-defect_val,
fld35 like zscr_defect_data-defect_val,
fld36 like zscr_defect_data-defect_val,
fld37 like zscr_defect_data-defect_val,
fld38 like zscr_defect_data-defect_val,
fld39 like zscr_defect_data-defect_val,
fld40 like zscr_defect_data-defect_val,
fld41 like zscr_defect_data-defect_val,
fld42 like zscr_defect_data-defect_val,
fld43 like zscr_defect_data-defect_val,
fld44 like zscr_defect_data-defect_val,
fld45 like zscr_defect_data-defect_val,
fld46 like zscr_defect_data-defect_val,
fld47 like zscr_defect_data-defect_val,
fld48 like zscr_defect_data-defect_val,
fld49 like zscr_defect_data-defect_val,
fld50 like zscr_defect_data-defect_val,
fld51 like zscr_defect_data-defect_val,
fld52 like zscr_defect_data-defect_val,
fld53 like zscr_defect_data-defect_val,
fld54 like zscr_defect_data-defect_val,
fld55 like zscr_defect_data-defect_val,
fld56 like zscr_defect_data-defect_val,
fld57 like zscr_defect_data-defect_val,
fld58 like zscr_defect_data-defect_val,
fld59 like zscr_defect_data-defect_val,
fld60 like zscr_defect_data-defect_val,
fld61 like zscr_defect_data-defect_val,
fld62 like zscr_defect_data-defect_val,
fld63 like zscr_defect_data-defect_val,
fld64 like zscr_defect_data-defect_val,
fld65 like zscr_defect_data-defect_val,
fld66 like zscr_defect_data-defect_val,
fld67 like zscr_defect_data-defect_val,
fld68 like zscr_defect_data-defect_val,
fld69 like zscr_defect_data-defect_val,
fld70 like zscr_defect_data-defect_val,
fld71 like zscr_defect_data-defect_val,
fld72 like zscr_defect_data-defect_val,
fld73 like zscr_defect_data-defect_val,
fld74 like zscr_defect_data-defect_val,
fld75 like zscr_defect_data-defect_val,
fld76 like zscr_defect_data-defect_val,
fld77 like zscr_defect_data-defect_val,
fld78 like zscr_defect_data-defect_val,
fld79 like zscr_defect_data-defect_val,
fld80 like zscr_defect_data-defect_val,
fld81 like zscr_defect_data-defect_val,
fld82 like zscr_defect_data-defect_val,
fld83 like zscr_defect_data-defect_val,
fld84 like zscr_defect_data-defect_val,
fld85 like zscr_defect_data-defect_val,
fld86 like zscr_defect_data-defect_val,
fld87 like zscr_defect_data-defect_val,
fld88 like zscr_defect_data-defect_val,
fld89 like zscr_defect_data-defect_val,
fld90 like zscr_defect_data-defect_val,
fld91 like zscr_defect_data-defect_val,
fld92 like zscr_defect_data-defect_val,
fld93 like zscr_defect_data-defect_val,
fld94 like zscr_defect_data-defect_val,
fld95 like zscr_defect_data-defect_val,
fld96 like zscr_defect_data-defect_val,
fld97 like zscr_defect_data-defect_val,
fld98 like zscr_defect_data-defect_val,
fld99 like zscr_defect_data-defect_val,
fld100 like zscr_defect_data-defect_val,
fld101 like zscr_defect_data-defect_val,
fld102 like zscr_defect_data-defect_val,
fld103 like zscr_defect_data-defect_val,
fld104 like zscr_defect_data-defect_val,
fld105 like zscr_defect_data-defect_val,
fld106 like zscr_defect_data-defect_val,
fld107 like zscr_defect_data-defect_val,
fld108 like zscr_defect_data-defect_val,
fld109 like zscr_defect_data-defect_val,
fld110 like zscr_defect_data-defect_val,
fld111 like zscr_defect_data-defect_val,
fld112 like zscr_defect_data-defect_val,
fld113 like zscr_defect_data-defect_val,
fld114 like zscr_defect_data-defect_val,
fld115 like zscr_defect_data-defect_val,
fld116 like zscr_defect_data-defect_val,
fld117 like zscr_defect_data-defect_val,
fld118 like zscr_defect_data-defect_val,
fld119 like zscr_defect_data-defect_val,
fld120 like zscr_defect_data-defect_val,
fld121 like zscr_defect_data-defect_val,
fld122 like zscr_defect_data-defect_val,
fld123 like zscr_defect_data-defect_val,
fld124 like zscr_defect_data-defect_val,
fld125 like zscr_defect_data-defect_val,
fld126 like zscr_defect_data-defect_val,
fld127 like zscr_defect_data-defect_val,
fld128 like zscr_defect_data-defect_val,
fld129 like zscr_defect_data-defect_val,
fld130 like zscr_defect_data-defect_val,
fld131 like zscr_defect_data-defect_val,
fld132 like zscr_defect_data-defect_val,
fld133 like zscr_defect_data-defect_val,
fld134 like zscr_defect_data-defect_val,
fld135 like zscr_defect_data-defect_val,
dayst like zscr_data_hdr-dayst,
end of t_data.
In this fld1 to fld135 are defined in internal table.
But if the number of fields are more than 135 then the program is going to short dump.
Some times fld1 to fid170 or more fields will be there in my internal table.
Please suggest me how to make my requirement dynamic and display this data fetched into this internal table onto a .XLS file in the presentation server ?Hi
You can try to use the type string:
form like zscr_data_hdr-form,
werks like zscr_data_hdr-werks,
matnr like zscr_data_hdr-matnr,
verid like zscr_data_hdr-verid,
lot like zscr_data_hdr-lot,
lot_qty like zscr_data_hdr-lot_qty,
udate like zscr_data_hdr-udate,
utime like zscr_data_hdr-utime,
zuser like zscr_data_hdr-zuser,
processed like zscr_data_hdr-processed,
defect like zscr_defect_data-defect,
vornr like zscr_route_data-vornr,
fieldxx type string,
dayst like zscr_data_hdr-dayst,
end of t_data.
So you can save you informations of every fld<n> concatenating their values into fieldxx.
Max -
How to determine the length of a LRAW field
Hi
I'm trying to write a generic persistency class that saves data in a table with a lraw field.
As required the lraw field must be preceded by a length field of type INT2, but how can I calculate the actual length of the lraw field?
kind regards ThomasHi Martin
I'm sorry to tell you that you are wrong. The INT2 field must contain the actual length.
I have a table with a LRAW of 1024 bytes, but if I put 15 to the length field, then only 15 bytes are stored in the database.
Of course I could just enter 1024 for the length, but that would wast a lot of database space - and performance.
My class has a persistency method that inserts or updates a record in the database. The data that should be stored in the LRAW is sent to the method via a pointer (field symbol) of type X. This pointer can point at any data type.
Something like this:
field-symbols: <input> type x.
field-symbols: <lraw> type x.
*assign any field to <input>
assign <lraw> to mydbtable-lraw_field casting.
<lraw> = <input>.
*here i need to determine the length of mydbtable-lraw_field before i store the content to the database.
By debugging I can tell that if the pointer points to a char 32 field then the length of the X pointer is 64 and if the pointer points to a timestamp then the length of the x pointer is 8, but how can I determine this length programmatically - either from the x pointer or from the LRAW?
Best regards
Thomas -
How to adjust column length in function REUSE_ALV_GRID_DISPLAY
Hi,
I am using this function REUSE_ALV_GRID_DISPLAY to display .Please tell how to adjust the column length in this function, so that it is set to default field name size.
thanksHi anu,
The column width can be adjusted by using the following method:
-> define layout of the type.
data: it_layout type slis_layout_alv.
-> call the reuse alv... by using the is_layout field name with the above defined variable.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = <program that calls reuse>
I_CALLBACK_PF_STATUS_SET = < form to set pf-status>
I_CALLBACK_USER_COMMAND = <form to catch user command>
I_STRUCTURE_NAME = < structure to be passed>
I_GRID_TITLE = < any title to appear on top of the grid display>
IS_LAYOUT = it_layout
IT_FIELDCAT = IT_FIELDCAT[]
IT_EVENTS =
IT_EVENT_EXIT = I_EVENT_EXIT < to capture exit event>
I_SCREEN_START_COLUMN = 0 <screen settings>
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_INACT_OBJ
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
-> write a form to set the layout of the grid...
*& Form build_layout
text
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
Set layout field for row attributes(i.e. color)
gd_layout-info_fieldname = 'LINE_COLOR'.
gd_layout-totals_only = 'X'.
gd_layout-f2code = 'DISP'. "Sets fcode for double click or "click(press f2)
gd_layout-group_change_edit = 'X'.
gd_layout-header_text = 'helllllo'.
endform. " build_layout
endform.
This will optimize the output of the grid display.
Hope this helps!!!
Revert if any queries!!!
regards,
Naveenan. -
How to determine the length of variable based on the character contents
Hi Experts,
I need to determine the length of variable based on the character contents I am looking for.
Example;
lv = 'FENCE - Construction bond'
Where I need to know the exact field length of 'FENCE -'.
It's possible that variable will have different values in different lengths.
Thanks.
KathKathy Amion ,
hello Will you please elaborate ...!
The suggestion for your proble as i understood it is you will have to split the string at seperator '-' in two say variable name and conten. and then you will calculate the length of the VARIable name by using string function. -
How to make columns in the select list dynamic
Hi
I need to make columns in the select query dynamic.I have three tables.Table 1 contains master information lets say name of group(A group consists of members of various skill sets) and its period(A group is of specific period lets say for 18 months).Table 2 contains different skill sets corresponding to a group i.e there is one to many relationship between table 1 and table 2.Table 3 contains months information of skill sets.For example if skill set 1 is required for 5 months then there will be 5 rows(for each month) in table 3 corresponding to a skill set i.e there is again one to many relationship between table 2 and table 3.Tabale 3 will also contain man month value for perticular month.I need to show all the periods of a group and its sum of man month value for all skill sets.
If group1 is of 6 months (starts nov2006 and ends Apr2007) and has 5 skill sets then there will be one entry in table 1 and 5 entry in table 2(For skill set).For each entry in table 2 there will be 6 entry in table 3(for each month).I need to write a query which would display
Group name nov2006 dec2006 jan2007 feb2007 mar2007 apr2007
Gr1 10 15 21 17 18 22--These are sum of man month of all skill set for a particular groupIf Gr 2 is of 9 months then it would disply all the information in respective months.i.e for group 2 nine months information and group 1 six months information
Pls help
Thanks in advance
SasHi,
From your requirement, we understand that you want to make Rows in table 3 as Columns.
Please search pivot in this Forum.
Regards
K.Rajkumar -
How to control the maximum time that a dynamic sql can execute
Hi,
I want to restrict the maximum time that a dynamic sql can execute in a plsql block.
If the execution is not completed, the execution should be terminated and a exception should be raised.
Please let me know, if there is any provision for the same in Oracle 10g.
I was reading about Oracle Resource Database Resource Manager, which talks about restricting the maximum time of execution for Oracle session for a user.
However I am not sure, if this can be used to control the execution of dynamic sql in a plsql block.
Please provide some pointers.
Thank you,
Warm Regards,
Navin Srivastavanavsriva wrote:
We are building a messaging framework, which is used to send time sensitive messages to boundary system.I assume this means across application/database/server boundaries? Or is the message processing fully localised in the Oracle database instance?
Every message has a time to live. if the processing of message does not occurs within the specified time, we have to rollback this processing and mark the message in error state.This is a problematic requirement.. Time is not consistent ito data processing on any platform (except real-time ones). For example, messageFoo1 has a TTL (time to live) of 1 sec. It needs to read a number of rows from a table. The mere factor of whether those rows are cached in the database buffer cache, or still residing on disk, will play a major role in execution time. Physical I/O is significantly slower that logical I/O.
As a result, with the rows on disk, messageFoo1 exceeds the 1s TTL and fails. messageFoo2 is an identical message. It now finds most of the rows that were read by messageFoo1 in the buffer cache, enabling it to complete its processing under 1s.
What is the business logic behind the fact that given this approach, messageFoo1 failed, and the identical messageFoo2 succeeded? The only difference was physical versus logical I/O. How can that influence the business validation/requirement model?
If it does, then you need to look instead at a real-time operating system and server platform. Not Windows/Linux/Unix/etc. Not Oracle/SQL-Server/DB2/etc.
TTL is also not time based in other s/w layers and processing. Take for example the traceroute and ping commands for the Internet Protocol (IP) stack. These commands send an ICMP (Internet Control Message Protocol) packet.
This packet is constructed with a TTL value too. When TTL is exceeded, the packet expires and the sender receives a notification packet to that regard.
However, this TTL is not time based, but "+hop+" based. Each server's IP stack that receives an ICMP packet as it is routed through the network, subtracts 1 from the TTL and the forwards the packet (with the new TTL value). When a server's IP stack sees that TTL is zero, it does not forward the packet (with a -1 TTL), but instead responds back to the sender with an ICMP packet informing the sender that the packet's TTL has expired.
As you can see, this is a very sensible and practical implementation of TTL. Imagine now that this is time based.. and the complexities that will be involved for the IP stack s/w to deal with it in that format.
Making exact response/execution times part of the actual functional business requirements need to be carefully considered.. as this is very unusual and typically only found in solutions implemented in real-time systems. -
Column alias for spatial column within cursor loop using dynamic SQL
The following PL/SQL is trying to generate an error report for records or objects which are 3 dimensional or above. I have no issue execute one statement in SQLPLUS but I need to use the column alias for the spatial column. But, it is a different story using PL/SQL and dynamic SQL Any help will be great because I've been working on this for than 8 hours but with no luck! Thanks.
Here is the error I'm getting,
stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
ERROR at line 15:
ORA-06550: line 15, column 79:
PLS-00103: Encountered the symbol "P" when expecting one of the following:
. ( * @ % & = - + ; < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between || member SUBMULTISET_
The symbol "* was inserted before "P" to continue.
and my PL/SQL is,
set serveroutput on size 100000 feedback off
declare
rs integer;
rs1 integer;
cur integer;
rp integer;
trs integer;
n integer;
un varchar2(30);
stmt varchar2(200);
begin
dbms_output.put_line(rpad('Table Name',40)||' Dimension');
dbms_output.put_line(rpad('-',53,'-'));
cur:= dbms_sql.open_cursor;
for t in (select column_name,table_name from user_sdo_geom_metadata where regexp_like(table_name, '[^[A-B]_[AB]$'))
loop
stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
dbms_sql.parse(cur, stmt, dbms_sql.native);
dbms_sql.define_column(cur, 1, rs);
dbms_sql.define_column(cur, 2, rs1);
rp:= dbms_sql.execute(cur);
n:=dbms_sql.fetch_rows(cur);
dbms_sql.column_value(cur, 1, rs);
dbms_sql.column_value(cur, 2, rs1);
dbms_output.put_line(rpad(t.table_name,38,'.')||rpad(rs,15)||rpad(rs1,15));
end loop;
dbms_sql.close_cursor(cur);
dbms_output.put_line(rpad('-',53,'-'));
end;
set serveroutput off feedback on feedback 6The following PL/SQL is trying to generate an error report for records or objects which are 3 dimensional or above. I have no issue execute one statement in SQLPLUS but I need to use the column alias for the spatial column. But, it is a different story using PL/SQL and dynamic SQL Any help will be great because I've been working on this for than 8 hours but with no luck! Thanks.
Here is the error I'm getting,
stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
ERROR at line 15:
ORA-06550: line 15, column 79:
PLS-00103: Encountered the symbol "P" when expecting one of the following:
. ( * @ % & = - + ; < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between || member SUBMULTISET_
The symbol "* was inserted before "P" to continue.
and my PL/SQL is,
set serveroutput on size 100000 feedback off
declare
rs integer;
rs1 integer;
cur integer;
rp integer;
trs integer;
n integer;
un varchar2(30);
stmt varchar2(200);
begin
dbms_output.put_line(rpad('Table Name',40)||' Dimension');
dbms_output.put_line(rpad('-',53,'-'));
cur:= dbms_sql.open_cursor;
for t in (select column_name,table_name from user_sdo_geom_metadata where regexp_like(table_name, '[^[A-B]_[AB]$'))
loop
stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
dbms_sql.parse(cur, stmt, dbms_sql.native);
dbms_sql.define_column(cur, 1, rs);
dbms_sql.define_column(cur, 2, rs1);
rp:= dbms_sql.execute(cur);
n:=dbms_sql.fetch_rows(cur);
dbms_sql.column_value(cur, 1, rs);
dbms_sql.column_value(cur, 2, rs1);
dbms_output.put_line(rpad(t.table_name,38,'.')||rpad(rs,15)||rpad(rs1,15));
end loop;
dbms_sql.close_cursor(cur);
dbms_output.put_line(rpad('-',53,'-'));
end;
set serveroutput off feedback on feedback 6 -
30EA1: Determine column lengths before csv-Import
Hello out there,
I tried to import a csv (actually semicolon separated and enclosed in double quotes) into a new table using SQL Developer.
I got error messages that some columns are to short (ORA-12899). Now the question is, is there an option having SQL Developer determine the maximum length of the data to propose a suitable column width?
Wenn I convert the csv to Excel an import that, I get similar errors but much later in the process. So Excel-import seems to look much farther ahead than csv-import.
What I need is SQL Developer scanning the whole file to determine the maximum length of data an not only the first row or the first few 1000 rows.
Can this be achieved somehow?
Regards,
dhalekHi Dhalek,
Not sure if your problem is that we are not calculating the size of the columns correctly, we are not generating the inserts correctly or if we are not reading the rows with the columns that are large during the preview phase which is where we profile the data and determine the size of the columns. Can you see the rows that are rejected in the preview? When the table is created, are the sizes of the columns correct? Is it possible that your csv file is having the same problem with the single quote as the excel file? Once we have read the data, the generation is handled in the same way for both so the inserts should look the same.
Sqldeveloper uses java batch insert for the Insert method which is different from standard insert and inserting via a script. The rules are slightly different so rejections may differ. Also, failures reject the entire batch not just the bad row. For now, to limit the number of rejected rows, you can set the preferences->database->advanced-Sql Array Fetch Size to 1 for the import. This will generate only bad rows in the bad file and should make it easier to pinpoint the problem. You'll want to restore that value because it also affects any fetches done by SQLDeveloper. I'll need to research our generation of the single quote in the data.
Also you may want to try setting the preferences->database->load->preview characters limit to a very high number if you think the problem is that we are not reading the rows with the large columns during the preview. This is the overalll limit of characters that will be read from the file during the preview.
You can also try the insert script method to load your data which will eliminate any java batch insert issues.
Thanks,
Joyce -
How to determine column inches in a text frame with intersecting frames?
I am trying to write a script to determine how much text would fit in a text frame before actually having the text. If the frame has no run-around areas intruding on the frame it is the simple depth of the frame. Is there an easy way to determine the area of the frame with the obstructed areas subtracted?
Maybe you could fill text frame with placeholder text:
myTextFrame.contents = TextFrameContents.placeholderText;
Hope that helps.
tomaxxi
http://indisnip.wordpress.com/ -
How to determine the length of a line of text in a multi line text control
I am working on a simple widget to compare two snippets of text. The string controls are side by side with a colum of square bools in between
the two string controls.
The Bools line up with the lines of text in each string control. The Bools are used as a quick indicator that at that line point there is a difference
between the two string controls.
There is a slider that allows the user to scroll up and down, the slider scrolls both string controls simutaneously.
As the string controls are scrolled I will be comparing the left and right lines of text and reflecting the match status in the Bool Colum.
The reason I need to know the length of the line of text is so each line can be compared against one another. It is not as simple as counting the
col width of the string control and parsing the text because if there is a line return the text will word wrap before before it extends all the way accross the string control, which will cause parsing discrepencies.
Any suggestions on obtaining the multi line string control text character length would be much appreciated.
Best Regards
Tim C.
1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!Front panel of widget....
1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
Attachments:
One.vi 27 KB -
Column Length Semantics and Table Columns - NLS_LENGTH_SEMANTICS
Is NLS_LENGTH_SEMANTICS defined in oracle 10g?
if not what is its equivalent.
Please let me know about this.$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 22 23:30:14 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SYS@db102 SQL> select * from nls_database_parameters
2 where parameter = 'NLS_LENGTH_SEMANTICS';
PARAMETER VALUE
NLS_LENGTH_SEMANTICS BYTE
SYS@db102 SQL> -
How to hide columns that are getting added dynamically to UI Element 'Table
In SRM 7.0 while displaying a RFx, click on "responses and awards" button.
In the response comparision tab once the user selects response number and clicks on "compare all responses".
Item details table is displayed with fields item number,internal number,item description,........,Price etc.
Requirement is to hide the price column from the table.
The UI element type is 'Table'.
But the catch is there is no column price visible at layout design level.
This field is getting added dynamically at run time.
When i right click and see the 'more field help' at the front end i get the field id as 'GRP_1_COL_3_TXTV'.
lo_table ?= view->get_element( id = 'ITEMS_TABLE' ).
lo_column = lo_table->get_column( id = 'GRP_1_COL_3_TXTV').
ASSERT lo_column IS NOT INITIAL.
lo_column->set_visible( EXPORTING value = '01' ).
I had written the above code in the pre-exit of WDDOMODIFYVIEW.
But i am getting dump as assertion failed.it says no column by name 'GRP_1_COL_3_TXTV'.
Please help me inhow to hide fields or buttons getting generated dynmically.
Regards,
Venkat Raghavan.Hi Anitha,
What i understood from your question is,you want to control the table from your inputs.I have a one question for you what do you want to show defaultly i.e when you run the application what you want to show,either no table or table with some values.
Any how i am giving solution in this way.
If both inputs are given proper table output is displayed
Write your below logic in the WDDOMODIFYVIEW )
Here i am assuming that you already have a table element in the view.
Get the values entered in the input fields and compare those 2 values ,if the condition is satisfied then bind the values which you want to show in the table to the context node.
but if only 1 input is given a column is empty in the output table so i want to hide this column dynamically at runtime based on my inputs
You are telling that you know the empty column.If so get the view element reference and use the REMOVE_COLUMN to remove the column.
data:lr_table type ref to cl_wd_table,
lr_column type ref to L_WD_TABLE_COLUMN.
lr_table ?= view->get_element( 'TABLE1' ).
CALL METHOD LR_TABLE->REMOVE_COLUMN
EXPORTING
ID = 'TABLE1_color'
INDEX =
RECEIVING
THE_COLUMN = lr_column.
i want to hide some empty rows also at runtime based on inputs.
Removing the rows is very simple.if you know the key fields data of internal table from your input fields then do in this way.
delete itab from wa where key1= "12" and key2="abd".
Now bind the internal table to context node.
LO_ND_hcm->BIND_TABLE(
NEW_ITEMS = it_final
SET_INITIAL_ELEMENTS = ABAP_TRUE ). -
How to Determine the levels of a cube in SQL
Hi i know to determine the no of cubes we could use
select * from all_cubes
and its dimensions we use
select * from All_cube_dimensions
how do we determine the levels of a dimension??I speak better French. So you can translate with google.
L'astuce que j'utilise est la suivante :
1 - Extraire les données, un select
2 - Enregistrer les données dans un fichiers txt ou csv
3 - ouvrir le fichier avec excel
4 - créer une colonne à gauche de la colonne contenant les données et écrire INSERT INTO TABLE VALUES (
5 - dans la colonne de droite écrire *)*
6 - enregistrer et tu as ton script pour transférer les données dans une autre BD.
Bonne chance.
Maybe you are looking for
-
How to properly create and configure SharePoint 2013 Search service with PowerShell?
Hello Forum, I have installed SharePoint 2013 across three tier servers: WFE Server (Of course, SharePoint is installed here. Bsically this is just a Web server) APP Server (Of course, SharePoint is installed here + Central Admin + Service Apps). S
-
I have a back up of the folder 'iTunes Media' on a Nas (LaCie CloudBox). I do a weekly update. Everything is cool. Now I would love to keep the iTunes Mediafolder on the Nas and delete the one on my internal HD. What kind of trouble I may run into?
-
Hi all, I'm at the end of my resources (and those are very limited when speaking of character sets). Specifically, I'm having trouble with unicode character 2628 (http://www.fileformat.info/info/unicode/char/2628/index.htm) The SOAPMessage response I
-
IfsSession.disconnect( ) is throwin an exception. why
ifsSession.disconnect() is throwin the following exception.. what's the reason for this?? Exception in thread "main" org.omg.CORBA.BAD_OPERATION: The delegate has not been set! minor code: 0 completed: No at org.omg.CORBA.portable.ObjectImpl._get_del
-
Table maintenance inserted records @ translation possibility
Hi, I have created a table maintenance generator for a Z table and created a transactionfor it. My requirement is that, for inserted records from transaction, should allow to include the translation possibility. I have check Table maintenance transa