Member Avatar

Sometimes you need to delete duplicate rows in a database :) In the future, set UNIQUE keys when you need them :) In the example below, we have a table appropriately named `TABLE_NAME` and there are multiple rows that have the same value for the `duplicate_field` field. In this example, we want to remove the ones where the `id` field is set to "remove". In other examples, you can pick any conditional you want when choosing which of the rows to remove or which to keep, including conditionals between them (e.g. `foo.id < bar.id` will keep the row with the …

+1 forum 0
Member Avatar

This was a query raised by one of a forum members at another site, where he had a worksheet filled with random numbers, and I have already answered that query [at my post here](https://vbacoder1962.wordpress.com/2019/07/15/extracting-cell-phone-numbers-from-random-strings-of-variable-length/). You may go through that post and read the logic behind the code. ![vbacoder_Code_20190715.jpg](/attachments/large/4/160efbe4e4d0a8400d04653a6e420c7b.jpg)

+1 forum 0
Member Avatar

SQL Insert India 'State'

Member Avatar
+0 forum 5
Member Avatar

To view this tutorial with notes at [URL="http://www.effectivewebdesign.co.nz/tutorial.php"]http://www.effectivewebdesign.co.nz/tutorial.php[/URL] yes I am aware this is more php than mysql. howerver I get asked how to do it so often I thought I'd post it here aswell :)

+0 forum 0
Member Avatar

This is a User Defined Function to perform simple encryption on an input string. This is performed by transposing the ASCII value of each character in the string by the increment value (@increment in the parameter list) Pass the function the string you wish encrypted and the increment value, which is normally 128 or 256

+0 forum 0
Member Avatar

This code demonstrates how age might be calculated and filtered using the DateDiff method in SQL. Also, note that both the parameters are set to NULL by default, hence making them 'optional' to a certain limit.

+0 forum 0

The End.