Состояние sql 23000 код ошибки 177

Ошибка создания связи

Общие советы :

1) все данные (и виды платежей) — в одной плоской таблице (без каких-либо объединений ячеек) на одном(!) листе. Разделы «по счету», «по счетчику(по факту)» и «контроль» — это просто дополнительные столбцы справа.

2) вверху оставьте 10 строк для формул «итого», они всегда видны, т.к. область с формулами» закреплена»  

3) Долг и переплата — это всегда одна строка,  переплату можно ставить красным (формат ячейки — Отрицательное красным)

4) Из-за перерасчетов задним числом и смены тарифов — «помесячные итоги» не так полезны для анализа, как «нарастающий с начала года» или вообще «с начала времен». Я бы внес все квитки с начала года, добавил к январскому сумму долга/переплаты.  

5) Т.к. квитанция состоит всегда из 5 строк (Эл.Д, Эл.Н, ХВС, Вывоз ТКО, Утилизация ТКО) — то сразу их скопировать на 2 года вперед. Т.к. тариф меняется условного говоря «раз в полгода» и долго действует — сослаться формулами апреля — на март итд. И когда тариф эл. энергии станет не 2,83 а 4 — просто в том месяце перебиваем формулу на значение 4.

6) Нужно освоить функцию =СУММЕСЛИ(). Формула, которая суммирует все Дн. киловатты (по счету, счетчику и разницу) с начала года будет выглядеть так: =СУММЕСЛИ(Вид;’ЭлДень’;ПоСчету)
=СУММЕСЛИ(Вид;’ЭлДень’;ПоСчетчику)
=СУММЕСЛИ(Вид;’ЭлДень’;Отклон)
Чтобы можно было так легко писать и понимать формулы — нужно дать имена столбцам (точнее их диапазонам с 11-й по, скажем, по 71-строку, вперед на 5 лет). Для этой цели часто делают «официальную» шапку таблицы и ниже, через 1 пустую строку — дублируют её же краткой одной строкой «полей», в ней все слова без пробелов «Электроэнергия День кВт.ч» -> «ЭлДень». Понятности это не уменьшит, а вот скорость написания формулы вырастет пятикратно. Имена диапазонов можно тогда не создавать — Calc сам поймет где находится столбец «ЭлДень», с какой ячейки начинается и где заканчивается.

7) Самым левым столбцом делают «Период», вводят дату, скажем 31.01.18, 28.02.18. а в формате ячейки — Январь 18, Февраль 18 итд. После включения автофильтра на строке «полей», отделенной от «шапки» пустой строкой — появятся значки Автофильтра и возможность легко отбирать нужный период или нужный вид платежа в Автофильтре.

8) Чтобы автосуммировать видимое (прошедшее фильтр) — нужно освоить функцию =ПРОМЕЖУТОЧНЫЕ.ИТОГИ(9;СЧЕТ)

Полученная плоская таблица обладает громадным плюсом, она все-в-одном, логически целостна. Если захочется сделать по ней отчет — изучаем Сводные таблицы и диаграммы и делаем их на 2-м листе. Но даже просто =ПРОМЕЖУТОЧНЫЕ.ИТОГИ() даст вам информацию о среднем, максимальном, минимальном значении чего угодно за любой период, который выбирается Автофильтром.

Я плачу раз в полгода (ненавижу этот процесс и очереди, т.к. УК до сих пор работает только через ГРЦ-кассы, безнал никак, руководы УК по доброй российской традиции в федеральном розыске), — то оплату я ввожу одной строкой «между» квитанций (заплатил 10/03 — 45 тыс. руб.) Формула у меняя сама делит сумму одного платежа (45 тыс. руб.) на 108 отдельных чисел (по видам платежей). Это достигается суммированием накопленного долга с остатками долга и пени, пропорциональным делением. УК делает все точно так же, и когда с ними спорю — нахожу понимание. Разбивать 45 тр. на 6 квитанций х 6 видов платежей х 3 вида (недоимка/пеня/перерасчет) = 108 цифр — считаю пустой тратой времени. Учетные программы в УК и ТСЖ делают точно так же.

In the video you cite, this is kind of silly as there is no need for a many to many relationship. The author could have simply added a Movie ID field to the genre Table, (so multiple genre records can point to each movie record).

I have a complex many-to-many contacts structure that I’m in the process of porting from MS Access to LibreOffice. It has 4 primary data tables: Groups, Address, Phones, and People. And there are 6 link tables to connect those primary tables: GroupAddress, GroupPhone, GroupPerson; AddressPhone, AddressPerson; and finaly PhonePerson. Unlike the video you cite above with only 2 fields, in my link tables there are 3 fields. GroupAddress for example has GroupAddressID (the unique id for the link table itself), GroupID (which points to the Groups table), and AddressID (which points to the addresses table). This allows any number of addresses per each group, and at the same time, any number of groups per each address.

So the whole thing has maximum data flexibility: For example it allows for unlimited number of people per group, each person can have an unlimited number of phones or addresses, each address an unlimited number of people, etc.

Implementing it in LO: Because in LO you can’t edit a query based on more than one table (you can view it, but not edit it), like you can in Access, (and therefore you also can’t build a form with a table that can edit a query based on more than one table), in LO this is not as clean as it is in Access.

In Access it works very well and the link tables manage themselves! In LO you have to manually edit the link tables in a separate table. I’m starting to think about how I might use some macros to improve on this, but for the moment it’s bare bones.

To give you a better idea, the first form to edit Groups, which also edits the group’s addresses, people, and phones (not just those tables, but also the links to those tables) looks like this:


Group lookup pulldown (used to find a group record)  
(this is a drop down box with custom code that helps me find group records)

Group editing fields, e.g. Group name, category, url, etc

Then below that

Group-Person links table

Then to the right of that

Persons table (plural) - to create new person, then..  

And below that

Person table (singular)   
 [pointed to by Group-Person link]  
 to view person pointed to.

Group-Address links || (similar structure to above)
(for example, when a business has two or more addresses)


Group-Phone links || (similar structure to above)
(this is for phone#’s that the group owns directly, not personal phones of the group’s members, and not phones tied to specific addresses).

———-

Then there are 3 other similar forms,

one for Addresses w/ Person, Group & Phone links;

one for Phones w/ Group, Address & Person links;

and one for People w/ Group, Address and phone links;

Here is a screen shot of the first of the 4 editing forms, to edit the groups and the links associated with the group:

enter image description here

Hope this helps. I would be interested to see what you develop. Thanks.

In the video you cite, this is kind of silly as there is no need for a many to many relationship. The author could have simply added a Movie ID field to the genre Table, (so multiple genre records can point to each movie record).

I have a complex many-to-many contacts structure that I’m in the process of porting from MS Access to LibreOffice. It has 4 primary data tables: Groups, Address, Phones, and People. And there are 6 link tables to connect those primary tables: GroupAddress, GroupPhone, GroupPerson; AddressPhone, AddressPerson; and finaly PhonePerson. Unlike the video you cite above with only 2 fields, in my link tables there are 3 fields. GroupAddress for example has GroupAddressID (the unique id for the link table itself), GroupID (which points to the Groups table), and AddressID (which points to the addresses table). This allows any number of addresses per each group, and at the same time, any number of groups per each address.

So the whole thing has maximum data flexibility: For example it allows for unlimited number of people per group, each person can have an unlimited number of phones or addresses, each address an unlimited number of people, etc.

Implementing it in LO: Because in LO you can’t edit a query based on more than one table (you can view it, but not edit it), like you can in Access, (and therefore you also can’t build a form with a table that can edit a query based on more than one table), in LO this is not as clean as it is in Access.

In Access it works very well and the link tables manage themselves! In LO you have to manually edit the link tables in a separate table. I’m starting to think about how I might use some macros to improve on this, but for the moment it’s bare bones.

To give you a better idea, the first form to edit Groups, which also edits the group’s addresses, people, and phones (not just those tables, but also the links to those tables) looks like this:


Group lookup pulldown (used to find a group record)  
(this is a drop down box with custom code that helps me find group records)

Group editing fields, e.g. Group name, category, url, etc

Then below that

Group-Person links table

Then to the right of that

Persons table (plural) - to create new person, then..  

And below that

Person table (singular)   
 [pointed to by Group-Person link]  
 to view person pointed to.

Group-Address links || (similar structure to above)
(for example, when a business has two or more addresses)


Group-Phone links || (similar structure to above)
(this is for phone#’s that the group owns directly, not personal phones of the group’s members, and not phones tied to specific addresses).

———-

Then there are 3 other similar forms,

one for Addresses w/ Person, Group & Phone links;

one for Phones w/ Group, Address & Person links;

and one for People w/ Group, Address and phone links;

Here is a screen shot of the first of the 4 editing forms, to edit the groups and the links associated with the group:

enter image description here

Hope this helps. I would be interested to see what you develop. Thanks.

Uiop541

Posts: 2
Joined: Wed May 25, 2016 5:18 am

Database error code -177

Working on an online school project with database and I need to finish this class ASAP and I was wondering if any of you could help me with this error message I’m getting?

Attachments
Community Service.odb
Actual File
(32.29 KiB) Downloaded 88 times
Picture of Error Message
Picture of Error Message

OpenOffice 4 on Windows 10

FJCC

Moderator
Posts: 8804
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Help ASAP Database error code -177

Post

by FJCC » Wed May 25, 2016 5:37 am

What are the column types of Organizations.OrganizationName and VolunteerHours.OrganizationName? They should be the same type. You can check the type by going to the table pane, right clicking on the table icon and selecting Edit.

OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.

eremmel

Posts: 1076
Joined: Tue Dec 30, 2008 1:15 am

Re: Help ASAP Database error code -177

Post

by eremmel » Wed May 25, 2016 11:49 am

There are more aspects that define a type than only the keyword ‘VARCHAR’, The type of a text field is ‘VARCHAR(N)’ with N the max expected length in characters. Now rethink your relation definition….
In theory you can only make a relation between from fields f1 to f2 that have the types VARCHAR(n1) and VARCHAR(n2) when n1 < n2, but I will not be surprised that the constrain is even more restricted to: n1 == n2.

It’s Microsoft marketing that tells you computers are qualified for non-technicians
W11 21H2 (build 22000), LO 7.4.1.2(x64)

UnklDonald418

Volunteer
Posts: 1501
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Help ASAP Database error code -177

Post

by UnklDonald418 » Wed May 25, 2016 7:22 pm

I downloaded your “Community Service.obd” in your post
In your «Organizations» table «OrganizationName» is type [VARCHAR IGNORE CASE]
In your «Volunteer Hours» table the foreign key «OrganizationName» is type [VARCHAR]. While similar they are still different types.
By the way even after changing them to matching types you may need to re-enter your data in that column of the «Volunteer Hours» table before it will work.

If your problem has been solved, please edit this topic’s initial post and add «[Solved]» to the beginning of the subject line
Apache OpenOffice 4.1.2 & LibreOffice 6.4.7.2 — Windows 10 Professional

Понравилась статья? Поделить с друзьями:
  • Сочинение огэ признать свои ошибки
  • Сообщить об ошибке на сайте яндекс
  • Состояние hdd тревога как исправить
  • Сочинение на тему типичные грамматические ошибки
  • Сообщить об ошибке дота 2