The conversion of a varchar data type to a datetime data type resulted in an out-of-range value (Konwersja typu danych varchar na typ danych datetime spowodowała utworzenie wartości leżącej poza zakresem)

This error can be result of wrong `dateformat` setting on database. Example below. ERROR – `dmy` dateformat: SET DATEFORMAT dmy; DECLARE @datetime datetime = ‘2021-12-31’; SELECT CASE WHEN @datetime >= ‘2021-11-22’ THEN 1 ELSE 0 END;SET DATEFORMAT dmy; DECLARE @datetime datetime = ‘2021-12-31’; SELECT case when @datetime >= ‘2021-11-22’ then 1 else 0 end; OK Read more about The conversion of a varchar data type to a datetime data type resulted in an out-of-range value (Konwersja typu danych varchar na typ danych datetime spowodowała utworzenie wartości leżącej poza zakresem)[…]

update column with random string

DECLARE @v TABLE (x VARCHAR(50)) INSERT INTO @v VALUES — list of strings that column will be updated with (’37845840’),(’34879335’),(’33879336’),(’37855840’);   DECLARE cursor1 CURSOR FOR SELECT <TABLE_ID> FROM <SOME_TABLE>; DECLARE @id INT;   OPEN cursor1 FETCH NEXT FROM cursor1 INTO @id   WHILE @@FETCH_STATUS=0 BEGIN UPDATE <SOME_TABLE> SET <UPDATED_COLUMN> = ( SELECT x FROM ( Read more about update column with random string[…]

HTTPS Redirect with exclude

Example how to redirect to HTTPS, but excluding .well-know/* directory. <VirtualHost *:80> ServerAlias domain.net RedirectMatch 301 ^/((?!\.well-known).*)$ https://domain.net/$1 </VirtualHost><VirtualHost *:80> ServerAlias domain.net RedirectMatch 301 ^/((?!\.well-known).*)$ https://domain.net/$1 </VirtualHost>

maven: Deploying .jar to remote Maven repository by ftp

<build> <plugins> <!– other plugins, skipped –> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <version>2.8.2</version> </plugin> </plugins>   <extensions> <!– Enabling the use of FTP –> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-ftp</artifactId> <version>1.0-beta-6</version> </extension> </extensions> </build>   <distributionManagement> <repository> <id>repo-server</id> <url>ftp://192.168.1.253/var/maven</url> </repository> </distributionManagement> <build> <plugins> <!– other plugins, skipped –> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <version>2.8.2</version> </plugin> </plugins> <extensions> <!– Enabling the use of Read more about maven: Deploying .jar to remote Maven repository by ftp[…]