Skip to main content


Showing posts with the label SQL

SQL Express database backup restore failed

Database backup is a good strategy but knowing that you can rely on your backup when you needed it most is another story.
When doing backup one way to ensure that backup is okay, is seeing the message that the database backup  was successful like this image below.

But upon restoring the said backup that was successfully done, during the database restore; the system now is showing that a damage was detected, and the system is showing restore failed.
So, technically unable to restore the “.bak” file.
Restoring the backup can be done using the graphical interface or using T-SQL commands to restore the database.
But none of it will work, no matter how many times you tried, if some unforeseen issues will occur or for whatever reason the system and the sys-ad is just having a bad day.
An error of Restore failed for sever (Microsoft.SqlServer.SmoExtended) and also shows VERIFY DATABASE is terminating abnormally, keeps showing every time you restore the database.
The database backup was succ…

SQL delete value in a column

Deleting a value in a column can be done in multiple ways in SQL, mileage will always vary. If you have been working in SQL for quite some time and you were able to get the pinch of SQL then single liner statements can be done easily.
Deleting a single field or a single value in a column that matches a string or data using SQL is a daunting task, so it's better to practice with a dummy data before executing the statement on a production database or else inadvertent consequences  might happen.
One liner statement below will delete a value that matches the variable in query. Below is a PHP statemen that will delete a value in a column that matches the variable supplied on the statement.
The “.”, dot or period is a concatenation operator for strings in PHP.
"DELETE FROM `Table_Name`WHERE column_name = " . " ' " . $variable_query . " ' ";
Replace Table_Name with the actual table name and the column_name also with the actual column name.
The $variable_qu…

Word calculate values in table

Microsoft word uses basic formula calculation such as getting sum values, counting the number of rows in a table, product calculation, taking average values and some other functions which can be easily use from the drop down function of the formula.
Word is not a spreadsheet so calculation formulas are limited; of course Excel is the suited tool if the task requires more extensive calculation.
Below is a screen shot on how to use Microsoft Word formula to access basic function for calculation.
From the ribbon tab, insert a Table then click on “Table Tools”, click on “Layout” and select formula from the options.
If there is no Table inserted in Word. “Table Tools” will not be visible and also the formula functions.

See screen shot below:

Cheers.. till next time..

Excel formula does not recalculate automatically

Formulas in a worksheet do not automatically recalculate.
By default formula recalculation in Excel is set to automatic but if it has been changed to manual you can set it back to auto.
To set the calculation to auto or manual, click on the “Formula” tab then in the right had corner click on “Calculation options” and select the desired option.

See screen shot below: