Not to get certain rows
Hi,
We are using sql server 2012. We have one stored proc with multiple queries in it. One of the query is complicated with lot of join and other conditions, whose data is inserted into tmp table. I got one more requirement from business user to eliminate certain
types of transactions. For this, I have to make changes to complicated query. Which way is better.
Option 1: From table1 inner join table2 on table1.ID = Table2.ID and Table1.Type NOT IN (200, 220)
OR
Option 2: Get all transactions into tmp table using that complicated query. Later say
DELETE FROM @tbl where Type IN (200, 220)
Some say that using negation in query joins may not be a good idea.
Thanks,
Spunny
If you're over sql 2008 another way to implement exclusion logic would be to use MERGE statement with EXCEPT
http://www.sql-server-performance.com/2012/sql-server-t-sql-tuning-not-in-and-not-exists/
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
Similar Messages
-
Problem getting the row element
hi
i have a scenario where i have filtered data from
3 listboxes and populated the data in the table .
now the table contains about 10 rows .
now i need to select a particular row in the table
and catch the particular row data of the table .
n is size of the table .
for(int i=0;i<n;i++)
if(wdContext.nodeIt_Car_Data_t().isSelected(i) {
String model=wdContext.nodeIt_Car_Data_t().currentIt_Car_Data_tElement().getP_Model();
String trim=wdContext.nodeIt_Car_Data().currentIt_Car_DataElement().getP_Trim();
but iam not able get the row data in the string where i am catching in
it_car_data_t is the table node .
model and trim are table elements .
how can i solve this ?hi
thanks for the reply , but the same issue .
problem here is when i am filtering the data for the Itemlistbox
i am catching filtered data in the String
and then setting it to a Structue IT_CAR as
Z_CAR_DATA car= new Z_CAR_DATA()
car.setMake(make)
next adding this car to the RFC
wdcontext.currentRFC.modelobject.additcar(car).
not i will get the filtered ddata in table . along with some
extra data in the table .
now i need to catch the row data then again set it
IT_CAR (which i have done above )
data i am setting is not going to IT_CAR structure .
because after i get the data in the IT_CAR strucure i can
data this to the RFC .
can any one help me out with this issue .
i need to get the row of the table and then set it
to a structure which iam not able to . -
I have tried every step you have listed in your FAQ section for enabling and disabling cookies but I am still getting error messages "cookies not enabled" on certain websites? Why is this and what do I need to do to fix this?
I have STILL NOT received an answer to my question as of this date. I am VERY disappointed in Firefox support.
-
Not able to get which row is edited in alv grid
Hi,
I have created a Editable alv grid .
My grid does not contain line selection cloumn so How can I get to know which row is to be changed.
I am using get_selected_rows method but not able to get which row is changed. please help on this.
Thanks in advance.Hi,
check this ..
it_ekko1[] = it_ekko[].
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_user_command = 'USER_COMMAND'
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_events = i_events
i_save = 'X'
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
In user command you need to write logic to know which all records have changed.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&IC1'.
loop at it_ekko into wa_ekko.
read table it_ekko1 into wa_ekko1 index sy-tabix.
if wa_ekko <> wa_ekko1.
write your logic further
endif.
endloop.
endcase.
Regards,
Srini. -
I am unable to load Adobe Flash player on my Apple Ipad are there any clues out there how to by pass this,I can not get certain programs without it ,so I am returning my IPAD,any other programs I can load to get my programs
Apple's iOS platform (iPhone, iPad, and iPod Touch) has never, and will never support flash.
First on this; Thoughts on Flash. This is from Steve Jobs regarding Apple's views on Flash (2010)
Second; Adobe stops making Flash for mobile devices. This is from Adobe themselves last year stating that they would stop making Flash for mobile devices.
If you can find the App equivalent of the programs you are looking for, then congratulations, however, if you require specific 'programs' requiring flash, then the iPad is certainly not for you, and returning it would be the best choice (granted you are still within the return period).
The lesson in this; Research what a device can and cannot do prior to purchase -
V1.5 Export to CSV or TXT and not getting all rows (600K+)
We've recently moved to SQL Developer from a third party application and have been running into issues attempting to export very large queries (600K+ rows). We did find a very helpful article which suggested modifying the sqldeveloper.conf file settings which now will apparently allow us to run the query, but when we go to import into Access where some forecasting routines have been written, not all of the rows are coming into the file. BTW we are running on Windows XP.
Has anyone else seen this?
The 2 changes made to the sqldeveloper.conf file are:
modify to increase to 512: AddVMOption -XX:MaxPermSize=512M
Add this entry: AddVMOption -Xmx768M
We thought increasing the Xmx setting might help, but setting it to 1024M results in a JVM error where the program won't even launch.
Any help or suggestions would be greatly appreciated.
Edited by: user590541 on Jan 13, 2010 5:32 PMCouple of things;
Sure you need the export? ODBC can link dynamically to your Oracle DB.
Sure the export file is missing the rows and it's not Access? Please verify.
If so, you could just export in 2 steps (limiting the export files using the PK or ROWNUM).
Hope that helps,
K. -
ALV: how to disable editable cell and F4 in certain rows only.
I am building a table maintenance front-end with an ALV grid using OOP concept. Certain fields are editable and also have customised search helps assigned to them in the ALV structure defined for the grid. What I want is where I have identified an entry in my database table as being locked by another user, I want to grey the line out on the ALV grid so that the entry cannot be edited and not have f4 input whilst this entry is locked by another user.
I can grey the line out or disable F4 but not both at the same time. If I disable the cells of the row concerned using MC_STYLE_DISABLED, the F4 is still active and will change the contents of the cell concerned via the data_changed event method in CL_GUI_ALV_GRID.
I have used MC_STYLE_DISABLED where I have declared a layout in my table similiar to this:
DATA: BEGIN OF OUTPUT OCCURS 0,
FIELD1,
FIELD2,
STYLE TYPE LVC_T_STYL,
LOCK TYPE C.
END OF OUTPUT.
DATA: ls_celltab TYPE lvc_s_styl.
* Where lock identified, field LOCK set to 'X'.
LOOP AT OUTPUT where lock = 'X'.
ls_celltab-fieldname = 'FIELD1'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
APPEND ls_celltab TO OUTPUT-STYLE.
ls_celltab-fieldname = 'FIELD2'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
APPEND ls_celltab TO OUTPUT-STYLE.
ENDIF.
append OUTPUT.
I have tried adding MC_STYLE_F4_NO to field LS_CELLTAB-STYLE2 but this does not do both actions atthe same time.
Can anyone suggest what I might be doing wrong or an alternative way around this?
Many thanks
Regards
LarissaAs I have explained, I have fields that are editable AND are F4 enabled. What I want is for certain rows of the ALV that I do not want any procesing to occur to make all fields in that row not available for input AND not f4 enabled. I read a lock using a lock object. If the entry in my ALV matches the key locked in the lock object, I want that line to be in display mode only in the ALV with no F4 help being able to be called. It happens on the grid frontend when I press enter and have checked if any of my entries in my ALV are already locked by another user. The code is too long to post here. I can disbale the editable fields using MC_STYLE_DISABLED as described above but then the little drop down to enable F4 input is still visible against the field.
I have got round it by calling the f4 in event HANDLE_ON_F4 to not go via the search help and set er_event_data->m_event_handled = c_yes so that the F4 hit list does not appear, but I want to get rid of the drop down marker in that field in that instance.
Hope this is a little clearer now.
Larissa -
Updating certain rows of table by external file??
Hello gentlemen,
I need your help.I have a very large table.I need to update certain rows of table every day(around 200 per day)
I would like by using an external file (.csv or .txt) to update certain column on the 200 rows i have in the external file.
Can this be done?Do i need to write down a pl/sql procedure?Please help.I am a newbie to pl/sql but it will save me much time every day if i manage to do this.
Thank you in advance for your help.I made a first attempt to create the external table from a .txt file.
I used the below:
CREATE TABLE pol_test
(STATUS VARCHAR2(30 CHAR),
ASFAL VARCHAR2(20 CHAR)
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY def_dir1
ACCESS PARAMETERS
(RECORDS DELIMITED BY STRING
FIELDS (STATUS VARCHAR2(30 CHAR),
ASFAL VARCHAR2(20 CHAR)
LOCATION ('C:\Users\t.christopoulos\Desktop\TEST.TXT')
I get the below error :
Error report:
SQL Error: ORA-06564: object DEF_DIR1 does not exist
06564. 00000 - "object %s does not exist"
*Cause: The named object could not be found. Either it does not exist
or you do not have permission to access it.
*Action: Create the object or get permission to access it.
I suppose that it goes to create the directory on the server where i dont have access.I run these commands from my desktop using SQL developer. -
How do I only get certain questions appear in the quiz results?
I have created a course through Captivate 6, throughout the course there are questions to guage the learners attention. There is also a quiz at the end. However, captivate includes on the questions throughout the course on the quiz results which I do not want to happen.
Can anyone advise how I can only get certain questions appear on the quiz results please?Branch aware turns off the playbar in 6 (not in 7 any more, at least not for me).
Could you explain more in detail what you want, because I don't understand it. You want the user to answer all questions, but the score should only show what? If you don't want some questions to have a score added to the Quiz total, you can indicate that in the Properties of that Question slide.
And please, tell the exact number (3 versions of 6), and also if you have to report to a LMS?
Lilybiri -
Copy a certain row of data into the next row in a same internal table ??
HI, guys.
May i know how to copy a certain row of data into the next row in a same internal table ?? Bcz I plan to update a certain colum of data in the row just now into another value..
For example:-
*at first...
ebeln1 ebelp1 xblnr1
ebeln2 ebelp2 xblnr2
ebeln3 ebelp3 xblnr3
*after that, become...
ebeln1 ebelp1 xblnr1
ebeln2 ebelp2 xblnr2
ebeln2 ebelp2 xblnr4
ebeln2 ebelp2 xblnr5
ebeln3 ebelp3 xblnr3
Thanks in advance.hi,
If you have this kind of requirement then you must be having 2 internal tables ,one existing data and 2nd from which you have to insert the records into 1st table.
so in this case,
loop at itab1.
v_index = sy-tabix.
loop at itab2 into wa where pri_key = itab1-pri_key.
v_index = v_index + 1.
insert wa into itab index v_index.
endloop.
endloop.
Using this code ,your data records similar to your 1st tables primary key records will get inserted into table. -
Cannot get all rows from cfProcResult
We upgraded one of our servers (A) from CF 6 to 7.02. Another
server (B) has CF 7.01.
On server B (CF 7.01) the code works (below), all rows of
each dataset are returned.
Now on server A (CF 7.02) all of the resulting datasets have
only the first record in them. If I add maxrows="-1" to each of the
cfProcResult tags there is no change. If I change that to
maxrows="100" then I can get the rows up to 100.
Is this a bug or is there a different means to return all
rows?It think its a bug. I got the same results under MX 7.0.2.
The topic of maxrows recently came up on another thread. I
did some searching and according to TechNote 18339 there was a
change with maxrow
"<cfquery maxrows=N> bug. ColdFusion MX (until ColdFusion
MX 7.0.1 CHF2) didn't pass maxrows to the underlying driver
(statement.setMaxRows())"
Given the results you're getting, it sounds like CF is
applying the maxrow to all of the resultsets, not just the one
where maxrows was declared. I suspect cfstoredproc's usage of
statement.setMaxRows() is incorrect. Thats just a guess though.
Bottom line, I think you'll need handle it manually.
Personally, I would recommend placing the row count logic in the
stored procedure (if possible). The overall results will be more
consistent and you won't have to worry about this kind of issue
again.
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_18339
http://livedocs.adobe.com/coldfusion/7/htmldocs/00000314.htm
http://www.remotesynthesis.com/blog/index.cfm/2006/3/23/Maxrows-Issue-in-CFQuery -
Hi
I use JDev 11.1 with ADF, i have grid, i need to get selected row of grid when i press buttom, how can i do that?
ThanksHi,
You have a table in your page that is based on a viewObject iterator and you need to get the selected row in your backing bean when you click on a button.
Did I get this right?
If so then you need to add an actionListener on this button that executes a method in the backing bean.
the button code:
<af:commandButton text="commandButton 1" id="cb1"
actionListener="#{myBean.buttonActionListener}"/>In this method you need to add code like this:
public void buttonActionListener(ActionEvent actionEvent) {
BindingContext bindingctx=BindingContext.getCurrent();
DCBindingContainer bindings=(DCBindingContainer)bindingctx;
DCIteratorBinding iter= bindings.findIteratorBinding("iteratorName");
Row currentRow=iter.getCurrentRow();
}If this is not what you need give some more details.
Gabriel -
How to get multiple rows from database table?
hello !
I need to get multiple rows from a OLEDB database table and display them on a table object.
I did "Wrap in subfrom" on the table, set subform of the table to "flowed", and checked "Repeat row for each data item" of Row1 of the table.
But I can get only one row on the table object.
I need your help.
ThanksHi,
best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
Frank -
How do I get Front Row to work with Lion?
Hello fellow Mac users,
How do I get Front Row to work with Lion? I have an iMac 27 inch computer and is the sole entertainment provider for my bedroom. I refuse to put a TV in my room and wanted to know how to get Front Row to work again on my mac? It seems that the upgrade to Lion erased the app.
I have quite a few movies and series that I bought off iTunes and is a shame that I can't use a media center app like Front Row on Lion.I kind of have the opposite problem. I need to know how to turn off my remote on the computer. I am using the remote for my Apple TV and it keeps making the volume on my Computer go up and down (with annoying sounds).
There used to be a way to un-sync the remote with the comp but I cannot remember how and the Apple help is not much help! I have Lion.
Thanks!
Best,
Tony -
How to get selected Row Index in a table based ona VO?
Hi All,
I'm writing an ADF form wherein I use a VO based on a SQL query. I'd like to know how to get the index of a selected row. I havea selection Listener in place where I can print the selected Row's data using getSelectedRowData().toString() on the table.
How can I get certain Attributes from this selected row.
One solution I thought of is to get the row index and then read attributes. But I cant seem to figure out how to get rowIndex for a selected row. Any sugestions?
Using JDeveloper 11g.
Thanks
P.If your selected row is marked as current row you can use
// Get a attribute value of the current row of iterator
DCIteratorBinding iterBind= (DCIteratorBinding)dcBindings.get("testIterator");
String attribute = (String)iterBind.getCurrentRow().getAttribute("field1");Where 'testIterator' is the name of the iterator you use for the table and 'field1' is the name of an attribute you want to get.
Or you can iterate over the selected row keys (even if it's only one):
// get selected Rows of a table 2
for (Object facesRowKey : table.getSelectedRowKeys()) {
table.setRowKey(facesRowKey);
Object o = table.getRowData();
JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)o;
Row row = rowData.getRow();
TestRow testRow = (TestRow)((DCDataRow)row).getDataProvider() ;
}Where TestRow is the row type of the VO of your table.
Timo
Maybe you are looking for
-
Navigational Attribute in Reporting
Hi experts, Suppose I have created one attribute as navigational attribute in my infoobject characteristic.This Characteristic is in Infocube. Now after executing query on this infocube,Can I drilldown from thic characteristic to Navigational attribu
-
There is a serous bug with the app. When I go to edit a photo, there is no undo, just a "x". When I hit this, it removes the photo from the screen, and is no longer in the iPhoto album named "camera roll". It is however still on the devices (iPhone 4
-
How to reload I.O.S .4.2.7 in iphone 4
my I phone is failling to restart after i upgraded it to ios 7 ...how can i get my phone re configured to i os 4 ...my i tunes is not reading my i phone....
-
Differential backup and tlog backup
Hi, What is the advantage of doing a differential backup along with transactional log backup? For instance, if I'm planning on doing a weekly full backup and daily transactional log backups what does doing an differential backup get me? Does it make
-
Hi everyone, I have experience on Java , JSP and Servlet. Want to know how to upgrade to next level. 1.Do I need to learn Spring and Struts togerther? Any good book or resource in the net? 2. EJB 3 or Spring which one is more market value? Thanks