Archivo por meses: julio 2020

SQL Query for Counting Records per Day

This SQL query will add up the record count per day based on a column called “Timestamp.” Transact SQL SELECT DATEPART(YEAR, Timestamp) AS ‘Year’, DATEPART(MONTH, Timestamp) AS ‘Month’, DATEPART(DAY, Timestamp) AS ‘Day’, COUNT(*) AS ‘Visits’FROM tblVisitsGROUP BY DATEPART(DAY, Timestamp), DATEPART(MONTH, Timestamp), DATEPART(YEAR, Timestamp)ORDER BY ‘Year’, ‘Month’, ‘Day’ Results The results of this query will appear… Read More: SQL Query for Counting Records per Day »

Pandas Flask

mkdir pandas cd pandas python3 -m venv vpandas Activate the environment Before you work on your project, activate the corresponding environment: . vpandas/bin/activate pip3 install Flask python3 -m flask run –host=0.0.0.0

Check If A Linux System Is Physical Or Virtual Machine

Method 1 – Using Dmidecode utility The easiest way to find if we are working on a virtual or physical machine is using dmidecode utility. Dmidecode, DMI table decoder, is used find your system’s hardware components, as well as other useful information such as serial numbers and BIOS revision. Dmidecode comes pre-installed with most Linux distributions. Just in… Read More: Check If A Linux System Is Physical Or Virtual Machine »

How to avoid writing the owner (pub) of the table (schema) before referencing the table name in the SQL commands

Option #1Use the following statement in the same SQL session prior to running any SQL statements: set schema ‘pub’ Where ‘owner’ is the owner name, e.g. ‘PUB’. It will be valid until the end of the session or until it is changed. Option #2If using an ODBC DSN, set the default schema to the owner in the… Read More: How to avoid writing the owner (pub) of the table… »