Selecting a one pixel high row of a table
I have created a table about 18 rows high and have one row 1 pixel high. It is colored black to separate sections.
I am unable to select it to erase it. I have zoomed in, also tried the table palette.
Any ideas?
SH
Select the row in code view?<br /><br />-- <br />Murray<br /><br /><br /><[email protected]> wrote in message <br />news:[email protected]..<br />>I have created a table about 18 rows high and have one row 1 pixel high. It <br />>is colored black to separate sections.<br />><br />> I am unable to select it to erase it. I have zoomed in, also tried the <br />> table palette.<br />><br />> Any ideas?<br />><br />> SH
Similar Messages
-
Wich function (class) could I use to create one pixel high object (frame)?
Hi guys, I need a pointer on a certatin line on the graphic screen. And I want it to be written in Java. I know how to make it to be "always on top" now, but AFAIK every applet or application is to be shown in a bordered window saying it is a Java object for security reasons. As I want it to be one pixel high, I apparently need to get rid of the frame border. Supposedly I have to switch off the security, but it's OK for me.
Wich function (class) do I use to create one pixel high object?
And one more thing. How do I generally show a graphic object of nonrectangular shape out of the bordered frame? Is there a way to do it without creating an transparent rectangular window/frame?I didn't quite know what you mean, but how's this?
public class MySinglePixelWindow extends JWindow {
public MySinglePixelWindow() {
super();
setSize(1,1);
setLocation(0,0);
public void paint(Graphics g) {
super.paint(g);
g.fillRect(0,0,1,1);
}Transparent Window:
public class MyTransparentWindow extends JWindow {
java.awt.Robot robot;
BufferedImage screen;
public MyTransparentWindow() {
super();
try {
robot = new Robot();
} catch(Exception e) {}
public void show() {
image = robot.createScreenCapture(getBounds());
super.show();
public void paint(Graphics g) {
super.paint(g);
Graphics2D g2 = (Graphics2D)g;
g.setComposite(AlphaComposite.newInstance(AlphaComposite.SRC_OVER,0.8));
g.drawImage(image,0,0,this);
}Puh!
You can't move this window though...
Nille -
Select and highlight a default row in a table
Hi everybody.
When using a table in WD, the first line is selected and highlighted by default.
I'd like to reproduce the same behaviour but this time, the selected and highlighted row shouldn't be the first row but any other one that has to be defined previously.
How could I do that??
Thanks for any suggestions you may have.
Regards,
C.For example I have a node SFLIGHT which am using to display data in tabular format on my layout. I have attached a supply function POPULATE_DATA to my context node SFLIGHT to fetch & populate the node.
METHOD populate_data .
DATA: lt_sflight TYPE wd_this->elements_sflight.
SELECT carrid
connid
fldate
price FROM sflight INTO TABLE lt_sflight.
node->bind_table( new_items = lt_sflight ).
ENDMETHOD.
And within my WDDOINIT method am programmatically setting the LeadSelection to the 3rd row as how shown below:
METHOD wddoinit .
DATA: wd_node TYPE REF TO if_wd_context_node.
wd_node = wd_context->get_child_node( name = 'SFLIGHT' ).
wd_node->set_lead_selection_index( '3' ).
ENDMETHOD.
Regards,
Uday -
One pixel around borderless image in table
Hey,
I have an image in a table. I set the background color of the
table to a greyish blue, because the table is taller than the image
and i want there to be color below the image in the table. BUT ONLY
in the table. The width of the table is the same as the image. For
some reason, there is one pixel of the background color of the
table around the jpg, and I cant get it to go away. I tried
cellpadding="0", but that didn't do anything. I also tried negative
numbers, but taht didnt do anything either. Am I SOL or can I put
this image in the table without having the background exceed the
image?
Simple:
<table width="600" border="0" align="center">
<tr>
<td width="216"
background="../../Images/tablebgcolor.jpg"><p><img
src="../../Images/Old Main.jpg" alt="" width="216"
height="332"/></p>
</td>
<td width="374"> </td>
</tr>
</table>
Note that I used the image of the background color instead of
setting the background color itself. In either case it's the same,
and I can't get a different result. Thanks for the help,
--GWhat happens if you remove the <p> tag around the
image?
<p> tags have a default padding, so unless you zero
that out or move the
image of of the <p> you'll get some spacing around it.
Nadia
Adobe® Community Expert : Dreamweaver
CSS Templates |Tutorials |SEO Articles
http://www.DreamweaverResources.com
~ Customisation Service Available ~
http://www.csstemplates.com.au
Spry Widget Examples
http://www.dreamweaverresources.com/spry-widgets/
~ Forum Posting Guidelines ~
http://www.adobe.com/support/forums/guidelines.html
CSS Tutorials for Dreamweaver:
http://www.adobe.com/devnet/dreamweaver/css.html
"117236" <[email protected]> wrote in
message
news:gbkakt$8me$[email protected]..
> Hey,
> I have an image in a table. I set the background color
of the table to a
> greyish blue, because the table is taller than the image
and i want there
> to be
> color below the image in the table. BUT ONLY in the
table. The width of
> the
> table is the same as the image. For some reason, there
is one pixel of
> the
> background color of the table around the jpg, and I cant
get it to go
> away. I
> tried cellpadding="0", but that didn't do anything. I
also tried negative
> numbers, but taht didnt do anything either. Am I SOL or
can I put this
> image
> in the table without having the background exceed the
image?
>
> Simple:
>
> <table width="600" border="0" align="center">
> <tr>
> <td width="216"
background="../../Images/tablebgcolor.jpg"><p><img
> src="../../Images/Old Main.jpg" alt="" width="216"
height="332"/></p>
> </td>
> <td width="374"> </td>
> </tr>
> </table>
>
> Note that I used the image of the background color
instead of setting the
> background color itself. In either case it's the same,
and I can't get a
> different result. Thanks for the help,
> --G
> -
Howto create 'select statement' that returns first row? (simple table)
quick question that drives me crazy:
Say I have the following table:
ID....car_model....point_A....total
1........333.............NY..........54
2........333.............NJ..........42
3........333.............NH...........63
4........555.............NJ...........34
5........555.............PA...........55
I would like to create a select statement that return car_model which the starting point is NJ - in this example it's only 555.
thanks for any tipsfair enough.
the problem is this: given the table below, I need to create a report that reflects car rentals from specific location. you can rent a car from different locations; a car has a starting point (like a flight itinerary) so consider this:
Mark rent a car with the following itinerary:
NY--> NJ
NJ--> PA
PA-->FL
FL-->LA
the end user would like to see all car that were rented between X and Y and start point was NJ, so in the example above, the starting point is NY so it doesn't match the end users' criteria.
The table is organized in the following manner: ID....car_model....point_A....total
* I don't know whey the someone choose point_A as a column description as it just suppose to be 'location'
so, back to my first example:
ID....car_model....point_A....total
1........333.............NY..........54
2........333.............NJ..........42
3........333.............NH...........63
4........555.............NJ...........34
5........555.............PA...........55
if I do this:
Select car_model from myTable where point_A='NJ'
the return result will be 333 and 555 but that is in correct because 333 starting point is NY.
I hope I provided enough information, thanks -
How do I select the end of a row or column in Numbers?
I am trying to select to the end of a column in Numbers. In Excel, I simply hold down the shift+command+arrow keys and I can select the entire row or column int he arrow direction. How do I do this in Numbers?
Here two other scripts :
Select-to-top and select-to-left.
Both of them take care of possible headers.
--{code}
--[SCRIPT select-to-top]
Enregistrer le script en tant que Script : select-to-top.scpt
déplacer le fichier ainsi créé dans le dossier
<VolumeDeDémarrage>:Utilisateurs:<votreCompte>:Bibliothèque:Scripts:Applications :Numbers:
Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
Sélectionner une ou plusieurs cellules d'une ligne dans une table de Numbers
Aller au menu Scripts , choisir Numbers puis choisir “select-to-top”
Il étendra la sélection jusqu'à la première ligne standard de la colonne (ne sélectionne pas les rangs d’en tête).
Bien entendu, ce script sera plus intéressant si vous le dotez d'un raccourci clavier à l’aide, par exemple, de FastScripts.
--=====
L’aide du Finder explique:
L’Utilitaire AppleScript permet d’activer le Menu des scripts :
Ouvrez l’Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case “Afficher le menu des scripts dans la barre de menus”.
Sous 10.6.x,
aller dans le panneau “Général” du dialogue Préférences de l’Éditeur Applescript
puis cocher la case “Afficher le menu des scripts dans la barre des menus”.
--=====
Save the script as a Script: select-to-top.scpt
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
Select one or several cells in a row of a Numbers table.
Go to the Scripts Menu, choose Numbers, then choose “select-to-top”
It will expand the selection to the first standard row of the table (minus header rows).
Of course, it would be more useful if you attach a shortcut thanks to a tool like FastScripts.
--=====
The Finder’s Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the “Show Script Menu in menu bar” checkbox.
Under 10.6.x,
go to the General panel of AppleScript Editor’s Preferences dialog box
and check the “Show Script menu in menu bar” option.
--=====
Yvan KOENIG (VALLAURIS, France)
2012/02/09
--=====
on run
my activateGUIscripting()
set {dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
set count_HeaderRows to my countXers("Numbers", "R")
set selection range to range ((name of cell (1 + count_HeaderRows) of column colNum1) & " : " & (name of cell rowNum1 of column colNum2))
end tell
end run
--=====
set { dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
on get_SelParams()
local d_Name, s_Name, t_Name, row_Num1, col_Num1, row_Num2, col_Num2
tell application "Numbers" to tell document 1
set d_Name to its name
set s_Name to ""
repeat with i from 1 to the count of sheets
tell sheet i to set maybe to the count of (tables whose selection range is not missing value)
if maybe is not 0 then
set s_Name to name of sheet i
exit repeat
end if -- maybe is not 0
end repeat
if s_Name is "" then
if my parleAnglais() then
error "No sheet has a selected table embedding at least one selected cell !"
else
error "Aucune feuille ne contient une table ayant au moins une cellule sélectionnée !"
end if
end if
tell sheet s_Name to tell (first table where selection range is not missing value)
tell selection range
set {top_left, bottom_right} to {name of first cell, name of last cell}
end tell
set t_Name to its name
tell cell top_left to set {row_Num1, col_Num1} to {address of its row, address of its column}
if top_left is bottom_right then
set {row_Num2, col_Num2} to {row_Num1, col_Num1}
else
tell cell bottom_right to set {row_Num2, col_Num2} to {address of its row, address of its column}
end if
end tell -- sheet…
return {d_Name, s_Name, t_Name, row_Num1, col_Num1, row_Num2, col_Num2}
end tell -- Numbers
end get_SelParams
--=====
on parleAnglais()
local z
try
tell application "Numbers" to set z to localized string "Cancel"
on error
set z to "Cancel"
end try
return (z is not "Annuler")
end parleAnglais
--=====
on activateGUIscripting()
(* to be sure than GUI scripting will be active *)
tell application "System Events"
if not (UI elements enabled) then set (UI elements enabled) to true
end tell
end activateGUIscripting
--=====
set count_Row_Headers to my countXers("Numbers","R")
set count_Column_Headers to my countXers("Numbers","C")
set count_Footers to my countXers("Numbers","F")
set count_Row_Headers to my countXers("Pages","R")
set count_Column_Headers to my countXers("Pages","C")
set count_Footers to my countXers("Pages","F")
on countXers(theApp, what)
local mt, mi, mm, ms
if theApp is "Numbers" then
set mt to 6 (* Table *)
if "Row" starts with what then
set mi to 10
else if "Column" starts with what then
set mi to 11
else if "Footer" starts with what then
set mi to 14
else
if my parleAnglais() then
error "“" & what & "” isn’t a valid parameter !"
else
error "« " & what & " » n’est pas un paramètre géré !"
end if -- parleAnglais
end if -- "Row"…
else if theApp is "Pages" then
set {mt, mi} to {6, 4} (* Format, Table *)
if "Row" starts with what then
set mm to 13
else if "Column" starts with what then
set mm to 14
else if "Footer" starts with what then
set mm to 15
else
if my parleAnglais() then
error "“" & what & "” isn’t a valid parameter !"
else
error "« " & what & " » n’est pas un paramètre géré !"
end if -- parleAnglais
end if -- "Row"…
else
if my parleAnglais() then
error "The application “" & theApp & "” isn’t driven by this script !"
else
error "L’application « " & theApp & " » n’est pas gérée par ce script !"
end if -- parleAnglais
end if -- theApp…
activate application theApp
tell application "System Events" to tell process theApp to tell menu bar 1 to tell menu bar item mt to tell menu 1 to tell menu item mi to tell menu 1
if theApp is "Numbers" then
Here we are in Numbers *)
repeat with ms from 1 to 6
try
(get value of attribute "AXMenuItemMarkChar" of menu item ms) = "✓"
exit repeat
end try
end repeat
else
Here we are in Pages *)
tell menu item mm to tell menu 1
repeat with ms from 1 to 6
try
(get value of attribute "AXMenuItemMarkChar" of menu item ms) = "✓"
exit repeat
end try
end repeat
end tell -- menu item mm
end if -- theApp is …
end tell -- System Events…
return ms - 1
end countXers
--=====
--[/SCRIPT]
--{code}
--{code}
--[SCRIPT select-to-left]
Enregistrer le script en tant que Script : select-to-left.scpt
déplacer le fichier ainsi créé dans le dossier
<VolumeDeDémarrage>:Utilisateurs:<votreCompte>:Bibliothèque:Scripts:Applications :Numbers:
Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
Sélectionner une ou plusieurs cellules d'une colonne dans une table de Numbers
Aller au menu Scripts , choisir Numbers puis choisir “select-to-left”
Il étendra la sélection jusqu'à la première colonne standard de la table (ne sélectionne pas les colonnes d’en tête).
Bien entendu, ce script sera plus intéressant si vous le dotez d'un raccourci clavier à l’aide, par exemple, de FastScripts.
--=====
L’aide du Finder explique:
L’Utilitaire AppleScript permet d’activer le Menu des scripts :
Ouvrez l’Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case “Afficher le menu des scripts dans la barre de menus”.
Sous 10.6.x,
aller dans le panneau “Général” du dialogue Préférences de l’Éditeur Applescript
puis cocher la case “Afficher le menu des scripts dans la barre des menus”.
--=====
Save the script as a Script: select-to-left.scpt
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
Select one or several cells in a column of a Numbers table.
Go to the Scripts Menu, choose Numbers, then choose “select-to-left”
It will expand the selection to the first standard colomn of the table (minus fheader columns).
Of course, it would be more useful if you attach a shortcut thanks to a tool like FastScripts.
--=====
The Finder’s Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the “Show Script Menu in menu bar” checkbox.
Under 10.6.x,
go to the General panel of AppleScript Editor’s Preferences dialog box
and check the “Show Script menu in menu bar” option.
--=====
Yvan KOENIG (VALLAURIS, France)
2012/02/09
--=====
on run
my activateGUIscripting()
set {dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
set count_ColHeaders to my countXers("Numbers", "C")
set selection range to range ((name of cell (1 + count_ColHeaders) of row rowNum1) & " : " & (name of cell colNum1 of row rowNum2))
end tell
end run
--=====
set { dName, sName, tName, rowNum1, colNum1, rowNum2, colNum2} to my get_SelParams()
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
on get_SelParams()
local d_Name, s_Name, t_Name, row_Num1, col_Num1, row_Num2, col_Num2
tell application "Numbers" to tell document 1
set d_Name to its name
set s_Name to ""
repeat with i from 1 to the count of sheets
tell sheet i to set maybe to the count of (tables whose selection range is not missing value)
if maybe is not 0 then
set s_Name to name of sheet i
exit repeat
end if -- maybe is not 0
end repeat
if s_Name is "" then
if my parleAnglais() then
error "No sheet has a selected table embedding at least one selected cell !"
else
error "Aucune feuille ne contient une table ayant au moins une cellule sélectionnée !"
end if
end if
tell sheet s_Name to tell (first table where selection range is not missing value)
tell selection range
set {top_left, left_right} to {name of first cell, name of last cell}
end tell
set t_Name to its name
tell cell top_left to set {row_Num1, col_Num1} to {address of its row, address of its column}
if top_left is left_right then
set {row_Num2, col_Num2} to {row_Num1, col_Num1}
else
tell cell left_right to set {row_Num2, col_Num2} to {address of its row, address of its column}
end if
end tell -- sheet…
return {d_Name, s_Name, t_Name, row_Num1, col_Num1, row_Num2, col_Num2}
end tell -- Numbers
end get_SelParams
--=====
on parleAnglais()
local z
try
tell application "Numbers" to set z to localized string "Cancel"
on error
set z to "Cancel"
end try
return (z is not "Annuler")
end parleAnglais
--=====
on activateGUIscripting()
(* to be sure than GUI scripting will be active *)
tell application "System Events"
if not (UI elements enabled -
Hi,
I want to select only the last inserted row in a table. Can anybody help me how can i get it.
Eg
select * from emp;
empno ename sal
12 abc 100
13 xyz 200
Now i have inserted a row as
Insert into emp values (14,'Rohit',500);
So i only want to select the last inserted row i.e.. empno 14 (in this case).
Thanks
Bye
Rohit TanejaThanks to all for replying.
But the result is not which i desire.
I have deleted the existing row in the same table as
SQL> Delete from emp where empno = 13;
1 row deleted.
Then i inserted a new row as
SQL> insert into emp values(10,'SRI',200);
1 row created.
Then i committed the work
SQL> commit;
Commit complete.
But still am getting the last row as
SQL> select * from emp
where rowid=(select max(rowid)
from emp);
EMPNO ENAME SAL
14 ROHIT 500
as the solution.
But here i am supposed to get the row with empno 10.
I have tried both the queries and still geting the same result.
Please look aat it again,
Thanks in advance
Bye
Rohit Taneja
Hi,
I want to select only the last inserted row in a
table. Can anybody help me how can i get it.
Eg
select * from emp;
empno ename sal
12 abc 100
13 xyz 200
Now i have inserted a row as
Insert into emp values (14,'Rohit',500);
So i only want to select the last inserted row i.e..
empno 14 (in this case).
Thanks
Bye
Rohit Taneja -
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 -
How to select one row in a table with radio button
Hi all.
I have a VO where there is an attribute (isDefault [String]) that identifies the default record in the view. The possible values are 'Y' for yes and 'N' for no. Obviously only one record can have the 'Y' value.
In my page I have created an ADF Table (with the usual data control drag & drop). I would to transform the default inputText of "isDefault" field with a selectOneRadio component in order to permit the user to select (and save contextually in the DB) the default row of this table.
Can you explain me how? I'm using JDeveloper 11.1.1.4.
Thanks in advance.
BaduelBaduel wrote:
Cvele,
thanks for your responses. Yes, it's easier to use af:selectBooleanCheckbox but I need that the selection is mutually exclusive (only one row can be selected). >If this is possible also with the boolean checkbox please tell me how.- Let's try with CheckBox :
1. At the ViewObjectImpl level (for example, YourViewObjectImpl), add the following code:
private oracle.jbo.Key currSelectedRowKey = null;
public void doRowSelection(Key newKey) {
// de-select old one
if (currSelectedRowKey != null) {
Row[] rows = findByKey(currSelectedRowKey, 1);
if (rows != null && rows.length > 0)
rows[0].setStatusAsBoolean(Boolean.FALSE); // cast to the appropriate row Impl class if need !
// remember a new selected row key:
currSelectedRowKey = newKey;
}In the ViewRowImpl, in the transient attr settter, do as follows:
public void setStatusAsBoolean(Boolean value) {
setStatus(value.booleanValue() ? ONE : ZERO);
if (value.booleanValue()) {
YourViewObjectImpl vo = (YourViewObjectImpl)getViewObject();
vo.doRowSelection(getKey());
} P.S. The above was not tested at all, but should give you an idea -
Hello everyone,
I am developing an application (ALV OO) to select more than 1 column by row ( one ). This is an a holiday application so the idea is:
-One column will be the day, and the row will be the user.
So I am trying to select more than one day by user (that would be the row).
I am using the method set_table_for_first_display but when it shows the alv, doesn't let me to select more than one column with a click of the mouse.
Does anybody know if I can do this (select more than one column, by row) in somehow?
Please let me know if you need more clarification about this.
Thanks in advance
DiegoHi Diego,
it's all in the documentation.
set different selection modes through the value of the field u201CSEL_MODEu201D in the layout structure.
SPACE
same as 'B'
see 'B'
Default setting
'A'
Column and row selection
Multiple columns
Multiple rows
The user selects the rows through pushbuttons at the left border of the grid control.
'B'
Simple selection, list box
Multiple columns
Multiple rows
'C'
Multiple selection, list box
Multiple columns
Multiple rows
'D'
Cell selection
Multiple columns
Multiple rows
Any cells
The user selects the rows through pushbuttons at the left border of the grid control
Beyond setting this option, you can set u201CNO_ROWMARKu201D option to hide the mark column which is normally visible when the selection mode allows multiple row selection.
One point to notice here is that if you set your ALV Grid as to be editable, it may override your selection mode regardless of your layout settings.
This is from SDN Community Contribution "An Easy Reference for ALV Grid Control" By: Serdar ŞİMŞEKLER
Sorry, no link,. it's on my disk.
Regards,
Clemens -
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. -
Select Single * and Select upto one row
Hi all,
Can anybody tell me what is difference between Select single * and select upto one row?
And which one is better?
Thanks in advance.......According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.
The best way to find out is through sql trace or runtime analysis.
Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
Mainly: to read data from
The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
Mainly: to check if entries exist.
Select Single is the best one compared to UPto one rows.
Select Single will get the first record from the table which satisfies the given condition.So it will interact once with the database.
UTO 1 rows will get the list of the records for the given match and iwll show the first record from the list.So it will take time to get the record.
SELECT SINGLE VBELN from VBAK
where MATNR = '1M20'.
---Thjis will get the first matched record and will display the record
SELECT VBELN from VBAK
where MATNR = '1M20' upto 1 rows.
---Thjis will get the list of matched records and will display the first record
The Major difference between Select Single and Select UPTO 1 rows is The Usage Of Buffer for each.
Select Single will search for all the satisfied data and bring all that data into Buffer and later it will give to that data to the program.
Select UPTO 1 Rows will end the search after getting the 1st satisfied record and gives that record to the program.
Thus Select Single will take much processing time when compare with Select UPTO 1 rows.
Also
check these threads..
Difference between Select Single and Selct upto 1 row
Difference between Select Single and Select upto 1 row
Difference between select single and select upto one row
Difference between 'select single *' and 'select upto 1 rows'
difference between select single and select up to 1 rows
regards,
srinivas
<b>*reward for useful answers*</b> -
Fetching more than one row from a table after selecting one value from the dropdown
Hi Experts,
How can we fetch more than one row from a table after selecting one value from the dropdown.
The scenario is that I have some entries in the dropdown like below
A B C
11256 VID 911256
11256 VID 811256
11256 SONY 11256
The 'B' values are there in the dropdown. I have removed the duplicate entries from the dropdown so now the dropdownlist has only two values.for eg- 'VID' and'SONY'. So now, after selecting 'VID' from the dropdown I should get all the 'C' values. After this the "C' values are to be passed to other methods to fetch some data from other tables.
Request your help on this.
Thanks,
Preeetam Narkhede.Hi Preetam!
I hope I understand your request proberly, since this is more about Java and less about WebDynpro, but if I'm wrong, just follow up on this.
Supposed you have some collection of your original table data stored in variable "origin". Populate a Hashtable using the values from column "B" (let's assume it's Strings) as keys and an ArrayList of whatever "C" is (let's assume String instances, too) as value (there's a lot of ways to iterate over whatever your datasource is, and since we do not know what your datasource is, maybe you'll have to follow another approach to get b and c vaues,but the principle should remain the same):
// Declare a private variable for your Data at the appropriate place in your code
private Hashtable temp = new Hashtable<String, ArrayList<String>>();
// Then, in the method you use to retrieve backend data and populate the dropdown,
// populate the Hashtable, too
Iterator<TableData> a = origin.iterator();
while (a.hasNext()) {
TableData current = a.next();
String b = current.getB();
String c = current.getC();
ArrayList<String> values = this.temp.get(b);
if (values == null) {
values = new ArrayList<String>();
values.add(c);
this.temp.put(b, values);
So after this, you'll have a Hashtable with the B values als keys and collections of C values of this particular B as value:
VID --> (911256, 811256)
SONY --> (11256)
Use
temp.keySet()
to populate your dropdown.
After the user selects an entry from the dropdown (let's say stored in variable selectedB), you will be able to retrieve the collection of c's from your Hashtable
// In the metod you handle the selection event with, get the c value collection
//and use it to select from your other table
ArrayList<String> selectedCs = this.temp.get(selectedB);
// now iterate over the selectedCs items and use each of these
//to continue retrieving whatever data you need...
for (String oneC : selectedCs) {
// Select Data from backend using oneC in the where-Clause or whatever...
Hope that helps
Michael -
Diffrence b/w select single & select upto one row
hi
wat is the diffrence b/w select single & select upto one row?
deepakHi,
Select single has to be used with a where condition that has all the key fields:
It will always return a unique record(If a match is found).
Select upto 1 rows would get your the first record if multiple matches are found.
and select up to has to be end with endselect statements.
According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.
The best way to find out is through sql trace or runtime analysis.
Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
Mainly: to read data from
The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
Mainly: to check if entries exist.
When you say SELECT SINGLE, it means that you are expecting only one row to be present in the database for the condition you're going to specify in the WHERE clause. so that means, you will have to specify the primary key in your WHERE clause. Otherwise you get a warning.
SELECT UP TO 1 ROWS is used in cases where you just want to make sure that there is at least one entry in the database table which satisfies your WHERE clause. Generally, it is meant to be used for existence-check.
You may not want to really use the values returned by the SELECT statement in this case (thought this may not necessarily be so).And in each case the database optimizer may choose a different strategy to retrieve the data.
Knowing when to use SELECT SINGLE or SELECT ... UP TO 1 ROWS
A lot of people use the SELECT SINGLE statement to check for the existence of a value in a database. Other people prefer to use the 'UP TO 1 ROWS' variant of the SELECT statement.
So what's the difference between using 'SELECT SINGLE' statement as against a 'SELECT .... UP TO 1 ROWS' statement ?
If you're considering the statements
SELECT SINGLE field INTO w_field FROM table.
and
SELECT field INTO w_field FROM table UP TO 1 ROWS. ENDSELECT.
then looking at the result, not much apart from the extra ENDSELECT statement. Look at the run time and memory usage and they may be worlds apart.
Why is this ?? The answer is simple.
The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
http://sap-img.com/abap/difference-between-select-single-and-select-upto-one-rows.htm
Check these links -
The specified item was not found.
diff between select single and up to one row
diff b/w SECELT SINGLE * AND SELECT UPTO ONE ROW
Regards,
Priyanka. -
Diff bw select single * and select upto one row
hai,
what is the difference between select single * and select upto one row.hi,
ex code
Report Z_Difference
Message-id 38
Line-Size 80
Line-Count 0
No Standard Page Heading.
Start-Of-Selection.
Data: w_Single type Posnr,
t_Rows type standard table of Posnr
initial size 0
with header line.
Select single Posnr
from zDifference
into w_Single.
Select Posnr
into table t_Rows
from zDifference
up to 1 rows
order by Posnr descending.
Write :/ 'Select single:', w_Single.
Skip 1.
Write :/ 'Up to 1 rows :'.
Loop at t_Rows.
Write t_Rows.
EndLoop.
According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not
using all the primary key fields.
select single is a construct designed to read database records with primary key. In the absence of the primary key,
it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key
supplied and will try to find most suitable index.
The best way to find out is through sql trace or runtime analysis.
Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s)
you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the
second or the third record has the value you are looking for.
The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional
level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause
If this results in multiple records then only the first one will be returned and therefore may not be unique.
Mainly: to read data from
The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that
are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns
the first record of the result set.
Mainly: to check if entries exist.
You can refer to the below link..
http://www.sap-img.com/abap/difference-between-select-single-and-select-upto-one-rows.htm
rgds
anver
if hlped pls mark points
Maybe you are looking for
-
Changing Apple ID and how does it affect iCloud?
Hi, I had no idea where to put this question since it seems to belong in about 3 different sections, but since it involves my iCloud/Apple/iTunes ID then I suppose this is as good as any place. I've read a few answers to this question but they don't
-
Windows doesn't recognize iPod Touch 8gb 3g
I'm running Windows 7 Ultimate x64, and after I upgraded my iPod Touch to iOS4, it got stuck in DFU mode and is stuck in a continuous DFU mode loop. My computer won't recognize the device and I've done everything to try to reinstall the mobile device
-
How do I add a keyword tag in iPhoto on the iPad?
I looked through the Help for iPhoto and couldn't find a section on how to add keyword tags to my images. Things like the names of the people in the photos, etc. The screen shots of iPhoto show a Face Taggging feature. How do I get to that? Thanks fo
-
Artwork tab is missing when importing home videos
When I import a home video mp4 file, the artwork tab is missing. This only just started to happen. Any idea how to get the artwork tab to appear? This doesn't happen consistently.
-
Hello, I need help to adjust the appearance of a carousel component. As you can see in the picture i need more space for the current page of carousel (need to enlarge the current page) and i want to narrow the space marked with a red line (left and r