onchange="console.log(event.target.files)"
to check file type
Angular File Upload - Complete Guide (angular-university.io)
onchange="console.log(event.target.files)"
to check file type
Angular File Upload - Complete Guide (angular-university.io)
due to promise in console value not printed. below issue we getting.
i used to resolve using promise.
to print use then
instead of this
this.userdata.get();
use below then;
When updating one column with another based on a condition, you generally don't need to use constraints. Constraints are more related to ensuring data integrity and maintaining relationships between tables. However, if you want to ensure that the values you are updating meet certain conditions, you can use a combination of the CHECK constraint and the WHERE clause in the UPDATE statement.
Here's an example:
-- Add a CHECK constraint to ensure that salary is not negative ALTER TABLE employees ADD CONSTRAINT CHK_Salary_NonNegative CHECK (salary >= 0); -- Update bonus based on a condition UPDATE employees SET bonus = salary WHERE salary > 50000;
In this example, a CHECK constraint is added to ensure that the salary column does not contain negative values. The UPDATE statement then updates the bonus column for rows where the salary is greater than 50000.
Remember, it's important to ensure that your data meets the conditions you are setting, and constraints can help with that. Always make sure to test your updates on a small set of data first, and consider creating a backup before making significant changes to your database.
Get List of sps based on table name..
SELECT Name FROM sys.procedures WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%profiles%'
Get List of procedures create based on date.
select name,create_date,modify_date
from sys.procedures
order by modify_date desc
main response call for all api response......
public class ResponseDto
Create Triggers on Table
> the main use to if i deleted or inserted new record on table then customer ask old data which one deleted
to prevent from this type of issues i am creating the histroy schema with same table then.
1.creating the table on history schema same as main table
2.create trigger on main table.
-- ==============================================
-- Create dml trigger template Azure SQL Database
-- ==============================================
-- Drop the dml trigger if it already exists
CREATE TRIGGER [dbo].[tr_Returntoemp_Delete] ON [dbo].[tbl_ReturnToEmployeeDetails]
INSTEAD OF DELETE
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for trigger here
INSERT INTO [History].[tbl_ReturnToEmployeeDetails]
SELECT GETDATE(), RT.ID,RT.ManagerID,RT.EmployeeID,RT.ActionerID,RT.AppraisalTypeID,
RT.Description,RT.ModifiedBy,RT.ModifiedOn,RT.IsActive
FROM [tbl_ReturnToEmployeeDetails] as RT
INNER JOIN DELETED ON RT.ID=Deleted.ID
DELETE FROM tbl_ReturnToEmployeeDetails WHERE ID IN(SELECT ID FROM Deleted)
END
GO
ALTER TABLE [dbo].[tbl_ReturnToEmployeeDetails] ENABLE TRIGGER tr_Returntoemp_Delete
GO
-- ==============================================
-- ==============================================
https://github.com/CodeWithPraveen/csharp-intermediate-oop best tutorials