insert-update

VBA-SQL UPDATE/INSERT/SELECT to/from Excel worksheet

北城余情 提交于 2019-12-01 01:53:23
问题 In a nutshell: I'm making a scheduler for my client and, due to constraints, it needs to be in a single excel file (as small as possible). So one worksheet works as the UI and any others will be tables or settings. I'm trying to use SQL (to which I'm new) to work with the schedule data on a single worksheet (named "TblEmpDays"). So I need to add/update and retrieve records to/from this worksheet. I was able to get a SELECT query to work with some arbitrary data (and paste to a Range). However

Sparql query doesn't upadate when insert some data through java code

徘徊边缘 提交于 2019-12-01 00:45:17
I'm trying to insert data through my java code to the owl file which is loaded into Fuseki server. Update query doesn't give any error message. But owl file doesn't update.I'm using jena library and implemented using java code. What is the wrong in my code? public boolean addLecturerTriples(String fName, String lName, String id, String module) { try{ ArrayList<String> subject = new ArrayList<String>(); ArrayList<String> predicate = new ArrayList<String>(); ArrayList<String> object = new ArrayList<String>(); subject.add("<http://people.brunel.ac.uk/~csstnns/university.owl#"+fName+">");

how to update core data entered values

不想你离开。 提交于 2019-11-30 20:40:20
[newVehicle setValue: _txtFieldVehicleNumber.text forKey:@"number"]; [newVehicle setValue: lblFuelType.text forKey:@"fueltype"]; [newVehicle setValue: lblFuelUnit.text forKey:@"fuelunit"]; [newVehicle setValue: lblDistanceUnit.text forKey:@"distanceunit"]; I want to update my core data entity named "Vehicle", for that entity I have several attributes and I want to update some of them but not all when I select particular attribute from the entity. So what should I do ?? you can do the following (approximate code. Implement error handling and check syntax). NSFetchRequest *fetchRequest=

PostgreSQL create a new column with values conditioned on other columns

我是研究僧i 提交于 2019-11-30 19:11:29
I use PostgreSQL 9.1.2 and I have a basic table as below, where I have the Survival status of an entry as a boolean (Survival) and also in number of days (Survival(Days)) . I have manually added a new column named 1-yr Survival and now I want to fill in the values of this column for each entry in the table, conditioned on that entry's Survival and Survival (Days) column values. Once , completed the database table would look something like this: Survival Survival(Days) 1-yr Survival ---------- -------------- ------------- Dead 200 NO Alive - YES Dead 1200 YES The pseudo code to input the

Sparql query doesn't upadate when insert some data through java code

六月ゝ 毕业季﹏ 提交于 2019-11-30 18:49:45
问题 I'm trying to insert data through my java code to the owl file which is loaded into Fuseki server. Update query doesn't give any error message. But owl file doesn't update.I'm using jena library and implemented using java code. What is the wrong in my code? public boolean addLecturerTriples(String fName, String lName, String id, String module) { try{ ArrayList<String> subject = new ArrayList<String>(); ArrayList<String> predicate = new ArrayList<String>(); ArrayList<String> object = new

How to update elements within a heap? (priority queue)

瘦欲@ 提交于 2019-11-30 14:59:22
问题 When using a min/max-heap algorithm, priorities may change. One way to handle this is to removal and insert the element to update the queue order. For priority queues implemented using arrays, this can be a performance bottleneck that seems avoidable, especially for cases when the change to priority is small. Even if this is not a standard operation for a priority queue, this is a custom implementation which can be modified for my needs. Are there well known best-practice methods for updating

how to update core data entered values

◇◆丶佛笑我妖孽 提交于 2019-11-30 05:03:13
问题 [newVehicle setValue: _txtFieldVehicleNumber.text forKey:@"number"]; [newVehicle setValue: lblFuelType.text forKey:@"fueltype"]; [newVehicle setValue: lblFuelUnit.text forKey:@"fuelunit"]; [newVehicle setValue: lblDistanceUnit.text forKey:@"distanceunit"]; I want to update my core data entity named "Vehicle", for that entity I have several attributes and I want to update some of them but not all when I select particular attribute from the entity. So what should I do ?? 回答1: you can do the

Update or replace an embedded document in MongoDB collection

久未见 提交于 2019-11-29 17:36:45
I have following data structure: db.objects { "_id" : 1, "name" : "object name", "type" : "rectangle", "area" : { "position_x1" : 0, "position_y1" : 0, "position_x2" : 0, "position_y2" : 0 }, "dimension" : { "width" : 0, "height" : 0 } } I want to replace/update "area" and "dimension" separately for a document in objects collection with "_id" = 1. [?] Please let me know how can i achieve using MongoDB C# driver. This is a very simple use of the $set operator. So essentially the update form is: db.objects.update( { "_id": 1 }, { "$set": { "area": { /* all of your object properties */ },

I can not update a record in Parse; Error: “object not found for update (Code: 101, Version: 1.2.16)”

梦想的初衷 提交于 2019-11-29 09:23:09
I am using Parse as my backend for one of my native iOS app. I am not able to update a record on a table in Parse. First I query the object that I want to update it. So, "objects" array returns 1 record but when I want to update it I get the following error; "object not found for update (Code: 101, Version: 1.2.16)" So what do you think I can not update a record in Parse? (Below is my code) Thanks, E. PFQuery *query = [PFQuery queryWithClassName:@"askedFriends"]; [query whereKey:@"questionID" equalTo:aqDt.questionID]; [query whereKey:@"fbID" equalTo:FbId]; [query

How to improve INSERT performance on a very large MySQL table

孤人 提交于 2019-11-29 06:51:01
I am working on a large MySQL database and I need to improve INSERT performance on a specific table. This one contains about 200 Millions rows and its structure is as follows: (a little premise: I am not a database expert, so the code I've written could be based on wrong foundations. Please help me to understand my mistakes :) ) CREATE TABLE IF NOT EXISTS items ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(200) NOT NULL, key VARCHAR(10) NOT NULL, busy TINYINT(1) NOT NULL DEFAULT 1, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, PRIMARY KEY (id, name), UNIQUE KEY name_key_unique