Well, the query I need is simple, and maybe is in another question, but there is a performance thing in what I need, so: I have a table of users with 10.000 rows, the table contains id, email and more …
join of two queries missing values
I need help joining these two queries. Here’s the first dataset with its query: : and second: : My query produces this result: I need to return as I can’t figure out why my query is leaving out the records with no Inbound data. I believe a right join is correct. It seems like an issue with using t…
mysql count from table where related record exist in other table
I have 2 tables, customers and addresses. I want to count how many customers have addresses with name like a given search term something like SELECT COUNT(*) as countSearch FROM customers,addresses …
While updating table1, how do I INSERT to table2 for every change in table 1?
I have a MEMBER table and NOTIFICATION table. On client side, I list all of the records in MEMBER table and there is a points column and this is shown as text input. So after I change the values for some members, I can click save button and this will update the records in my MEMBER table that’s all righ…
Mysql When then and temp variable. Explanation
I have this sql query that I am trying to understand. Can I get a line by line explanation please. I know the first line Initialise variable. Second line gets the minimum value. Answer The variables are enumerating the rows for each occupation separately. You can see this by running the subquery to see the re…
Return a 0 if no rows are found in Microsoft SQL Server
I need your help with this query. My table CSO_EMP_ORG_DPM_VIE has a column with different keys. Column name is EXT_KEY. When I receive the same key number in EXT_KEY, I want the SQL code to count the duplicates using this query: This is working so far, but when it has no duplicate keys (numbers) in the colum…
How to avoid & popup when SQL query contain ‘&’ letter?
I am writing a migration script where I replaced html encoded values by original values like & will get replaced by &. So my SQL query has & letter but when I execute this query it give me popup for every & to replace that character which is as shown below After clicking on OK its giving a…
How to rectify “missing right parenthesis” problem?
Following is a sample of query I am working on right now: On compiling, it is throwing a “missing right parenthesis” error. I checked, but all the parentheses are accounted for. Can somebody help me? Answer The actual error you are seeing is caused by the date_arrived column with NOT NULL being pl…
BigQuery error “Query returned no results”
Or changing the query to this: And other address like this do not pull up the address or amount: Error message: This query returned no results. Answer Just lower it 🙂 Looks like you accidentally changed your address to UPPERCASE or BQ stored it in LOWER case … anyhow if you lowercase the addresses as sh…
Split data in column based on value of in another column
I have a table full of Artist and Track Titles that is imported from two different places. Some are correct with Artist and Title in different columns but then there are other rows where everything is in the Title column separated with ‘-‘ and the Artist column is NULL. Changing it at the source i…