Radio button in a Table -Only one row/radio button selection to be possible
Hi experts,
I have a requirement from customer to have a radio button inside a table of a WebDynpro ABAP application. For example, a table containing list of mobile numbers.
The columns has
Mobile Model, Cost, Company name, and a radio button named choice.
Only one record and hence one radio button can be chosen at a given time.
When the user clicks on the radio button choice corresponding to the row of the mobile of his choice, the row should get lead selected .
When the user chooses a different choice radio button (corresponding to another mobile) the old radio button choice should get deselected, new row and its radio button should be lead selected.
Can you give me the code how to deselect the remaining radio buttons when a user selects on one Radio button
Hi Sandeep ,
Have a look at the events of table UI element and its paramaters , Here's the link.
[Link|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/2d/390e422dfcde2ce10000000a1550b0/content.htm]
The event 'Onselect' or 'OnLeadSelect' provides 4 standard paramaters , out of which , OLD_LEAD_SELECTION/OLD_ROW_ELEMENT is one of them.
So you could use this element and set the attribute value (Which is bound to the radio button) to abap_false.
Although I am not sure as to which event ight trigger ( ON_LEAD_SELECT / ON_SELECT ).:)
Thanks,
Aditya.
Similar Messages
-
SQL-display two rows in a table as one row in the select query
Hi guys
Sorry if this sounds a little odd.
I have two tables
Im sorry but i tried to format these tables in text to make them look like tables but this text processor deletes space based formatting.
States
state id | Name
1 | california
2 | New york
3 | New hampshire
.......so on
Grades
Gradeid | State id | Language | Avgscore |
1 | 1 | ENG | 67 |
2 | 1 | FRENCH | 76 |
2 | 2 | SPANISH | 34 |
Now i wanna write an sql query thats gonna display like
State Name | State id | English | French | SPANISH|
California | 1 | 67 | 76 | null
New York | 2 | null | null | 34
I know how to get just an sql query where i can say
SELECT A.id, A.Name, G.Language,G.Avgscore
FROM States A , Grades G
where A.state_id = G.state_id
and G.Language = 'English'
How do i accomplish this?
Thanks
J
Edited by: user7348303 on Apr 1, 2010 1:15 PMRegarding:
Im sorry but i tried to format these tables in text to make them look like tables but this text processor deletes space based formatting.Use this tag: {noformat}{noformat}
before and after your example, so formatting will be maintained when posting your example.
Example, when you type:
{noformat}select * from dual;
{noformat}
it will appear as:select * from dual;
when you post it on the forum. -
Select event not triggered in table with only one row
Hi all,
I am building a BI VC application where query data is displayed in a table. When the user clicks on a table row another query is then triggered and output in a second table. The output from table 1 is linked to the input of query2/table2 with a select event.
The problem that I am facing is that if there is only one row in table 1, the select event is never triggered. If, however there are two or more rows in the table the select event is triggered and query 2 is executed. I have searched the forums but all I could find on select event problems was how to avoid the initial select event.
Has anyone else experienced this issue and what is the workaround or is this a bug in Visual Composer? We are on VC 7.0 SP19.
Cheers,
Astein MelandThanks Chittya,
Yes we have considered this option as well. But as we have more than one table linked together we would like to avoid having to manually click several buttons.
In the end I found Note 1364334 describing bugfixes released in VC 7.0 SP20:
"Normally, when a Visual Composer table is populated from a data service, the first row is selected by default. However, we have found that if only one data row is returned from the data service, this row is not selected by default and cannot be manually selected by clicking on it either."
So I think we will just have to upgrade our Portal to the latest support packs to solve this problem.
Thanks,
Astein -
Issue with Selection Listener when the table has only one row
Hi All ,
I have developed a table in which I am using Selection Listener to perform some task when any row is selected.
It is working fine when I have more than 1 row in the table, but when I have only one row in the table , the selection listener do not call the corresponding method in bean.
I understand that selection event will be raised only when the row is changed, but in the use case when only one row is there, what should be done to make the selection listener work ?
In the selection listener I have written code to make the selected row as current row , and perform the required task.
Please suggest a way out for this situation.
Thanks in advance.Hi,
try removing this attr from table
selectedRowKeys="#{bindings.xxx_VO1.collectionModel.selectedRow}" -
SQL Server 2012 Undetected Deadlock in a table with only one row
We have migrated our SQL 2000 Enterprise Database to SQL 2012 Enterprise few days ago.
This is our main database, so most of the applications access it.
The day after the migration, when users started to run tasks, the database access started to experiment a total failure.
That is, all processes in the SQL 2k12 database were in lock with each other. This is a commom case of deadlock, but the Database Engine was unable to detect it.
After some research, we found that the applications were trying to access a very simple table with only one row. This table has a number that is restarted every day and is used to number all the transactions made against the system. So, client
applications start a new transaction, get the current number, increment it by one and commit the transaction.
The only solution we found was to kill all user processes in SQL Server every time this situation occurs (no more than 5 minutes when all clients are accessing the database).
No client application was changed in this migration and this process was working very well for the last 10 years.
The problem is that SQL 2k12 is unable to handle this situation compared to SQL 2k.
It seems to occurs with other tables too, but as this is an "entry table" the problem occurs with it first.
I have searched internet and some suggest some workarounds like using table hints to completely lock the table at the begining of the transaction, but it can't be used to other tables.
Does anyone have heard this to be a problem with SQL 2k12? Is there any fixes to make SQL 2k12 as good as SQL 2k?First off re: "Unfortunatelly, this can't be used in production environment as exclusive table lock would serialize the accesses to tables and there will be other tables that will suffer with this problem."
This is incorrect.
Using a table to generate sequence numbers like this is a bad idea exactly because the access must be serialized. Since you can't switch to a SEQUENCE object, which is the correct solution, the _entire goal_ of this exercise to find a way to properly
serialize access to this table. Using exclusive locking will not be necessary for all the tables; just for the single-row table used for generating sequence values with a cursor.
I converted the sample program to VB.NET:
Public Class Form1
Private mbCancel As Boolean = False
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim soConn As ADODB.Connection
Dim soRst As ADODB.Recordset
Dim sdData As Date
Dim slValue As Long
Dim slDelay As Long
'create database vbtest
'go
' CREATE TABLE [dbo].[ControlNumTest](
' [UltData] [datetime] NOT NULL,
' [UltNum] [int] NOT NULL,
' CONSTRAINT [PK_CorreioNumTeste] PRIMARY KEY CLUSTERED
' [UltData] Asc
' )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
' ) ON [PRIMARY]
mbCancel = False
Do
' Configure the Connection object
soConn = New ADODB.Connection
With soConn
.ConnectionString = "Provider=SQLNCLI11;Initial Catalog=vbtest;Data Source=localhost;trusted_connection=yes"
.IsolationLevel = ADODB.IsolationLevelEnum.adXactCursorStability
.Mode = ADODB.ConnectModeEnum.adModeReadWrite
.CursorLocation = ADODB.CursorLocationEnum.adUseServer
.Open()
End With
' Start a new transaction
Call soConn.BeginTrans()
' Configure the RecordSet object
soRst = New ADODB.Recordset
With soRst
.ActiveConnection = soConn
.CursorLocation = ADODB.CursorLocationEnum.adUseServer
.CursorType = ADODB.CursorTypeEnum.adOpenForwardOnly
.LockType = ADODB.LockTypeEnum.adLockPessimistic
.Open("SELECT * FROM dbo.ControlNumTest")
End With
With soRst
sdData = .Fields!UltData.Value ' Read the last Date (LOCK INFO 1: See comments bello
slValue = .Fields!UltNum.Value ' Read the last Number
If sdData <> Date.Now.Date Then ' Date has changed?
sdData = Date.Now.Date
slValue = 1 ' Restart number
End If
.Fields!UltData.Value = sdData ' Update data
.Fields!UltNum.Value = slValue + 1 ' Next number
End With
Call soRst.Update()
Call soRst.Close()
' Ends the transaction
Call soConn.CommitTrans()
Call soConn.Close()
soRst = Nothing
soConn = Nothing
txtUltNum.Text = slValue + 1 ' Display the last number
Application.DoEvents()
slDelay = Int(((Rnd * 250) + 100) / 100) * 100
System.Threading.Thread.Sleep(slDelay)
Loop While mbCancel = False
If mbCancel = True Then
Call MsgBox("The test was canceled")
End If
Exit Sub
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
mbCancel = True
End Sub
End Class
And created the table
CREATE TABLE [dbo].[ControlNumTest](
[UltData] [datetime] NOT NULL,
[UltNum] [int] NOT NULL,
CONSTRAINT [PK_CorreioNumTeste] PRIMARY KEY CLUSTERED
[UltData] Asc
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = on, FILLFACTOR = 80) ON [PRIMARY]
) ON [PRIMARY]
go insert into ControlNumTest values (cast(getdate()as date),1)
Then ran 3 copies of the program and generated the deadlock:
<deadlock>
<victim-list>
<victimProcess id="processf27b1498" />
</victim-list>
<process-list>
<process id="processf27b1498" taskpriority="0" logused="0" waitresource="KEY: 35:72057594039042048 (a01df6b954ad)" waittime="1970" ownerId="3181" transactionname="implicit_transaction" lasttranstarted="2014-02-14T15:49:31.263" XDES="0xf04da3a8" lockMode="X" schedulerid="4" kpid="9700" status="suspended" spid="51" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2014-02-14T15:49:31.267" lastbatchcompleted="2014-02-14T15:49:31.267" lastattention="1900-01-01T00:00:00.267" clientapp="vbt" hostname="DBROWNE2" hostpid="21152" loginname="NORTHAMERICA\dbrowne" isolationlevel="read committed (2)" xactid="3181" currentdb="35" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058">
<executionStack>
<frame procname="adhoc" line="1" stmtstart="80" sqlhandle="0x020000008376181f3ad0ea908fe9d8593f2e3ced9882f5c90000000000000000000000000000000000000000">
UPDATE [dbo].[ControlNumTest] SET [UltData]=@Param000004,[UltNum]=@Param000005 </frame>
<frame procname="unknown" line="1" sqlhandle="0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000">
unknown </frame>
</executionStack>
<inputbuf>
(@Param000004 datetime,@Param000005 int)UPDATE [dbo].[ControlNumTest] SET [UltData]=@Param000004,[UltNum]=@Param000005 </inputbuf>
</process>
<process id="processf6ac9498" taskpriority="0" logused="10000" waitresource="KEY: 35:72057594039042048 (a01df6b954ad)" waittime="1971" schedulerid="5" kpid="30516" status="suspended" spid="55" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2014-02-14T15:49:31.267" lastbatchcompleted="2014-02-14T15:49:31.267" lastattention="1900-01-01T00:00:00.267" clientapp="vbt" hostname="DBROWNE2" hostpid="27852" loginname="NORTHAMERICA\dbrowne" isolationlevel="read committed (2)" xactid="3182" currentdb="35" lockTimeout="4294967295" clientoption1="671156256" clientoption2="128058">
<executionStack>
<frame procname="adhoc" line="1" sqlhandle="0x020000003c6309232ab0edbe0a7790a816a09c4c5ac6f43c0000000000000000000000000000000000000000">
FETCH API_CURSOR0000000000000001 </frame>
<frame procname="unknown" line="1" sqlhandle="0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000">
unknown </frame>
</executionStack>
<inputbuf>
FETCH API_CURSOR0000000000000001 </inputbuf>
</process>
</process-list>
<resource-list>
<keylock hobtid="72057594039042048" dbid="35" objectname="vbtest.dbo.ControlNumTest" indexname="PK_CorreioNumTeste" id="lockff6e6c80" mode="U" associatedObjectId="72057594039042048">
<owner-list>
<owner id="processf6ac9498" mode="S" />
<owner id="processf6ac9498" mode="U" requestType="wait" />
</owner-list>
<waiter-list>
<waiter id="processf27b1498" mode="X" requestType="convert" />
</waiter-list>
</keylock>
<keylock hobtid="72057594039042048" dbid="35" objectname="vbtest.dbo.ControlNumTest" indexname="PK_CorreioNumTeste" id="lockff6e6c80" mode="U" associatedObjectId="72057594039042048">
<owner-list>
<owner id="processf27b1498" mode="U" />
<owner id="processf27b1498" mode="U" />
<owner id="processf27b1498" mode="X" requestType="convert" />
</owner-list>
<waiter-list>
<waiter id="processf6ac9498" mode="U" requestType="wait" />
</waiter-list>
</keylock>
</resource-list>
</deadlock>
It's the S lock that comes from the cursor read that's the villian here. U locks are compatible with S locks, so one session gets a U lock and another gets an S lock. But then the session with an S needs a U, and the session with a U needs an
X. Deadlock.
I'm not sure what kind of locks were taken by this cursor code on SQL 2000, but on SQL 2012, this code is absolutely broken and should deadlock.
The right way to fix this code is to add (UPDLOCK,SERIALIZABLE) to the cursor
.Open("SELECT * FROM dbo.ControlNumTest with (updlock,serializable)")
So each session reads the table with a restrictive lock, and you don't mix S, U and X locks in this transaction. This resolves the deadlock, but requires a code change.
I tried several things that didn't require a code, which did not resolve the deadlock;
1) setting ALLOW_ROW_LOCKS=OFF ALLOW_PAGE_LOCKS=OFF
2) SERIALIZABLE isolation level
3) Switching OleDB providers from SQLOLEDB to SQLNCLI11
Then I replaced the table with a view containing a lock hint:
CREATE TABLE [dbo].[ControlNumTest_t](
[UltData] [datetime] NOT NULL,
[UltNum] [int] NOT NULL,
CONSTRAINT [PK_CorreioNumTeste] PRIMARY KEY CLUSTERED
[UltData] Asc
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = on, FILLFACTOR = 80) ON [PRIMARY]
) ON [PRIMARY]
go
create view ControlNumTest as
select * from ControlNumTest_t with (tablockx)
Which, at least in my limited testing, resovlved the deadlock without any client code change.
David
David http://blogs.msdn.com/b/dbrowne/ -
How to restrict only one row in Table ??.
Hi all,
i want to restrict no. of rows to one,
that is not more that one row should be there in the table.
Following trigger works well in all conditions
except:
insert into myTab select 'x' from emp;
inserts 14 rows.
Create or replace trigger one_row_myTab
before insert on myTab
for each row
declare
cnt number;
pragma AUTONOMOUS_TRANSACTION;
Begin
select count(*) into cnt from mydual;
if cnt=1 then
raise_application_error(-20001,'MyDual Can have only one Row');
end if;
end;
i think with trigger it w't be possible because,
same transaction triggers c't query the table (Mutating Table),
Autonomus trans ca't identify uncommited changes.
pls add your suggestions.
Thanks for Reading the Post.
Rajashekhar Ganga,
mail : [email protected]nice try Mulder ! it doesn't work everywhere...
SQL> connect scott/tiger@lsc69
Connected to:
Oracle7 Server Release 7.3.4.5.0 - Production
With the distributed and parallel query options
PL/SQL Release 2.3.4.5.0 - Production
SQL> create table d as select * from dual;
Table created.
SQL> create index i on d(1);
create index i on d(1)
ERROR at line 1:
ORA-00904: invalid column name
SQL> connect scott/tiger@lsc65
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.4.0 - 64bit Production
JServer Release 8.1.7.4.0 - 64bit Production
SQL> create table d as select * from dual;
Table created.
SQL> create index i on d(1);
Index created.
SQL> connect scott/tiger@lsc68
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - 64bit Production
With the Partitioning and Data Mining options
SQL> create table d as select * from dual
Table created.
SQL> CREATE UNIQUE INDEX i on d(1);
CREATE UNIQUE INDEX i on d(1)
ERROR at line 1:
ORA-03113: end-of-file on communication channel -
Only one row show in table with tablepopin
Hi,
I've a table with a tablecolum with a tablepopintogglecell, and a tablepopin.
I want that only one row show (when i press the togglelink if there is other row open, automatically close that row)Hi,
you should implement the on toggle event,
you will have the importing context_element, so you know which one is triggered,
form your node, get_elements().
loop over the table where ne to context_element, clear the popin attribute,
grtz,
Koen -
I can select only one row in my table why?
hi.. i have just started cold fusion. i am trying to connect
my database. its ok. but i can see only one row? why?
ff4.cfm =>
<cfquery name = "myFirstSelect" datasource="calisma">
select * from fuat1
</cfquery>
ff5.cfm =>
<cfinclude template="ff4.cfm">
<table>
<cfoutput query="myFirstSelect">
<tr height="20" onMouseOver="this.bgColor='#colorlist#';"
onMouseOut="this.bgColor='#colorrow#';" bgcolor="#colorrow#">
<td>AD</td>
<td>SOYAD</td>
<td>NUMBER</td>
</tr>
<tr height="20" onMouseOver="this.bgColor='#colorlist#';"
onMouseOut="this.bgColor='#colorrow#';" bgcolor="#colorrow#">
<td>#AD#</td>
<td>#SOYAD#</td>
<td>#NUMBER#</td>
</tr>
</table>
</cfoutput>
i can retrieve only one row. Cannot access the second row of
table. What can I do? What can I reach the second row?
thankxok i solve this problem thanx
-
One to many to return only one row
hi guys,
i have an urgent problem here. i have a sql statement like below;
SELECT ALM_SWAP2_REP.M_TP_RTMFRP0, ALM_SWAP2_REP.M_TP_RTMFRP1,
ALM_SWAP2_REP.M_TP_RTMFRF0, ALM_SWAP2_REP.M_TP_RTMFRF1,
To_Char(TRN_HDR_DBF.M_OPT_FLWFST,'YYYYMMDD') AS VALDATE, ALM_SWAP2_REP.M_TP_RTFXC02,
ALM_SWAP2_REP.M_TP_RTFXC12, TRN_HDR_DBF.M_BRW_NOMU1, TRN_HDR_DBF.M_BRW_NOMU2,
ALM_SWAP2_REP.M_TP_RTAMC02, ALM_SWAP2_REP.M_TP_RTAMC12,
(CASE WHEN PAY_FLOW_DBF.M_LEG = 0 AND '20100831' BETWEEN To_Char(PAY_FLOW_DBF.M_CALC_DATE0,'YYYYMMDD') AND To_Char(PAY_FLOW_DBF.M_CALC_DATE1,'YYYYMMDD') THEN To_Char(PAY_FLOW_DBF.M_CALC_DATE1,'YYYYMMDD') END) AS RCV_DATE,
(CASE WHEN PAY_FLOW_DBF.M_LEG = 1 AND '20100831' BETWEEN To_Char(PAY_FLOW_DBF.M_CALC_DATE0,'YYYYMMDD') AND To_Char(PAY_FLOW_DBF.M_CALC_DATE1,'YYYYMMDD') THEN To_Char(PAY_FLOW_DBF.M_CALC_DATE1,'YYYYMMDD') END) AS PAY_DATE
FROM ALM_SWAP2_REP, TRN_HDR_DBF, PAY_FLOW_DBF WHERE ALM_SWAP2_REP.M_REF_DATA = 456576
AND ALM_SWAP2_REP.M_NB = TRN_HDR_DBF.M_NB
AND ALM_SWAP2_REP.M_NB = PAY_FLOW_DBF.M_TRN_ID
AND ALM_SWAP2_REP.M_NB = 228128
AND '20100831' BETWEEN To_Char(PAY_FLOW_DBF.M_CALC_DATE0,'YYYYMMDD') AND To_Char(PAY_FLOW_DBF.M_CALC_DATE1,'YYYYMMDD')
ORDER BY ALM_SWAP2_REP.M_TRN_GRP, ALM_SWAP2_REP.M_NB
When I join few tables, the results are returned in two rows because I have two records that in table PAY_FLOW_DBF that matches one row in table ALM_SWAP2_REP. I need these two matches but I want it to be returned in only one row without using group by. Pls help me. Thanklsuser9274041 wrote:
i have an urgent problem here.http://www.oracle.com/html/terms.html
>
4. Use of Community Services
Community Services are provided as a convenience to users and Oracle is not obligated to provide any technical support for, or participate in, Community Services. While Community Services may include information regarding Oracle products and services, including information from Oracle employees, they are not an official customer support channel for Oracle.
You may use Community Services subject to the following: (a) Community Services may be used solely for your personal, informational, noncommercial purposes; (b) Content provided on or through Community Services may not be redistributed; and (c) personal data about other users may not be stored or collected except where expressly authorized by Oracle
>
Could you explain how something that is for your personal, informational, noncommercial purposes can be urgent?
Or is this a violation of the terms of use and abuse of these forums? -
Selecting only one row at a time
Hi experts,
i have following doubt regarding selecting rows from a db:
Is there any way of selecting only one row AT A TIME from a dabase just to collect the data in rows instead of in a unique document containing all the rows?
I would like you to ellaborate on this as i need to send only one row to the IE, and then other row, and so on... without throwing any error!
I have seen that there are SELECT SINGLE and SELECT UP TO 1 ROW, but these two methods are only useful when retrieving only one row, and that does not match my requirements. I need to process all the rows but one by one..
I know that we can use the receiver jdbc adapter as if it was a sender by means of its specific datatype, but how to do it row by row??
Hope i had explained well..
Thanks in advance and best regards,
DavidHi kiran,
Yes, my table has 5 not null fields but i am selecting and updating fixes values so i think that I will definetely go for the next solution:
SELECT * FROM t1 WHERE status='0' and ROWNUM<2;
UPDATE t1 SET status='1' WHERE status='0' and ROWNUM<2;
My only concern is if the update will take the same row that the select.... BTW, I think it will
..What do you guys think?
I ve been trying to operate with your proposed queries but i received some errors. Your queries are very interesting but i think that with the above ones i meet my requirements as the status field will be 0 for not processed rows and 1 for precessed ones (and the update will look for the row that meets the same 'where' clause than the select, and then, and only then, it will set status='1').
The only thing i have to care about is what i questioned before.
Thanks a lot and best regards,
David -
Oracle database link to MySQL select only one row
Hello,
I have created a connection from the Oracle batabase 11.2 to a MySQL database via database link. The following statement shows, that 35 rows are in the mySQL table:
SQL> select count(*) from "main_pages"@MOREWEB;
COUNT(*)
35
But a normal select statement only return 1 row.
SQL> select "subject" from "main_pages"@MOREWEB;
subject
Übersicht: Referenzen
I am using the mysql-connector-odbc-3.51.30-winx64 driver. A newer version cann't be installed because on Windows Server 2008 R2 I get an error with an missing dll-file. The DataDirect-ODBC-driver is not possible, because we like to use the free MySQL-database an DataDirect only support the enterprise edition.
I also have tried to limit the HS_OPEN_CURSORS or dont limit the HS_FDS_FETCH_ROWS, but there is no difference in the result. I always get only one row.
HS Init.ora
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC
# HS init parameters
HS_FDS_CONNECT_INFO = moreweb
HS_FDS_TRACE_LEVEL = ON
HS_FDS_FETCH_ROWS=1
# Environment variables required for the non-Oracle system
#set <envvar>=<value>
HS tracefile
Oracle Corporation --- MITTWOCH NOV 05 2014 13:56:22.066
Heterogeneous Agent Release
11.2.0.1.0
Oracle Corporation --- MITTWOCH NOV 05 2014 13:56:22.066
Version 11.2.0.1.0
HOSGIP for "HS_FDS_TRACE_LEVEL" returned "ON"
HOSGIP for "HS_OPEN_CURSORS" returned "50"
HOSGIP for "HS_FDS_FETCH_ROWS" returned "1"
HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "OFF"
HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
HOSGIP for "HS_FDS_TRANSACTION_LOG" returned "HS_TRANSACTION_LOG"
HOSGIP for "HS_FDS_TIMESTAMP_MAPPING" returned "DATE"
HOSGIP for "HS_FDS_DATE_MAPPING" returned "DATE"
HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
HOSGIP for "HS_FDS_RESULTSET_SUPPORT" returned "FALSE"
HOSGIP for "HS_FDS_RSET_RETURN_ROWCOUNT" returned "FALSE"
HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
using mpgw as default value for "HS_FDS_DEFAULT_OWNER"
HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
SQL text from hgopars, id=1, len=36 ...
00: 53454C45 43542043 4F554E54 282A2920 [SELECT COUNT(*) ]
10: 46524F4D 20606D61 696E5F70 61676573 [FROM `main_pages]
20: 60204131 [` A1]
Deferred open until first fetch.
Performing delayed open.
SQL text from hgopars, id=1, len=40 ...
00: 53454C45 43542041 312E6073 75626A65 [SELECT A1.`subje]
10: 63746020 46524F4D 20606D61 696E5F70 [ct` FROM `main_p]
20: 61676573 60204131 [ages` A1]
Deferred open until first fetch.
Performing delayed open.
Please can help me someone.
Thanks.
Biancamxallen wrote:
Bianca,
If you log directly into MySQL and issue the same query (select "subject" from "main_pages";) what data is returned?
I looks to me that you count is the number of rows in the entire table "main_pages"
while you select is for the data in the "subject" column only.
This seems to indicate that you have just one row in that subject column.
Regards,
Matt
WHAATT?
What do you mean by "just one row in that subject column"?
That makes no sense at all. A row is a row. A column is a part of a row. All rows have all columns, though not all columns of all rows will necessarily have an assigned value. Lacking a WHERE clause to filter rows, any SELECT should return all rows. -
How can only one Checkbox can be Selected in Table with Boolean CheckBoxes?
I have an editable ADF table where one of the attributes is a Boolean Checkbox... and stores the value with Y or N.
Is there any way where only one checkbox should be selected at the time of commit ?
For example, in case its an Answers Table to a Single Choice Question of a Questionnaire application, while adding new answers to the table..., the user inserts 3 rows (answers)... then the boolean checkbox for only one of those 3 rows can be checked.
Thanks
DJThanks... I tried it by writing some code ... But it doesn't seem to work. Can you please have a look... and make the changes.
public class checkBean {
public void validateCheck(LaunchEvent launchEvent){
BindingContext bctx1 = BindingContext.getCurrent();
DCDataControl dc1 = bctx1.findDataControl("QuestionnaireAMDataControl");
ApplicationModule service1 = (ApplicationModule)dc1.getDataProvider();
ApplicationModule am1 = service1.findApplicationModule("QuestionnaireAM");
ViewObject vo1 = am1.findViewObject("QuestionVO");
String newValue = (String)vo1.getCurrentRow().getAttribute("QuestionTypeId");
if(newValue.equals("10881")){
System.out.println("Inside single");
BindingContext bctx = BindingContext.getCurrent();
DCDataControl dc = bctx.findDataControl("QuestionnaireAMDataControl");
ApplicationModule service = (ApplicationModule)dc.getDataProvider();
ApplicationModule am = service.findApplicationModule("QuestionnaireAM");
ViewObject vo = am.findViewObject("QuestionResponseVO");
int numRows;
int j=0;
numRows = vo.getRowCount();
String rowValue = "a";
int k = vo.getCurrentRowIndex();
for (int i=0; i<numRows; i++){
rowValue = (String)vo.getCurrentRow().getAttribute("CorrectResponseFlag");
if(rowValue.equals("Y")){
j++;
if(j>1)
System.out.println("same rows exist");
FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, null, "Two correct respones!");
FacesContext.getCurrentInstance().addMessage(null, msg);
k++;
vo.next();
Thanks
DJ -
hello,
i've got a select query which returns a couple of rows.
now i would like for the query to return only one row (the first match it can find).
how do i do that?
thank you!
my sample of my data as below , the first and seconde record is equal and i want to display all the colomn for the first row and ignore the second row .
84A8E46E8C97 9410 20110812
84A8E46E8C97 9420 20110813
84A8E46E8C6E 9410 20110816
84A8E46E8AFA 9400 20110819876602 wrote:
my sample of my data as below , the first and seconde record is equal and i want to display all the colomn for the first row and ignore the second rowThere is no row order in relational database tables. Same query canreturn rows in different order next time you run it unless you specify ORDER BY. Only ORDER BY guarantees order, so when you say first row/second row you must provide ordering criteria.
SY. -
Condition that takes only one row with the maximum cost of the maximum date
I have to the following query
SELECT distinct b.segment1 ||'.'|| b.segment2 as ITEM,
so.vendor_site_id as SUPPLIER,
'VE' as ORIGIN_COUNTRY_ID,
replace(round(l.mto_costo_neto/l.can_unidades_empaque,2),',','.') as UNIT_COST,
5 as lead_time,
null as pickup_lead_time,
l.can_unidades_empaque as supp_pack_size,
1 as inner_pack_size,
'C' as round_lvl,
50 as ROUND_TO_INNER_PCT,
50 as ROUND_TO_CASE_PCT,
50 as ROUND_TO_LAYER_PCT,
50 as ROUND_TO_PALLET_PCT,
null as MIN_ORDER_QTY,
null as MAX_ORDER_QTY,
'FLAT' as PACKING_METHOD,
'N' as PRIMARY_SUPP_IND,
'Y' as PRIMARY_COUNTRY_IND,
case when b.primary_unit_of_measure like '%KG%' then 'KG'
when b.primary_unit_of_measure like '%Kg%' then 'KG'
when b.primary_unit_of_measure like '%UND%' then 'EA'
when b.primary_unit_of_measure = 'Kilogramo' then 'KG'
when b.primary_unit_of_measure = 'Litro' then 'L'
when b.primary_unit_of_measure = 'Unidad' then 'EA'
else null
end as DEFAULT_UOP,
1 as TI,
1 as HI,
null as SUPP_HIER_TYPE_1,
null as SUPP_HIER_LVL_1,
null as SUPP_HIER_TYPE_2,
null as SUPP_HIER_LVL_2,
null as SUPP_HIER_TYPE_3,
null as SUPP_HIER_LVL_3,
null as CREATE_DATETIME,
null as LAST_UPDATE_DATETIME,
null as LAST_UPDATE_ID,
case when b.primary_unit_of_measure like '%KG%' then 'KG'
when b.primary_unit_of_measure like '%Kg%' then 'KG'
when b.primary_unit_of_measure like '%UND%' then 'EA'
when b.primary_unit_of_measure = 'Kilogramo' then 'KG'
when b.primary_unit_of_measure = 'Litro' then 'L'
when b.primary_unit_of_measure = 'Unidad' then 'EA'
else null
end as COST_UOM,
null as TOLERANCE_TYPE,
null as MAX_TOLERANCE,
null as MIN_TOLERANCE
FROM mrp.mrp_sr_assignments sr , MRP.MRP_SR_RECEIPT_ORG ro , MRP.MRP_SR_SOURCE_ORG so,
inv.mtl_system_items_b b, lcm.cmp_lineas_cotizacion l
WHERE sr.SOURCING_RULE_ID = ro.SOURCING_RULE_ID
and ro.SR_RECEIPT_ID = so.SR_RECEIPT_ID
and sr.inventory_item_id in ((select inventory_item_id from TMP.VIVERES_VEGETALES)
UNION ALL
(select inventory_item_id from TMP.GENERICOS)
UNION ALL
(select inventory_item_id from TMP.HIJOS_GENERICOS))
and sr.inventory_item_id = b.inventory_item_id
and b.organization_id = 136
and sr.inventory_item_id = l.cod_producto_idI need to agregate the following condition
For example, The following query
SELECT l2.fec_ini_vigencia_costo, l2.mto_costo_neto, l2.can_unidades_empaque, l2.cod_producto,
REPLACE(ROUND(l2.mto_costo_neto/l2.can_unidades_empaque,2),',','.') costo_unidad
from cmp_lineas_cotizacion l2
order by cod_producto, fec_ini_vigencia_costo desc, mto_costo_neto descgenerate
FEC_INI_VIGENCIA_COSTO MTO_COSTO_NETO CAN_UNIDADES_EMPAQUE COD_PRODUCTO COSTO_UNIDAD
17/06/2010 382.56 12 1.1000008 31.88 -- THIS ONE
17/06/2010 382.56 12 1.1000008 31.88
17/06/2010 371.0832 12 1.1000008 30.92
17/06/2010 371.0832 12 1.1000008 30.92
18/05/2009 382.56 12 1.1000008 31.88
04/05/2009 245.82 12 1.1000008 20.49
13/04/2009 382.56 12 1.1000008 31.88
23/03/2009 373.2072 12 1.1000008 31.1
23/03/2009 373.2072 12 1.1000008 31.1I need to take only one row with the maximum FEC_INI_VIGENCIA with the maximum COSTO_UNIDAD of the table lcm.cmp_lineas_cotizacion l, which is calculated with the formula ROUND(l2.mto_costo_neto/l2.can_unidades_empaque,2)A better example
I need only one row the maximum COSTO_UNIDAD for the maximum FEC_INI_VIGENCIA for every cod_producto_id in the table lcm.cmp_lineas_cotizacion
I need to take these values
FEC_INI_VIGENCIA_COSTO MTO_COSTO_NETO CAN_UNIDADES_EMPAQUE COD_PRODUCTO_ID COSTO_UNIDAD
17/06/2010 382.56 12 1.1000008 31.88 -- THIS!
17/06/2010 382.56 12 1.1000008 31.88
17/06/2010 371.0832 12 1.1000008 30.92
17/06/2010 371.0832 12 1.1000008 30.92
18/05/2009 382.56 12 1.1000008 31.88
04/05/2009 245.82 12 1.1000008 20.49
13/04/2009 382.56 12 1.1000008 31.88
17/06/2010 382.56 12 1.1000008 31.88
17/06/2010 382.56 12 1.1000008 31.88
17/06/2010 371.0832 12 1.1000008 30.92
17/06/2010 371.0832 12 1.1000008 30.92
18/05/2009 382.56 12 1.1000008 31.88
04/05/2009 245.82 12 1.1000008 20.49
13/04/2009 382.56 12 1.1000008 31.88
27/10/2010 1171.549344 12 1.1000009 97.63 -- THIS!
13/10/2010 1171.549344 12 1.1000009 97.63
06/09/2010 1171.549344 12 1.1000009 97.63
02/08/2010 1048.825056 12 1.1000009 87.4
28/07/2010 754.8 12 1.1000009 62.9
27/07/2010 614.04 12 1.1000009 51.17
21/06/2010 954.84 12 1.1000009 79.57
27/05/2010 614.04 12 1.1000009 51.17
07/07/2009 1143.17 12 1.1000010 95.26
28/03/2009 1143.17 12 1.1000010 95.26
27/10/2008 1744.644672 12 1.1000010 145.39
01/07/2008 1690.12224 12 1.1000010 140.84
07/07/2009 1143.17 12 1.1000010 95.26 --THIS!
28/03/2009 1143.17 12 1.1000010 95.26
27/10/2008 1744.644672 12 1.1000010 145.39
01/07/2008 1690.12224 12 1.1000010 140.84
07/07/2009 1143.17 12 1.1000010 95.26
28/03/2009 1143.17 12 1.1000010 95.26
27/10/2008 1744.644672 12 1.1000010 145.39
01/07/2008 1690.12224 12 1.1000010 140.84 -
Merge only one row out of multiple rows
I need to prepare a merge statement which merge only one row in to a table. Below is the table definition, sample data and merge statement i used.
CREATE TABLE Mob_Attr (NAME VARCHAR2(20), ATTR_1 VARCHAR2(20), ATTR_2 VARCHAR2(20), ATTR_3 VARCHAR2(20));
CREATE TABLE Mob_Desc (NAME VARCHAR2(50), ATTR_1 VARCHAR2(20), ID NUMBER(20));
CREATE TABLE Mob_Main (NAME VARCHAR2(20), ATTR VARCHAR2(20), ID VARCHAR2(10));
insert into Mob_Attr(name, attr_1, attr_2,attr_3) values ('n1','aa',null,null);
insert into Mob_Attr(name, attr_1, attr_2,attr_3) values ('n2','bb',null,null);
insert into Mob_Attr(name, attr_1, attr_2,attr_3) values ('n3','cc',null,null);
insert into Mob_Attr(name, attr_1, attr_2,attr_3) values ('n4','dd',null,null);
insert into Mob_Desc (NAME,ATTR_1,ID) values ('n1','aa',10);
insert into Mob_Desc (NAME,ATTR_1,ID) values ('n1','aa',15);
insert into Mob_Desc (NAME,ATTR_1,ID) values ('n1','aa',123);
insert into Mob_Desc (NAME,ATTR_1,ID) values ('n1','aa',1455);
insert into Mob_Desc (NAME,ATTR_1,ID) values ('n2','bb',455);
insert into Mob_Desc (NAME,ATTR_1,ID) values ('n2','bb',135);
insert into Mob_Desc (NAME,ATTR_1,ID) values ('n3','cc',15);
insert into Mob_Desc (NAME,ATTR_1,ID) values ('n3','cc',52);
insert into Mob_Desc (NAME,ATTR_1,ID) values ('n4','dd',1455);
merge into Mob_Main ma using
(select d.name, d.attr_1,d.id from Mob_Attr a, Mob_Desc d
where a.name = d.name and a.attr_1 = d.attr_1
) q on (ma.name=q.name and ma.attr=q.attr_1)
when not matched then
insert (NAME,ATTR,ID)
values (q.name,q.attr_1,q.ID);
Above merge statement will actually merge entire data . But i want the first row will only get inserted to the base table (Mob_Main). If we take name 'n1' first row from table Mob_Desc with ID as '10' only should get inserted. I can go for a cursor to do this as i have huge data volume i prefer merge instead.MERGE INTO Mob_Main ma
USING (SELECT d.name, d.attr_1, d.id
FROM Mob_Attr a, Mob_Desc d
WHERE a.name = d.name AND a.attr_1 = d.attr_1 AND id = 10
UNION
SELECT d.name, d.attr_1, d.id
FROM Mob_Attr a, Mob_Desc d
WHERE a.name = d.name AND a.attr_1 = d.attr_1 AND id != 10
AND NOT EXISTS
(SELECT 1
FROM Mob_Desc d1
WHERE d.name = d1.name
AND d.attr_1 = d1.attr_1
AND d1.id = 10)) q
ON (ma.name = q.name AND ma.attr = q.attr_1)
WHEN NOT MATCHED
THEN
INSERT (NAME, ATTR, ID)
VALUES (q.name, q.attr_1, q.ID);
COMMIT;
select *
from Mob_Main
order by name, id;
NAME ATTR ID
n1 aa 10
n2 bb 135
n2 bb 455
n3 cc 15
n3 cc 52
n4 dd 1455
6 rows selected.
Maybe you are looking for
-
Since I installed Lion on my macbook the LED light does not pulse when I close the screen - the sleep function does not work neither when chosen after pressing the button nor chosen in the apple menu..
-
Hi I need to compare between 2 dates and display the greatest among them. Ex: Date1 : 05/09/08 13:50 MDT Date2 : 06/09/08 13:50 CDT The greatest among these two is 06/09/08 13:50 CDT . But here I need to display Date with Time stamp . like the output
-
Good afternoon. There are pages in my application that should have the https protocol. For this reason, I had to use tool keytool. First, i create a certificate keystore by executing the following command in the msdos prompt: %JAVA_HOME%\bin\keytool
-
German dates and "add iCal event" not working
I have a german formatted date in a mail (like 01.08.2008 = October, 1. 2008) and Mail does recognize this as a date. But when I select "add iCal event", the popup shows the date 08.01.08 (= January, 8. 2008). This only happens with days <= 12. When
-
Hello all, I am gathering information in preparation for Slovakia's transition to the Euro on 1/1/2009. I am not sure what steps need to be taken in our case. Our current setup allows for SKK (Slovakian Koruna) postings under both a USD company cod