Home > front end >  Schedule of generic micro e - cology8 text table assignment text fields
Schedule of generic micro e - cology8 text table assignment text fields

Time:10-01

As title, list has made a text field, now want to schedule a text field splicing (because it is possible for multiline list) after the assigned to the main table text field, written in SQL field properties, but only to realize query, write less than in the database, estimates that need to use js, thanks

CodePudding user response:

You are the employees of the micro internal? I want to download the project of the micro cannot download down, I only look at the most e - cology page before account without permission

CodePudding user response:

reference 1/f, xiaoxiang dream response:
you are the employees of the micro internal? I want to download the project of the micro cannot download down, I only look at the most e - cology page account without permission before

No, our company have bought the system of the micro

CodePudding user response:

Save the redundant information is not recommended, can change it, you can query, why still have one more time?

CodePudding user response:

Hello World reference 3 floor, response:
save the redundant information is not recommended, can change it, you can query, why still have one more time?

I do this is to achieve the purpose of the content of the list can be assigned to the main table text fields, but because of lack of ability, so now can only schedule of implementation of assignment query, query can't write the content of the database, then transferred to the main table can be realized

CodePudding user response:

Have not used, if is to support the JS, combined together in a field before submission,
With the trigger should also can do, the main table will save, save as the field empty (avoid repetition), now update correctly when a child table to save the main table field, you add in the current row data,

CodePudding user response:

Hello World reference 5 floor, response:
unused, if is to support the JS, combined together in a field before submission,
With the trigger should also can do, the main table will save, save as the field empty (avoid repetition), now update correctly when a child table to save the main table field, you add in the current row data,


Can you give a demo is ability is limited

CodePudding user response:

Trigger about like this:
 CREATE TRIGGER [the main table XXXX TRIGGER] 
Table ON dbo.
AFTER INSERT, UPDATE
AS
IF the UPDATE (field) - here to avoid some cases only updates the main table, do not UPDATE the child table
The UPDATE inserted SET Note=' ';

CREATE the TRIGGER [child table XXXX TRIGGER]
ON dbo. Child table
AFTER INSERT, UPDATE
AS
- conditional best judgment whether to update the data in the child table of one alone, but not all
UPDATE m
The SET Note=m.N ote + ', '+ i.N ote
The FROM inserted I
INNER JOIN the main table m ON i.P ID=m.I D;

- once the following article update all child table remarks to the main table, can avoid updates only a part of the child table note not all problems, choose a execution can
UPDATE m
The SET Note=STUFF (
(SELECT the ', '+ Note s the WHERE clause table's ID=i.P ID FOR XML PATH ('')),
1, 1)
The FROM inserted I
INNER JOIN the main table m ON i.P ID=m.I D;

CodePudding user response:

Hello World reference 7 floor, response:
trigger about like this:
 CREATE TRIGGER [the main table XXXX TRIGGER] 
Table ON dbo.
AFTER INSERT, UPDATE
AS
IF the UPDATE (field) - here to avoid some cases only updates the main table, do not UPDATE the child table
The UPDATE inserted SET Note=' ';

CREATE the TRIGGER [child table XXXX TRIGGER]
ON dbo. Child table
AFTER INSERT, UPDATE
AS
- conditional best judgment whether to update the data in the child table of one alone, but not all
UPDATE m
The SET Note=m.N ote + ', '+ i.N ote
The FROM inserted I
INNER JOIN the main table m ON i.P ID=m.I D;

- once the following article update all child table remarks to the main table, can avoid updates only a part of the child table note not all problems, choose a execution can
UPDATE m
The SET Note=STUFF (
(SELECT the ', '+ Note s the WHERE clause table's ID=i.P ID FOR XML PATH ('')),
1, 1)
The FROM inserted I
INNER JOIN the main table m ON i.P ID=m.I D;


I learn, but had only seen others write js, trigger more didn't contact with the

CodePudding user response:

refer to the eighth floor qixifeifei response:
Quote: Hello World, reference 7 floor response:

Trigger about like this:
 CREATE TRIGGER [the main table XXXX TRIGGER] 
Table ON dbo.
AFTER INSERT, UPDATE
AS
IF the UPDATE (field) - here to avoid some cases only updates the main table, do not UPDATE the child table
The UPDATE inserted SET Note=' ';

CREATE the TRIGGER [child table XXXX TRIGGER]
ON dbo. Child table
AFTER INSERT, UPDATE
AS
- conditional best judgment whether to update the data in the child table of one alone, but not all
UPDATE m
The SET Note=m.N ote + ', '+ i.N ote
The FROM inserted I
INNER JOIN the main table m ON i.P ID=m.I D;

- once the following article update all child table remarks to the main table, can avoid updates only a part of the child table note not all problems, choose a execution can
UPDATE m
The SET Note=STUFF (
(SELECT the ', '+ Note s the WHERE clause table's ID=i.P ID FOR XML PATH ('')),
1, 1)
The FROM inserted I
INNER JOIN the main table m ON i.P ID=m.I D;


I learn, but had only seen others write js, trigger more didn't contact with the


I wrote this part out, js, but encountered some problems, could you advice

CodePudding user response:

Hello World reference 7 floor, response:
trigger about like this:
 CREATE TRIGGER [the main table XXXX TRIGGER] 
Table ON dbo.
AFTER INSERT, UPDATE
AS
IF the UPDATE (field) - here to avoid some cases only updates the main table, do not UPDATE the child table
The UPDATE inserted SET Note=' ';

CREATE the TRIGGER [child table XXXX TRIGGER]
ON dbo. Child table
AFTER INSERT, UPDATE
AS
- conditional best judgment whether to update the data in the child table of one alone, but not all
UPDATE m
The SET Note=m.N ote + ', '+ i.N ote
The FROM inserted I
INNER JOIN the main table m ON i.P ID=m.I D;

- once the following article update all child table remarks to the main table, can avoid updates only a part of the child table note not all problems, choose a execution can
UPDATE m
The SET Note=STUFF (
(SELECT the ', '+ Note s the WHERE clause table's ID=i.P ID FOR XML PATH ('')),
1, 1)
The FROM inserted I
INNER JOIN the main table m ON i.P ID=m.I D;

I written in js, but now I have a small problem, original intention is to want to put the schedule of the text field pieced together, but now does not implement, just put the last line of text assignment, can help you see

CodePudding user response:

Don't know what your code, and I don't know what your pagenullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related