Categories
Mastering Development

Best way to insert into multiple tables in a cluster

Suppose I have a wide table (CUSTOMERS) that contains lots of columns (CUSTOMER_ID, FIRST_NAME, LAST_NAME, DOB, ADDRESS, PHONE_NUMBER, etc). This table is used in several full table scans, each of which selects only a small number of the columns of the table. Since this table is very large, these full table scans are very expensive. […]

Categories
Linux Mastering Development Ubuntu

Shell script regarding user accounts changes

I need to make a shell script that alerts the users when changes are made to their accounts.Can someone please help me?I’m talking about changes that are made in the file that the holds their user information, like name, password,DoB,ID, etc. The changes need to be registered in a file.

Categories
Mastering Development

How to create additional category from omitted data?

I am currently working on a project where we need to collect data on a group of people and create categories based on age, gender, etc. My problem is that the code I was given omits all data for any person with any empty cells in the .csv (ex: didn’t give me their date of […]

Categories
Mastering Development

Array Object Value Not Displaying

I’m trying to cleanse some data and place an array of objects inside of an object. Here’s my array of objects. careerStats: [ { gp: ’35’, gs: ’34’, mpg: ‘33.2’, fg: ‘.515’, tp: ‘1.5’, ft: ‘1.4’, rpg: ‘0.5’, apg: ‘0.7’, bpg: ‘.692’, spg: ‘0.7’, ppg: ‘3.6’ }, { gp: ’22’, gs: ’22’, mpg: ‘36.7’, fg: […]

Categories
Mastering Development

Undefined index error when using session variables

I am working on a project where i already built signup, login, profile update forms. Am using sessions to get currently logged in user info to be able to update his profile using profile update form. Now problem is that when i am assigning those session variables to update form. I get the following error. […]

Categories
Mastering Development

Unable to get the exact result using stored procedure as it is returning the values with the incrementation

Alter procedure Searching ( @EmployeeName varchar(50) ) as begin select EmployeeDetails.EmployeeId, EmployeeName, Mobile, Email, Gender, Married, JoiningDate, DOB, ReportingManager, ISActive, ISDelete, EmployeeRoles.RoleId, employeeDepartment.Department from EmployeeDetails, EmployeeRoles, employeeDepartment where EmployeeDetails.EmployeeName LIKE ‘%’ + @EmployeeName + ‘%’ end This is my Stored Procedure but when I am executing it I am getting the results as: exec Searching […]

Categories
Mastering Development

Unable to get output from Classes in Python

[Code that I am using] I am trying to learn classes in Python and tried to run my first program. I am unable to get an outcome from the program. After running the program, I just get a RESTART C:/Users….. message. #Class example class Person: ”’ The class person describes a person ”’ count =0 […]

Categories
Mastering Development

How to use VB and SQL to add Records to a Relational Database in Access

I’m working in Visual Basic to create a forms applications as part of a college project. I’ve used SQL statements to read from the access database but I’m having some trouble writing to it. I’d like to hazard a guess it’s due to the database having relationships between tables. This is my first go at […]

Categories
Mastering Development

Improve a query from Explain results

I have a complex query that is dynamically assembled based upon search criteria. However, in its simplest form, it is still very slow. The main table it runs against has ~10M records. I ran an explain against a ‘base’ query and the first row of the explain looks bad (at least to a novice dba […]

Categories
Mastering Development

Cannot insert data to foreign key sqlserver

Class Table Query: CREATE TABLE ClassTable ( className varchar(255) NOT NULL PRIMARY KEY, classFee int, academicYear int ); Student Table Query: CREATE TABLE StudentTable ( id int NOT NULL IDENTITY(1,1) PRIMARY KEY, firstName varchar(255) NOT NULL, lastName varchar(255), fatherName varchar(255), fatherNo varchar(255), motherName varchar(255), motherNo varchar(255), dob date, dor date, gender varchar(255), className varchar(255), healthInsuranceNo […]