Two entries on my Django postgresql database are causing me a world of trouble when I go a-querying to create reports. When I try to delete these entries (via phpPgAdmin), I get the error "No unique identifier for this row." There are no duplicate IDs. I've tried updating all the fields. I've tried getting rid of these using the delete button and manual SQL commands. I'm out of ideas. Anyone know hot to give a row a unique identifier so I can get rid of it?
Thanks!
Look up the row by the special ctid system column and then delete by that value. ctid's are unique.
The rows you are going to delete may be referenced in another table.
remove them or refer them to something else and, then try to remove your given rows.
Related
I have a problem with creating a unique existing field.
Standard Object - Account;
Field - EMail (several instances of the Account object with the same mail have already been created).
I want to make the field unique (do not repeat the values), how can I solve the problem with the existing data correctly? If through the method "point and click" to act, then an error is generated:
Error: Duplicate value (s) found when building unique index, example: blabla # gmail.com on rows
You'll have to delete the records (or maybe just clear the email fields on some?) before you can apply unique index. Salesforce has duplicate rules, you could use them to find matches, maybe the answer is to use merge operation, not delete? You can merge manually or with Apex. Or just run a report on Accounts grouped by email, sort by count descending and see what needs fixing.
If that bad data has to stay as is - best would be to configure duplicate rules to look at the field and prevent creating new? In this trailhead 2nd module has some screenshots that show how you can configure it to BLOCK inserts & updates. Not as good as true unique field but it's something...
Worst case you could cheat a bit. I mean depending on address if it's gmail then googlemail.com works, putting dots in the part before #... Won't work with all addresses though.
I just want to delete one record from this table. So, i click delete button but it show this error.
You specified a WHERE statement, but you didn't execute any term. Either remove the WHERE statement (which deletes a random item from the table (thanks #DanFromGermany) or add the term
if you clicked on the delete link, try to check the row before
A possible cause for this behaviour is when you fire a query that does not include a primary key in the output. phpMyAdmin then does not know which column identifies a selected row.
Can you verify this?
Another thing is, your phpMyAdmin looks outdated, can you try the same thing with an up to date version?
I am new to Outsystems and SQL. I am try to create a Bus Application where the entities are
When I try to create a new rider with the same name and different Route and bus Id. I get
Cannot insert duplicate key row in object 'dbo.OSUSR_6SL_RIDER' with unique index 'OSIDX_OSUSR_6SL_RIDER_4NAME'. The duplicate key value is (ABC).
The statement has been terminated.
When I check Name field in the database table 'dbo.OSUSR_6SL_RIDER' it is not having the unique identifier set up. Can anybody please help me with this.
Open the Indexes tree under your table. You will find an Index named 'OSIDX_OSUSR_6SL_RIDER_4NAME'.
Script out that Index and you will see that it is a UNIQUE index on a "name" column that you are trying to create a duplicate value in.
You must either change that Index to include Route and Bus ID, or you must abandon your attempt to create a new row with a duplicate name.
It looks like you are are creating an exact duplicate, i.e. a record with the same Id value. The index name it refers to seems to be auto generated by the db system. Therefor it is not necessarily referring to the Name field. Have a look at your indexes and look at the fields they contain. I wouldn't be surprised if OSIDX_OSUSR_6SL_RIDER_4NAME contains the Id field.
If you are using the OutSystems platform, all the database management is done/generated when you publish from Service Studio, so it isn’t advisable to manipulate the database directly: you’re setting yourself up for a lot of maintenance pain and inconsistencies between different environments.
Double-click on the Entity Rider and it’ll open the edit window of your entity. In the Indexes tab you can define and change your indexes (unique or not) and the tool will (re)generate all the needed SQL commands.
See OutSystems Platform 9 Help | Indexes Tab for more details:
I am very new to MS Access and I am struggling with some things that seem like they should be the most basic. I have imported a table of data from Excel and have defined the data types for the fields. I have no problem there, but now I want to make a new table that has as a primary key one of the fields from the imported table. It looks like I can manually create this table, set the relationship, and then go back and type in each record associated with the new primary key, but this seems completely ridiculous. Surely there must be a way to automatically create one record for each unique instance in the matching field from the original table. Yet, I've scrolled through hundreds of pages of Access tutorials and Googled the question and found no satisfactory guidance.
Do I completely misunderstand what Access is all about? How do I create a new table with entries from a field on an existing table? What am I missing?
You don't specify which version of Access you are using, the suggestions listed below apply to 2010, but should be similar is other versions.
You can create new tables from existing tables using either a 'Make Table' option after selecting 'Create' -> 'Query Design', or you can manually create your table first, then use an 'Append' query.
Without knowing the design of your table it's hard to get more descriptive.
Are you populating your new table's primary key ahead of time, or relying on Auto Number to do it (preferred method)?
I have been trying to find out what happens in SharePoint when we select a column as index column? I mean what happens in back end(database level)? I tried many articles but they just say that it improves performance but they don't say how. I found this question and others related to performance but I couldn't get a complete picture.
SharePoint mark the column index enabled, and then add records with item identifier and index field id and value to sql table NameValuePair_[loc].