Best Datastructure to store names which are not unique
Suppose you have names like sonia, sagar, suman, sonia, sudipto , abc, pankaj etc
and you need to retrieve values and also insert and delete values. Which datastructure would you consider best for it
Sorry i mean one should be able to step through the collection and search for values.
Also one can insert and remove values
Best datastructure means what would one prefer amongst all the collections
Similar Messages
-
How to compare 2 different database to get table name which are not present in second database
How to compare 2 different database to get table name which are not present in second database
Sorry cannot test it right now
use db1
go
select * from sys.tables t where not exists
(select * from db2.sys.tables s where t.object_id=s.object_id)
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
I want to delete a lot of things childrens stories, albums which are not used which that are on my ipad. However when I go through Itunes it wont show me most of the stuff in my library. it takes ages to delete one at a time.
Can you help please?Thanks King_Penguin for taking time to read and reply.
I just purchased this movie on Thursday, May 15, so just a few days ago. I have never had any trouble whatsoever since I have been in Vietnam. I have downloaded several movies and even music and they have all synced to my respected Apple products except for this purchase.
Sorry, I don't quite understand what you mean by studios and different versions. Could you please explain?
I checked my purchased list in my purchase history under my account and there are no hidden items. -
I'm in India and use Indian iTune store. But there are certain books which are not avaiable in Indian store but are there in US store. How can i get those books?
Hi Jai Shree Hari,
Yeah, I don't see why you shouldn't be able to sign your friend's iTunes sign-on into iTunes, and then use that to download the books. You may need to also authorize your computer in iTunes with that ID in order to be able to re-download them to your device if you ever need to (not sure if this is absolutely required since most things live in the cloud now, but better to be safe than sorry.... ).
Best of luck!
Cheers,
GB -
How to push apps which are not available in the App Store?
Hi :-)
I've got one question: I would like to push apps via profile manager to different devices, which are not available in the App Store, so I can not buy them via VPP.
Example: TeamViewer for OS X.You can't. Use something like Apple Remote Desktop.
-
I am in need of oxford products which are not available in US store
I hope a supporter could give me a solution. I need Oxford's: Literary Criticism, Critical Therory, English Literature and Shakespeare which are not available in the US store. If the only way is to shift my store to UK, I have something around $70 in my balance and I do not want to spend it to zero for a change of Store!
Is there any way?
I will appreciate your help.
Respectfully,
Masoud ShahnazariSorry... But... You cannot use other countries itunes stores.
You must be within the Country with a Valid Billing Address and Credit Card for that Country to use the iTunes Store of that Country...
iTunes Store Terms of Service
http://www.apple.com/legal/itunes/us/terms.html#SERVICE
To Contact iTunes Customer Service and request assistance
Use this Link > Apple Support iTunes Store Contact -
Delete records from tableA which are not in tableB
Table A contains milions of records which is the best way to delete records from tableA which are not in tableB
delete from tableA where empno not in (select empno from tableb)
or
delete from tableA where empno not exists (select empno from tableb
where b.empno=a.empno)
any helpHi
If you can do this, do with this:
create table tableC
as select a.*
from tableA a,
(select empno from tableA
minus
select empno from tableB) b
where a.empno = b.empno;
drop table tableA;
rename table tableC to tableA;
Ott Karesz
http://www.trendo-kft.hu -
How to delete images from folder which are not in the database
I am created windows form
i wont to delete images from the folder where i have stored images but i only want to delete those images which are not in the data base.
i don't know how it is possible . i have written some code
private void button1_Click(object sender, EventArgs e)
string connectionString = "Data Source";
conn = new SqlConnection(connectionString);
DataTable dt = new DataTable();
cmd.Connection = conn;
cmd.CommandText = "select * from tbl_pro";
conn.Open();
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dt);
int count = Convert.ToInt32( dt.Rows.Count);
string[] image1 = new string[count];
for (int i = 0; i < count; i++)
image1[i] = dt.Rows[i]["Image1"].ToString();
string[] image2 = new string[count];
for (int i = 0; i < count; i++)
image2[i] = dt.Rows[i]["Image2"].ToString();
var arr = image1.Union(image2).ToArray();
string[] arrays;
String dirPath = "G:\\Proj\\";
arrays = Directory.GetFiles(dirPath, "*", SearchOption.AllDirectories).Select(x => Path.GetFileName(x)).ToArray();
int b= arrays.Count();
for (int j = 1; j <= b; j++)
if (arrays[j].ToString() != arr[j].ToString())
var del = arrays[j].ToString();
else
foreach (var value in del) // ERROR DEL IS NOT IN THE CURRENT CONTEXT
string filePath = "G:\\Projects\\Images\\"+value;
File.Delete(filePath);
here error coming "DEL IS NOT IN THE CURRENT CONTEXT"
I have to change anything .Will It work alright?
pls help me
SmsHi Fresherss,
Your del is Local Variable, it can't be accessed out of the if statement. you need to declare it as global variable like below. And if you want to collect the string, you could use the List to collect, not a string. the string will be split to chars
one by one.
List<string> del=new List<string>();
for (int j = 1; j <= b; j++)
if (arrays[j].ToString() != arr[j].ToString())
del.Add(arrays[j].ToString());
else
foreach (var value in del)
string filePath = "G:\\Projects\\Images\\" + value;
File.Delete(filePath);
If you have any other concern regarding this issue, please feel free to let me know.
Best regards,
Youjun Tang
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Sync between MacBookPro and iPhone 3G does not sync properly. Calendars duplicate events but worse is that only contacts from Address book from letter T onwards sync. Any contacts on iPhone which are not on Mac are lost during sync.
Solutions?No, I never really found an easy solution. I believe it is an issue with some corruption in the iTunes database on the specific device. In my case, both my iPad and iPhone now show duplicate stream songs if viewed through iTunes on my Mac, but they show different songs. A couple years ago I had a similar issue on my iPhone, and Apple support suggested I back up the phone, completely reset it, and then restore it from the backup. It did work, so I imagine it would probably work for my current issues with the iPhone and iPad. But resetting and restoring an iPad or iPhone always makes me a little nervous that something will get lost. When I did reset/restore the iPhone, I do have to say, the restore process was 100% perfect and I did not lose any data at all even though Apple support said I might. If you try to go that route, I would suggest backing the device up both to a computer through iTunes, and to the iCloud so that you have a double backup.
None of this really resolves the issue with how the iTunes databases are becoming corrupted on the apple devices though, so it is very likely to happen again until they fix it. I have been unable to determine if there were any specific actions or conditions which caused the corruption to happen in the first place.
Might be worth another call to Apple support, or dropping in the local Apple store if you have one near by. -
I'm signed in to my account on my macbook air's apple store, but when I try to update any apps, it has a locked in apple store user which is not mine. I have no idea where this user came from, but I need to update my apps and get this user off my computer. The users email is locked, it is grey in colour and I can not get it off. I've tried my system settings and the app store, logging in does not change the fact that there is a strange email there. I need help, please! I don't know if this is a hack or what, I brought my computer into the shop to get some work done so it may be their account, I just need the account removed.
You installed a hacked app, originally from the Mac App Store. It contains the receipt for a different app, downloaded using an account that you don't control. You need to identify and remove the hacked app.
Important: The app you need to remove is not necessarily the one named in the App Store alert. For example, the App Store may prompt you to update "Angry Birds" or "Twitter," but the hacked app may be something else entirely. Don't make any assumptions about which app you're looking for. To find it, you must carry out a systematic search with Spotlight.
Triple-click anywhere in the line of text below on this page to select it:
kMDItemAppStoreHasReceipt=1
Copy the selected text to the Clipboard by pressing the key combination command-C.
In the Finder, press command-F to open a search window, or select
File ▹ Find
from the menu bar. In the search window, select
Search: This Mac
from the row of tokens below the toolbar. Below that is a popup menu of search criteria, initially showing Kind. From that menu, select
Other...
A sheet will drop down. In that sheet, select
Raw Query
as the criterion, then click OK or press return.
Now there will be a text box to the right of the menu of search criteria. That's where you enter the raw search query. Click in that box and paste the text you copied earlier by pressing command-V.
The search window will now show all the App Store products that are installed. Compare those search results with the list of your purchases from the App Store. To see the complete list, you may need to unhide hidden purchases. If any apps were download from the App Store using other Apple ID accounts that you control, sign in to the store under each of those ID's and check the purchases.
At least one of the apps in the Spotlight search results is not among your purchases in the App Store. Move each such item to the Trash, after quitting it if it's running. You may be prompted for your administrator password. Empty the Trash.
Quit and relaunch the App Store. Test. -
SQL Query to find Receipt No.s which are not matched to AP Invoices
Hi
Please help me to frame a query to find list of Receipt No.s which are not matched with AP Invoices.
Please refer to the below query .
SELECT
poh.segment1 "PO No.",
aps.vendor_name "Supplier Name",
pol.item_description "Item Description",
rcvh.receipt_num "GRV No.s",
rcvl.quantity_received "Quantity",
pol.unit_price "Rate/Unit",
rcvtl.tax_name||' - '||initcap(rcvtl.tax_type) "Tax",
(rcvl.quantity_received * pol.unit_price) + nvl(rcvtl.tax_amount,0) "Amount"
FROM
po_headers_all poh,
po_lines_all pol,
po_distributions_all pod,
ap_suppliers aps,
rcv_shipment_headers rcvh,
rcv_shipment_lines rcvl,
rcv_transactions rcvt,
jai_rcv_line_taxes rcvtl
WHERE
poh.po_header_id = pol.po_header_id
AND poh.po_header_id = pod.po_header_id
AND pol.po_line_id = pod.po_line_id
AND aps.vendor_id = poh.vendor_id
AND aps.vendor_id = rcvh.vendor_id
AND rcvh.shipment_header_id = rcvl.shipment_header_id
AND poh.po_header_id = rcvl.po_header_id
AND pol.po_line_id = rcvl.po_line_id
AND rcvh.shipment_header_id = rcvt.shipment_header_id
AND rcvl.shipment_line_id = rcvt.shipment_line_id
AND poh.po_header_id = rcvt.po_header_id
AND pol.po_line_id = rcvt.po_line_id
AND aps.vendor_id = rcvt.vendor_id
AND rcvh.shipment_header_id = rcvtl.shipment_header_id
AND rcvl.shipment_line_id = rcvtl.shipment_line_id
AND rcvt.transaction_id = rcvtl.transaction_id
AND aps.vendor_id = rcvtl.vendor_id
AND rcvt.transaction_type = 'RECEIVE'
AND poh.authorization_status = 'APPROVED'
AND poh.segment1 = '210001079'
I have'nt included the Invoice Tables in the above query.
Please help me in that area.
This is bit urgent.
Please help me.
Regards
Nakul VenkatramanI am using ORACLE 11gR2 If you're licensed for Diangnostics pack then you might want to look at the AWR tables, e.g. DBA_HIST_SQLSTAT and cross-reference with DBA_HIST_SNAPSHOT.
By this will i get the top 5 consumed queries of DEV user in the whole session or its just the top 5 queries at that particular time. The "executions" columns in this query, does it mean that the no. of. times the query has executed... This will get you a random 5 queries that were first parsed by DEV. Depending on your application code/structure, it may well be that all code (except for system-recursive sql) executed by DEV is parsed by DEV, and all code parsed by DEV is executed by DEV but this isn't true for all.
In terms of top N queries, you need to ORDER BY and then restrict by ROWNUM at an outer level to the ROWNUM otherwise the ROWNUM filter is applied before the ORDER BY.
i.e.
SELECT *
FROM
(SELECT ...
FROM ...
WHERE
ORDER BY...)
WHERE ROWNUM <= ....
The "executions" columns in this query, does it mean that the no. of. times the query has executedYes.
http://download.oracle.com/docs/cd/E11882_01/server.112/e25513/dynviews_3064.htm#REFRN30259
Edited by: Dom Brooks on Oct 24, 2011 9:45 AM -
How can I detect workbooks which are not longer in use?
Hello togehter,
I am looking for a way to detect BEX Workbooks which are not longer in use. Is there something in the BC which I can use for that?
Best would be some query with the information of when and by whom a workbook gets called up last time.
Thanks!
AndreasHi Edward,
there is no key figure providing this information.
First of all you got convert the 0CALDAY from Date to Number, therefore you got to configure a new variable (by replacement path) and put it into a formula.
Use the result of this formula as a column and create a new TOP 1 condition on it.
Now you will only get one row per Workbook/Query (or whatever you have chosen) with the date of the last use of it.
Regards,
Andreas -
Fetching data which are not common
Hi Gurus,
I got an strange requirement it is to fetch data from 2 internal table from the same field name but the values should not be same.can any one tell me some logic for this? eg: fetch matnr from mara and mard into an internal table but the final result in the internal table should be values which are not common in both the tables.
Ragards,
Ravihow can mara and mard will differe in entries. if there is a entry in MARD there should be an entry in MARA since it is master table. so in this case you can do some thing like this.
first get the data from both the tables..
loop at it_mara.
read table it_mard.
if sy-subrc ne 0.
"find the material which is not there in MARD and only in MARA
"append the matnr to another table
endif.
endloop.
may be you have taken a wrong example to describe. -
RFQ which are not converted to PO
I want to diplay all RFQ which are not converted to PO.
Is there any BAPI or FM ?
or How to fetch data ?from which table ?
thanks
kumarI would disagree with the above reply.
I would rather suggest you to use ekpo..
for the rfq no and item query ekpo and pass rfq no and item no in the fields anfnr and anfps. This will give you the PO number/item in ebeln and ebelp.
not the best method... but this works. Or you have to go to the PR of the RFQ and check the status whether PO has been created or not. But you don't always have the RFQ created from PO so this will not be a good option. -
Join 2 tables which are not related with any primary-foriegn key constraint
Hello,
How to join 2 tables which are not related with any primary key foreign key constraint.
Ex.Consider Table A has 5 columns->A_ID,A_Name,A_Address,A_City,A_Pin(Total 10 rows)
Table B has 5 columns->B_ID,B_Name,B_Adress,B_City,B_City(Total 30 rows)
From both the table i want the data,which i need to use in curosr to display finally as "Address Label".
Both the table are entirely different,but there can be some names of Table A which may come in Table B also,if the name,address and city is also same.That means same person in both the table.
So finally i want total number of distinct records(distinct data of Table A which is not in B+all the data of table B) to come under Address Label.
How can i write the select query for this condition?
Thanks
SwapnaHi, Swapna,
user11018268 wrote:
Hello,
How to join 2 tables which are not related with any primary key foreign key constraint.
Ex.Consider Table A has 5 columns->A_ID,A_Name,A_Address,A_City,A_Pin(Total 10 rows)
Table B has 5 columns->B_ID,B_Name,B_Adress,B_City,B_City(Total 30 rows)
Both the table are entirely different,but there can be some names of Table A which may come in Table B also,if the name,address and city is also same.That means same person in both the table.I think you want a UNION, not a join.
If you have 10 rows in table_a, and 30 rows in table_b, then
SELECT A_ID, A_Name, A_Address, A_City, A_Pin
FROM table_a
UNION
SELECT B_ID, B_Name, B_Adress, B_City, B_City
FROM table_b
ORDER BY 2, 4
;will produce up to 40 rows; 40 if there are no duplicates. (UNION implies DISTINCT.)
The corresponding column types should be similar, if not exactly the same.
There's no problem if A_Name is VARCHAR2 (50) and B_Name is CHAR (30).
However, there will be a problem if A_ID is a NUMBER and B_ID is a TIMESTAMP.
You must have the same number of columns in all branches of the UNION.
If you want an ORDER BY clause, put it at the very end, after the last branch of the UNION.
You can use positional notation (where 2 means the 2nd column) like I did, or you can use names from the first prong of the UNION (such as A_Name).
From both the table i want the data,which i need to use in curosr to display finally as "Address Label".
So finally i want total number of distinct records(distinct data of Table A which is not in B+all the data of table B) to come under Address Label.I'm not sure what your mean about "Address Label".
Whenever you have a question, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables, and the exact results (formatted) that you want from that data.
You can concatenate all 5 columns into one VARCHAR2 column, if you want to.
You'll probably want to use RPAD (or simillar functions) to make the output line up nicely.
If any of the columns are not strings, use TO_CHAR to make string versions of them.
For example:
SELECT TO_CHAR (A_ID, '9999999')
|| ' ' -- leave a little space between the left-justified a_id and the right-justified a_name
|| RPAD (A_Name, 25)
|| RPAD (A_Address, 50)
...Edited by: Frank Kulash on Nov 14, 2009 10:11 AM
Maybe you are looking for
-
Method to use to display (n) number of strings
hi, I have a list of strings stored in an array, I need to be able to show these on screen after pressing a button. I am not sure what to use to display these, I setup an action listener on the button to create new JLabel for every string in the arra
-
White background an a TreeNode?
How Do I set the background to white in a three node widget? Im using a tree in a panel, and the default background seems to be gray. How do I change to white? Best Regards / Pontus Hulin
-
Sales Documents released through VKM3 or VKM4, for Credit Check not displayed through VKM2. Reasons thereof???
-
How do I add a new Tool Bar?
I wish to use Firefox as my browser - However, I would like to add the OBA-TEP Tool bar, if I can't, then Firefox will be of no use to me. Can somebody Help please?
-
[Solved] Fresh install; HAL won't start?
So I just finished a fresh installation and now I can't start X because HAL won't start up at all. I haven't messed around with anything except for installing everything and fixing up my config files. Seems like HAL is crashing because of permissions