Skip to content

Tag: sql

Combining different SQL requests but they all have same WHERE

I have lots of requests, but they always have the same WHERE, I done request to copy a character by typing his name from a table, so it copy the data from other tables (sometimes need to delete and copy, sometimes only update), but if I want to copy someone’s character, I have to type the names 7 times …

Seeking help fixing a small sql query

I am needing a query to return a list of time entries from the last 21 days, sort that list by member id and then by start time, then compare the start time in each row against the end time of the previous row, then display the rows where the start time is larger than the previous rows end time.

sql query to replace backslashes ‘\’ with ‘/’

I know very little about sql queries but I need a query to replace ‘\’ with ‘/’ I have a WordPress database where there are characters in a long text string that look like this in phpMyAdmin Browse. ‘\uploads\photos\’ It needs to be ‘/uploads/photos/’. I want a …

How to insert column of other table in postgresql

I want to insert a column of other table and one parameter of this table have a hard coded value. I want to iterate this value with the each return value of other table column. How can i do this with insert query? let 3,4,6 is the return column value of other table. Return column Answer Get rid of the

TO_NUMBER() Function In Oracle Behaves Differently

I have string variables and these variables differ in length. Let’s assume that I have the following strings: I want to convert my string variables to float. So, to do that, I call TO_NUMBER() function. The problem is when I call TO_NUMBER() function from my .NET web application instead of calling it di…

Creating query for printing average of two months [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question I need to show monthly average of total using SQL and PHP. For example this table has total=…

min and count without limit

I need to select a receipt with 3 conditions: total receipt > 50 (receipt.total) associated purchases doesn’t include item “cucumbers” (product.pname) the number of suppliers (product.sid) of associated products is the lowest I have the following tables set up: sample data: So far I have …

Searching a formatted address in SQL table where columns are split

How would I go about searching (and possibly full-text index searching) on a table for address data that is structured as per below: When searching for an address I’d like to search for the whole address. Ideally I’d like to be able to search the table like this: Thanks for your help in advance An…