How to Insert check box value into database column
Hi All,
I had checkbox group in a region which is using an LOV......and having 18 items in that lov.
i.e. Total 18 checkboxes in Total. User has to select only 2 checkboxes from that 18.
I created two columns for storing two values of checkboxes. How to insert two selectives in two columns.........Moreover, How to give the query i.e. how to know which values are selected.
Please Help me in achieving this. apart from the two columns (Focus1,Focus2) .......One more column(l_spo_val) is there which is a foreign key.
My Insert Statement is like this:
INSERT INTO SPO_RESEARCH_FOCUS VALUES(l_spo_val
,:P4_RESEARCH_LIST_1
,:P4_RESEARCH_LIST_2);
Please narrate the code if possible.
Thanks,
Sekhar.
Hi Denes,
I saw the example in your workspace and it is the same what exactly i want and instead of storing in one column i want to store the two selected values into two different columns. Also i need to restrict the selection of checkboxes upto 2 only. So If the user tries to select the third check box it doesnt have to accept.
Even I am ready to change my table as according to your example i.e. creating only one column. Store the values of selection into that column.
I was unable to see how u wrote the logic (Code) for your example in your workspace. It helps alot if you provide me the code for that example(Multi Checkbox One Column).
I was facinated after watching your examples in your workspace and am very much interested to know more about Apex.
Please help me insolving this as it is long pending issue for my requirement.
Thanks a lot again,
Sekhar.
Edited by: Sekhar Nooney on Mar 26, 2009 4:35 AM
Similar Messages
-
How to insert check box value in table?
Hi all
kindly help me how to insert check box value in database. what code i have to use as i am new in programing.
thanx in advanceHi,
There is no "Check box" in a table, a check box is a GUI (Graphical user interface) item.
What you want is to store a boolean value in a table. For that you can use the varchar2(1) datatype and store Y or N. (or anything else)
(you cannot define boolean as a datatype for a column).
If you're using a front-end application like apex then it might be useful for you to read the documentation about chekc boxes :
http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/check_box.htm#CHDDFBFH
(for the rest if it's Oracle Forms then everything is already said).
Edited by: user11268895 on Aug 17, 2010 10:44 AM -
How to insert an upper value into a column?
Hi!,
I need to insert an upper value into a column.
The data is on a flat file and it could be lowercase or uppercase?
Do I have to create a trigger to solve this problem?
How could the trigger be?
Thanks,
AlexIf you are using SQL*Loader to load the data from flat file into the db table, then you can achieve inserting the UPPER Case of column value in your sqlloader ctl file itself as in below example
LOAD DATA
INFILE *
APPEND INTO TABLE XXX
( field1 position(1:7) char "UPPER(:field1)",
field2 position(8:15) char "UPPER(:field2)"
BEGINDATA
Phil Locke
Jason Durbin
So in this case the Names Phil Locke and Jason Durbin will be inserted as PHIL LOCKE and JASON DURBIN into the target table.
Regards,
Murali Mohan -
How to insert check box fields in a htmlb: tableview
Hi,
Can anybody tell me how to insert check box fields in a htmlb: tableview in a sequence of rows in a table view. How to generate the sequence no for the checkbox inorder to know the row that is checked.
Thanks in advance,
Aruna.Here is the code which has the custom "Checkbox" in the tableview & Triggers the event. <b>You can identify the checkbox based on cell ID (p_cell_id)</b> in the method "IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START" & Based on the event name + Cell ID. Look at the code & let me know if you any issue.
<b>Layout:</b>
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content id = "content"
design = "design2002+design2003"
controlRendering = "SAP"
rtlAutoSwitch = "true"
forceEncode = "ENABLED" >
<htmlb:page title="Test " >
<htmlb:form>
<%
data TV_ITERATOR Type Ref To zcl_itr.
data iterator type ref to IF_HTMLB_TABLEVIEW_ITERATOR.
create object tv_iterator exporting appl_cons = application.
iterator = tv_iterator.
%>
<htmlb:tableView id = "fligts"
headerText = "Flight"
width = "100"
headerVisible = "true"
design = "alternating"
visibleRowCount = "10"
fillUpEmptyRows = "true"
showNoMatchText = "true"
filter = "server"
sort = "server"
onHeaderClick = "MyEventHeaderClick"
table = "<%= APPLICATION->itab %>"
iterator = "<%= ITERATOR %>" />
</htmlb:form>
</htmlb:page>
</htmlb:content>
<b>Event Handling:</b>
DATA: EVENT_ID1 TYPE REF TO IF_HTMLB_DATA.
EVENT_ID1 = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
CASE EVENT_ID1->EVENT_SERVER_NAME.
IF NOT event_id1 IS INITIAL.
if event_id1->server_event+0(9) = 'chkevent'.
SPLIT event_id1->server_event AT '-' INTO v_event v_dummy v_row v_col.
endif.
endif.
method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.
CLEAR p_column_definitions.
CLEAR p_overwrites.
DATA: tv_column TYPE TABLEVIEWCONTROL.
tv_column-COLUMNNAME = 'FLDATE'.
tv_column-edit = 'X'.
tv_column-sort = 'X'.
tv_column-TITLE = 'Flight Date'.
tv_column-WIDTH = '100'.
APPEND tv_column TO p_column_definitions.
CLEAR tv_column.
tv_column-edit = 'X'.
tv_column-COLUMNNAME = 'CONNID'.
tv_column-TITLE = 'Conn.ID'.
tv_column-WIDTH = '70'.
tv_column-HORIZONTALALIGNMENT = 'center'.
APPEND tv_column TO p_column_definitions.
CLEAR tv_column.
tv_column-edit = 'X'.
tv_column-COLUMNNAME = 'CHECKBOX1'.
tv_column-TITLE = 'Check Box'.
tv_column-WIDTH = '30'.
tv_column-HORIZONTALALIGNMENT = 'center'.
APPEND tv_column TO p_column_definitions.
endmethod.
METHOD IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
DATA: L_EVENT TYPE STRING.
CASE P_TABLEVIEW_ID.
WHEN 'fligts'.
CASE P_COLUMN_KEY.
WHEN 'CHECKBOX1'.
* CONCATENATE 'chk_event' '123' '2323' INTO L_EVENT SEPARATED BY '-' .
CONCATENATE 'chkevent' p_cell_id INTO l_event SEPARATED BY '-'.
P_REPLACEMENT_BEE = CL_HTMLB_CHECKBOX=>FACTORY( ID = P_CELL_ID
ONCLICK = L_EVENT CHECKED = 'false' ).
ENDCASE.
ENDCASE.
ENDMETHOD.
Hope this will solve your problem.
<b><i>* Reward each helpful answer.</i></b>
Raja T
Message was edited by:
Raja T -
How to insert check box in pages?
This may be a dumb question, but how to insert check box in Pages? Thanks
Hi ...
Try this thread > Checkboxes in Pages?: Apple Support Communities -
How to insert a default value into MS server in java - help please
hi
suppose if i have a table and one of the column has a default value when the table was created. how can i insert the default value into this column? assuming that the column is the second column and i can't specify the column name when inserting. thanks.thanks for ur response, so if i have insert statement as follow
insert into someTable values (1,'val1', 'val2', 'val3', 'val4')
and column 3 has default value = DEFAULT
then, to insert default value, my insert statement will look like this
insert into someTable values (1,'val1', 'val3', 'val4')
but the number of values will not match the number of columns. -
Combo box in JavaScript and store the combo box values into database
i am a developer, i have a task ie.. i have combo box in JavaScript and i have to store the combo box values into database through JavaServerPage..
i please every one to have a look on this and please reply soon....dear sir,
your suggestions are really greater the god.............
i have applied as you said , now i am the page as updated and also i nform you that its multi select ....
i will show the codings , then u will get a clear identification
<script language= "JavaScript">
<!--
function one2two() {
m1len = m1.length ;
for ( i=0; i<m1len ; i++){
if (m1.options.selected == true ) {
m2len = m2.length;
m2.options[m2len]= new Option(m1.options[i].text);
for ( i = (m1len -1); i>=0; i--){
if (m1.options[i].selected == true ) {
m1.options[i] = null;
function two2one() {
m2len = m2.length ;
for ( i=0; i<m2len ; i++){
if (m2.options[i].selected == true ) {
m1len = m1.length;
m1.options[m1len]= new Option(m2.options[i].text);
for ( i=(m2len-1); i>=0; i--) {
if (m2.options[i].selected == true ) {
m2.options[i] = null;
//-->
</script>
<form method="POST" name="theForm" action="update.jsp">
<table bgcolor="white" border="1" cellpadding="5" cellspacing="2" align="center">
<tr><td align="center">
<select id=menu1 size=10 multiple>
<option>javascript</option>
<option>php</option>
<option>Zeo</option>
<option>asp</option>
<option>jsp</option>
<option>ajax</option>
<option>struts</option>
</select>
<p align="center"><input type="button" onClick="one2two()" value=" >> "></p>
</td><td align="center">
Languages you know:<BR>
<SELECT NAME="language" multiple>
<OPTION VALUE="c">C
<OPTION VALUE="c++">C++
</SELECT>
<p align="center"><input type="button" onClick="two2one()" value=" << " ></p>
</td></tr></table>
<center><input type="submit" value="update"></center>
</form>
<h4><u>Back<h4>
<script language= "JavaScript">
var m1 = document.theForm.menu1;
var m2 = document.theForm.language;
</script>
</body>
</html> -
How to insert Google geocoded values in database
Hi
I have tried Google map integration with apex , it is wonderful.
Can I have some tips on how can I insret the same geocoded values in my database for the infrastructure and mesh the infra with google map.
Please help
PrashantHi,
how to insert and update values in mysql database in c++ from"mysql.h"
Please see some thread with some samples:
http://www.cplusplus.com/forum/general/118160/
I suggest you ask this issue to MySQL forum since you are using it.
http://forums.mysql.com/
Best regards,
Shu
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to Save the multiple selection check box values into the database
i have the multiple selection check box implemented in UI through drop down list,i can choose the desired values from the drop down through checkbox, but i m unable to store these values and commit the values into the database all at a time.
You can access the values using listbinding and can then store them as a string by using a delimiter.
-
Capturing check box value into internal table
Hi all,
I am displaying the output including check box through following internal table.
The checkbox is displayed before every record.
<b>LOOP AT it_qals.
WRITE:/ it_qals-t_val AS CHECKBOX,
5 it_qals-werk,
12 it_qals-prueflos,
30 it_qals-matnr,
50 it_qals-charg,
62 it_qals-lagortchrg.
hide: it_qals .
ENDLOOP.</b>
I selected some of the records through check the checkboxes. when i click the <b>PUSHBUTTON TRANSFER</b>, those selected records only should transfer. i don't know how to modify the internal table with latest checkbox values. Initially checkbox values are blank.
Is there any solution except Function Module.
i would appreciate an earlier reply.
Regards
PrabhuHello,
Create one more table and transfer your entries into new table.
I have attached my code for you.
Regards,
Naimesh
REPORT ZTEST_NP NO STANDARD PAGE HEADING.
TABLES: MARA, MAKT.
DATA: BEGIN OF IT_MARA OCCURS 0,
MATNR LIKE MARA-MATNR,
MAKTX LIKE MAKT-MAKTX,
SEL,
END OF IT_MARA.
DATA: IT_MARA1 LIKE IT_MARA OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
SET PF-STATUS 'ZTEST'.
PERFORM GET_DATA.
PERFORM WRITE_DATA.
TOP-OF-PAGE.
PERFORM HEADER.
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'SELECT'.
PERFORM GET_DATA_SELECTED.
PERFORM WRITE_DATA_SELE.
WHEN 'SELALL'.
PERFORM SELECT_ALL.
SY-LSIND = 0.
PERFORM HEADER.
PERFORM WRITE_DATA.
WHEN 'DESEL'.
PERFORM DESELECT_ALL.
SY-LSIND = 0.
PERFORM HEADER.
PERFORM WRITE_DATA.
ENDCASE.
*& Form GET_DATA
FORM GET_DATA.
SELECT MATNR
INTO TABLE IT_MARA
FROM MARA
WHERE MATNR LIKE 'IN10020%'.
LOOP AT IT_MARA.
SELECT SINGLE MAKTX
INTO IT_MARA-MAKTX
FROM MAKT
WHERE MATNR = IT_MARA-MATNR
AND SPRAS = SY-LANGU.
MODIFY IT_MARA.
CLEAR IT_MARA.
ENDLOOP.
ENDFORM. " GET_DATA
*& Form WRITE_DATA
FORM WRITE_DATA.
ULINE /(50).
LOOP AT IT_MARA.
WRITE: / '|' NO-GAP, IT_MARA-SEL AS CHECKBOX NO-GAP,
'|' NO-GAP, (10) IT_MARA-MATNR NO-GAP,
'|' NO-GAP, (35) IT_MARA-MAKTX NO-GAP,
'|' NO-GAP.
ENDLOOP.
ULINE /(50).
ENDFORM. " WRITE_DATA
*& Form HEADER
FORM HEADER.
ULINE /(50).
WRITE: / '|' NO-GAP, (1) ' ' NO-GAP,
'|' NO-GAP, (10) 'Material' NO-GAP,
'|' NO-GAP, (35) 'Description' NO-GAP,
'|' NO-GAP.
ENDFORM. " HEADER
*& Form GET_DATA_SELECTED
FORM GET_DATA_SELECTED.
DATA: L_CNT TYPE I.
DO.
L_CNT = L_CNT + 1.
READ LINE L_CNT FIELD VALUE IT_MARA-MATNR INTO IT_MARA1-MATNR
IT_MARA-MAKTX INTO IT_MARA1-MAKTX
IT_MARA-SEL INTO IT_MARA1-SEL.
IF SY-SUBRC = 0.
IF IT_MARA1-SEL = 'X'.
APPEND IT_MARA1.
CLEAR IT_MARA1.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDDO.
ENDFORM. " GET_DATA_SELECTED
*& Form WRITE_DATA_SELE
FORM WRITE_DATA_SELE.
PERFORM HEADER.
ULINE /(50).
LOOP AT IT_MARA1.
WRITE: / '|' NO-GAP, IT_MARA1-SEL AS CHECKBOX,
'|' NO-GAP, (10) IT_MARA1-MATNR NO-GAP,
'|' NO-GAP, (35) IT_MARA1-MAKTX NO-GAP,
'|' NO-GAP.
ENDLOOP.
ULINE /(50).
ENDFORM. " WRITE_DATA_SELE
*& Form SELECT_ALL
FORM SELECT_ALL.
LOOP AT IT_MARA.
IT_MARA-SEL = 'X'.
MODIFY IT_MARA.
CLEAR IT_MARA.
ENDLOOP.
ENDFORM. " SELECT_ALL
*& Form DESELECT_ALL
FORM DESELECT_ALL.
LOOP AT IT_MARA.
IT_MARA-SEL = ' '.
MODIFY IT_MARA.
CLEAR IT_MARA.
ENDLOOP.
ENDFORM. " DESELECT_ALL -
How to filter check box values in WAD.
Hi Gurus,
In my WAD i am having check box and the object name is defined as 0SEM_CGCOMP, it is a master data info object and having values like CG1,CG2,CG3....CG10. But i want to restrict the values to CG1,CG2,CG3,CG4 only. how can i filter the values?
</object>
</td>
<td class="SAPBEXHLevel2"><object>
<param name="OWNER" value="SAP_BW"/>
<param name="CMD" value="GET_ITEM"/>
<param name="NAME" value="CKBOX_CONS"/>
<param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER_CHECBOX"/>
<param name="DATA_PROVIDER" value="DP_1"/>
<param name="GENERATE_CAPTION" value=""/>
<param name="BORDER_STYLE" value="NO_BORDER"/>
<param name="WIDTH" value="240"/>
<param name="GENERATE_LINKS" value=""/>
<param name="IOBJNM" value="0SEM_CGCOMP"/>
<param name="SHOW_LABEL" value=""/>
<param name="TARGET_DATA_PROVIDER_1" value="DP_1"/>
<param name="HORIZONTAL_NUMBER" value="5"/>
ITEM: CKBOX_CONS
</object></td>
Thanks
Raju.kHi Raju,
Try this. Create another dataprovider within your web template? This new dataprovider refers to a similar query, but this query definition should restrict values CG1, CG2, CG3 and CG4. Assign this dataprovider to your checkbox. Then make sure the properties of the checkbox affect all other dataproviders.
Also, if this list is static, you could create an HTML checkbox object coding the options (cg1, cg2, cg3, and cg4) programmatically. Then add javascript code to produce the proper filtering based on the users' selections.
Let me know what happens.
Larry -
Hi All,
In my application there are using a check box item..what they have done is under
source used: Alaways,replcaing existing value in session state.
Source type: sql query
Now the problem is when ever they is a record in backend it is not showing selected in check list..
But when i have tried to change Source used from Alawys to Only when then in that case i am able to see tick mark under that check box..
But when no data exists even though the tick mark still exists...
How do we handle such scenerio's..
Thanks,
Anoo..we don't even know the context you're in, you must give more informations about what you exactly want to do
if you're using java servlets, it goes like that:
first page (servlet) must contain:
<form action=nextPage.html method=get>
<input type=checkbox name=toto>
</form>
second page (servlet) must contain:
req.getParameter("toto");
(req being the HttpServletRequest of the first servlet)
that will give you the state of the box
Message was edited by:
calvino_ind -
How to insert files or images into database using mysql
i need one example how to store files and retrive from database
give me examples on storing and retriving foles or imageshttp://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/htdocs/templates.htm#LOBS
-
Need help on inserting multiple selection values into database
Hello every body,
we are developing one small web application in that we have requirement like department is an combobox, services in multiple selection list box, suppose when i select IT as department & some services in multiple listbox on clicking map button selected services should be map with that department .Could u plz help me how i have to do..?
Thanks & Regards,
Anil.anilmekala.reddy wrote:
Hello every body,
we are developing one small web application in that we have requirement like department is an combobox, services in multiple selection list box, suppose when i select IT as department & some services in multiple listbox on clicking map button selected services should be map with that department .Could u plz help me how i have to do..?
Thanks & Regards,
Anil.if you give more details .... do you know how to use jdbc ??? prepared statement ???
any way if I have understood your question
I will suppose that you have 3 tables Department ,service and Has_service
and I supose that you have already the entry in table department and service
Here is what I would do ...
while(I have something to insert )
insert into Has_service values (department,service )
} -
How to insert large xml data into database tables.
Hi all,
iam new to xml. i want to insert data in xml file to my database tables.but the xml file size is very large. performance is also one of the issue. can anybody please tell me the procedure to take xml file from the server and insert into my database tables.
Thanks in advanceUnfortunately posting very generic questions like this in the forum tends not to be very productive for you, me or the other people who read the forum. It really helps everyone if you take a little time to review existing posts and their answers before starting new threads which replicate subjects that have already been discussed extensively in previous threads. This allows you to ask more sensible questions (eg, I'm using this approach and encountering this problem) rather than extremely generic questions that you can answer yourself by spending a little time reviewing existings posts or using the forum's search feature.
Also in future your might want to try being a little more specific before posting questions
Eg Define "very large". I know of customers who thing very large is 100K, and customers who think 4G is medium. I cannot tell from your post what size your files are.
What is the content of the file. Is it going to be loaded into a single record, or a a single table, or will it need to be loaded into multiple records in a single table or multiple records in multiple tables ?
Do you really need to load the data into exsiting relational tables or could your application work with relational views of the XML Content.
Finally which release of the database are you working with.
Define performance. Is it reasonable to expect to process this kind of document on this machine (Make, memory, #number of CPUs, CPU Speed, number of discs) in this period of time.
WRT to your original question. If you take a few minutes to search this forum you will find a very large number of threads with very similar titles to yours. These theads document a number of different approaches that can be used to solve this problem.
I suggest you start by looking for threads that cover topics like DBMS_XMLSTORE, XMLTable(), Relational Views of XML content, loading XML content in relational tables.
Maybe you are looking for
-
Error While Loading Data from ODS to ODS
Hi Experts, When i'm loading the data from ods to further ods, i'm facing an error while activating the data saying that 0ref_doc_no consists of invalid characters.Also it is saying that Error when assigning SID. I'm unable to s
-
Hello folks... I have a big doubt.. I have a problem.. I have a lot of data having to be shown in my application.... something like 6000 per 200... and each data... like ..the data in the column 200 and line 20 have to respond mouse events... I have
-
No transparency in my Quicktime movies in AE CS3 -- help
I'm rendering a set of animated captions on a transparent background. I need to drop them over existing video, so I need to maintain their transparency. I am, rendering them as QT movies, as animation, RGB+Alpha, millions + colors, straight: Unmultip
-
SAP Bank Communication Manager without PI
Hello! We are currently implementing and configuring SAP BCM in our system and we are starting to reach the point where messages are being sent from BCM to bank. Every single piece of documentation we've been able to find points to the necessity of P
-
Patch failed ( ATG rollup 5)
hai, i am applying rollup 5 patch. after some time i got error FAILED: file jtfpfrepgrants.sql on worker 1 for product jtf username JTF. Deferred: file jtfpfrepgrants.sql on worker 1 for product jtf username JTF. (Deferment number 2 for this job) Ass