Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
Can trigger can be explicitly called ?
I got question like
Trigger can be
a)Implicit
b)Explicit
c)Both
Is there any way to call Trigger Externally ?
From the first paragraph of the overview of triggers (emphasis added):
Like a stored procedure, a trigger is a named PL/SQL unit that is stored in the database and can be invoked repeatedly. Unlike a stored procedure, you can enable and disable a trigger, but you cannot explicitly invoke it.
So no, a trigger cannot be explicitly called.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last month.
Improve this question
I need all reports with all officers included in the participants column.
please check the attached image.
https://prnt.sc/CRoELD48J-L5
You should really have a participant pivot table with report_id and officer_id, and create proper relationships.
What you're asking for is possible through loops and lazy loading, but it will be extremely slow and unoptimized.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I have fetched the data from the database, but I need to make changes to that collection or arrays of collection. Whenever I made changes; these remain limited to the scope of function, so, when the function called again that collection reset to their previous values.
Is there any way to change/edit the laravel collection (the root instance without copying the data like with map(), each())?
To modify the original Collection, you'll want to use transform.
From the docs:
Unlike most other collection methods, transform modifies the collection itself. If you wish to create a new collection instead, use the map method
In most cases I find that map or each is really the appropriate method, but I find this method is especially useful when needing to modify paginated results from a query.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I need to create a trigger that dont let enter dates before the actual date in all the tables of the database.
CREATE OR REPLACE TRIGGER t_date
BEFORE INSERT ON ?
FOR EACH ROW
So how can i refer to all the tables that have DATE as data type?
You can't.
A trigger can be defined on only one table. If you want to enforce the rule on every table in the schema, you would need to create a separate trigger on each table in the schema.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I want to know whether table a, table b etc. exist in the select query.So when I copy the query into the vim editor, can anybody write a command to find the tables?
Well you can use
:g/\(tableA\|tableB\|youGetThePoint\)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I need to clone a table of a database which exists in a different servers.
e.g.On server A there is a database called EmployeeDataBase which has a table t1 which I need to copy to the database called EmployeeDataBase which exists on Server B.
How to do it using linq query.
My application uses linq to entity.
Thanks
If the tables have the same definition you can use the same mappings, just you need to create different contexts using the appropriate connection strings.
var ctxSource = new EmployeeDataBaseContext("[source connection]");
var ctxDestination = new EmployeeDataBaseContext("[destination connection]");
ctxDestination.t1.InsertAllOnSubmit(ctxSource.t1.ToList());
ctxDestination.SubmitChanges();
Check here the constructors you need.
Entity Framework is not the right technology for this kind of problem. You will be better off using raw ADO.Net. Maybe SqlBulkCopy can be of use: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.aspx