Topic: Insert the "simple" elements in the nomenclature without reporting all

Hi Scorpio810,


This will be silly, but having never worked with databases, I'm having a hard time generating a complete nomenclature.
As long as I leave that base:

SELECT label, function, folio, position, designation, title, comment FROM element_nomenclature_view WHERE ( element_sub_type = 'commutator' OR element_sub_type = 'coil' OR element_sub_type = 'protection') ORDER BY label, function, folio, position, designation, title, comment

All ok, 2 pages in total.
However, "simple" items are not listed.
If I also activate the "simple" box, a huge amount of 'unwanted' elements are signaled... (10 pages)...
How can I "filter" simple components like switches, switching power supplies, displays... that don't have cross references (master-slave).

If I want them to be listed in the nomenclature how can I do without ALL being generated?
for example. set any field like unit, quantity, installation or other?.

Thank you.

Re: Insert the "simple" elements in the nomenclature without reporting all

scorpio810 wrote:

Hello,

see my post here:
https://qelectrotech.org/forum/viewtopi … 256#p16256

Regards,
Laurent

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: Insert the "simple" elements in the nomenclature without reporting all

I have already seen it...
it doesn't matter, thanks.

Re: Insert the "simple" elements in the nomenclature without reporting all

olá,

em meus projetos necessito contar a metragem de cabos para a instalação, assim observei um necessidade de alterar o SQL de exportação da lista de elementos utilizados.

com isso também adicionei o campo de unidade, pois alguns itens obviamente são fornecidos em peças, metros, pacotes ou caixas.

assim em cada elementos utilizado eu uso os dois campos, o de unidade e o de quantidade.

o arquivo SQL que alterei ainda soma os itens em um total, mas ao mesmo me da a quantidade que eu adiciono, por exemplo em cabos que ligam motores e sensores e afins.

segue cod.


SELECT manufacturer, description, designation, machine_manufacturer_reference, supplier, SUM(quantity) AS total_quantity, unity, COUNT(*) AS designation_qty  FROM element_nomenclature_view WHERE ( element_type = 'terminal' OR element_type = 'simple' OR element_sub_type = 'commutator' OR element_sub_type = 'coil' OR element_sub_type = 'protection') GROUP BY designation ORDER BY manufacturer, description, designation, machine_manufacturer_reference, supplier, quantity, unity


e também um exemplo de projeto e o arquivo CSV.

acredito que tenha algo a melhorar, e muitos dos elemetos ainda não acabei de nomencalaturar, mas para  a minha utilização já estou contente.

espero ter ajudado

Post's attachments

Attachment icon exemplo.rar 1.14 mb, 13 downloads since 2024-04-13 

Attachment icon nomenclature_exemplo.csv 4.29 kb, 16 downloads since 2024-04-13 

Re: Insert the "simple" elements in the nomenclature without reporting all

And in understandable English ???

Always using the latest development version

Re: Insert the "simple" elements in the nomenclature without reporting all

gg translate:

jhonathan disner wrote:

hello,

In my projects I need to count the cable footage for installation, so I noticed a need to change the export SQL of the list of elements used.

With this I also added the unit field, as some items are obviously supplied in pieces, meters, packages or boxes.

So in each element used I use both fields, the unit and the quantity.

The SQL file that I changed still adds the items into a total, but at the same time it gives me the quantity that I add, for example in cables that connect motors and sensors and the like.

follow code.


SELECT manufacturer, description, designation, machine_manufacturer_reference, supplier, SUM(quantity) AS total_quantity, unity, COUNT(*) AS designation_qty FROM element_nomenclature_view WHERE ( element_type = 'terminal' OR element_type = 'simple' OR element_sub_type = 'commutator' OR element_sub_type = 'coil' OR element_sub_type = 'protection') GROUP BY designation ORDER BY manufacturer, description, designation, machine_manufacturer_reference, supplier, quantity, unity


and also an example project and the CSV file.

I believe there is something to improve, and many of the elements I haven't finished naming yet, but for my use I'm already happy.

Hope this helps

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."