I want to post a solution to a interesting problem I was facing in T-SQL. The problem: Compare two string fields based on a percent match. In addition, the two strings may have the words in them translocated. For example: “Joni Bravo” and “Bravo Joni”. These two strings should return a…
Creating data entry form using button VBA
I am trying to create a basic data entry form, however, it is turning into more trouble than I anticipated.. I have the form created, now I am just trying to INSERT the data into the DB (TEST). I am receiving an “Object Required” error. Any suggestions? All of the txt boxes are verified to be corr…
Copy data from one column to other column (which is in a different table and different database)
I want to copy one table column value to another table. But both are in different databases. I did this but UPDATE dbo.Excelimp.Furniture SET dbo.Excelimp.Furniture.AssetId = dbo.Sample.FADetailsNew….
Using CTE and Update in Redshift
I am converting some SQL Logic from T-SQL used in SSMS to Amazon Redshift. I believe Redshift is a fork of Postgres version 8.0.2 so the below may not be possible unless using Postgres 9.1. WITH …
MySQL aggregated sum of JSON objects
I have created new table and having details as JSON datatype. I tried to get the aggregated sum of all records. I can able to get the each values but I don’t know how to get the sum using group by …
MySQL Count as {name} and WHERE {name} = X, Unknown column
I am trying to filter results based on the name assigned on count() and get this: Unknown column ‘total_submissions’ in ‘where clause’ SELECT SQL_CALC_FOUND_ROWS patient.*,count(patient_data.id) as …
Can you pass multiple params using OR to an SQL/PHP single bind statement?
I have a search bar that passes data to the server. I am taking the sentence sent and breaking it into individual words. I am then comparing a column against each word in the sentence. $term = …
Rename Column in Azure Data Warehouse
I know I can accomplish my objective with this process: Create new column Update new from old Drop old I am looking for a way to do this with one command. I know that remane object works at the table level. For example, I can do this: But these all fail with various error messages: Plus, according to this, sp…
SQL NOT EXIST returning duplicate value in query results
Hi Seem to be getting duplicates from this sql code it suppose to find records on BO Data that is not on Order Data by using the following as a key Keyorderstatus all my query results are on the Order Data already, How can a remedy this issue? Answer As @dfundako said – hard to check without data tables…
Oracle parameterized update query c#
It should work but it doesn’t. I have referred others but couldn’t find the reason. Thanks in advance. Joon Answer I found why it didn’t update table. To make it work I added parameters in the order of the query parameter and found it works. But I still do not understand why the order of add…