Skip to content

Which keywords did I missed on the following tables?

My problem: I get the same error on the tables: Tasks, TimeSheet, TimeSheetHour. I still don’t have any idea on what keywords did I missed. Here is the error I got in Tasks table: (same with other tables) May I know which keywords did I missed on the following tables? Answer The keyword is REFERENCES no…

Three table join with matched and unmatched records

I have three tables: store article_to_store article table. I need all articles with the store name. For all articles, I want to list all stores store table contains 3 stores. article table contains 2 articles. article_to_store relation table maybe has 2 records. One article in 2 stores. I need a mysql query w…

How to check whether a user has records in past?

Sample Table Above sample table consists Users info who completed certifications. An user can also go for retraining but he/she should have completed a course before retaking it. User Id: 2 is retrained on certificate 2, he has a record in past (Completed same certificate earlier), but User id: 3 has no certi…

How to copy parent and child data from one database to another while assigning the newly created parent ids in the foreign key column of child tables?

Suppose, I have a table tblClasses and tblStudents Now each class have multiple student. tblStudents now, I have another server having exact same db and tables and I am copying data from server 1 to server 2 from same tables using the Select and Insert e.g. and for tblStudents now this is ok but the real prob…

How do I translate this specifik SQL statement to LINQ

SQL: C# Objects: Monitor: And Counter: And the objects that I need to turn it into is: AllStatistics: I don’t have much experience with LINQ so the most I’ve achieved with it is somethig like: My question is, how would I compose an LINQ statement with the same functionality of the above SQL query …

Table data show one by one record different two tables?

Table 1 ABC DEF GS PM BS PK Table 2 ABC DEF YZ TT UG KK Need output ABC DEF GS PM YZ TT BS PK UG KK So please help me sql query Answer table1: Azbuka Def A1 D1 A2 D2 A3 D3 A4 D4 table2: Azbuka Def F1 H1 F2 H2 F3 H3 F4 H4 Result: Azbuka Def