SQL update set and select issue, [closed] - sql

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 3 months ago.
Improve this question
I have this code:
SELECT
ZONE_NAME,
ORG_ID,
ORG_SHORT_NAME,
XMSSN_USE
FROM TABLEZ
;
UPDATE TABLEZ
SET TABLEZ.BILL_CYCLE = '1-DEC-2020 4' WHERE (SELECT TABLEZ.XMSSN_USE WHERE TABLEZ.XMSSN_USE=224)
But it doesn't seem to execute. What could be the problem?

You have 2 different query sentences. You should use ; after first query and then write the update query.
Also you need to use some field on the where clause, your where is empty.

Related

How to remove repeat rows in SQL? [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 3 years ago.
Improve this question
I need to remove repeated records in search result. I have 3 columns (id, worklevel & umobile).
It looks like below:
Red places is repeat but I need just one of them in result.
Try using DISTINCT
SELECT DISTINCT column1, column2, ...
FROM table_name;

sql same table same column but two data [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 7 years ago.
Improve this question
TABLE1
NAME
1. AHMET
2. MEHMET
3. VELİ
4. TEMEL
Select * from TABLE1 WHERE NAME='AHMET' and NAME='VELİ'
Probaly you want IN operator:
Select * from TABLE1 WHERE NAME IN('AHMET', 'VELİ')

Write a query that select all events ordered by a particular customer in SQL [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
In SQL how we will write a query that selects all events ordered by a particular customer. Kindly help me there.
Thanks
The table's name is events?...
Select * from events order by custumers asc
if not
select events from Table order by custumers asc

How to get total count of orders placed on spesific date using Raw query [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 8 years ago.
Improve this question
I have ORDER Table in which I am saving Orders date wise.
Now I want total number of orders placed on specific date
How to do that
Pls Help...
Try this:-
SELECT COUNT(*)
FROM TABLE_NAME
WHERE DATE_COL = 'YOUR_DATE'

Problems with SQL query finding three names with the most records [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 8 years ago.
Improve this question
I have a table and I want to display the 3 names (Ted, Ringo, Paul) that have the most records using an SQL query.
It's a primitive question, but please help me.
my table:
SELECT TOP 3 Name
FROM YourTable
GROUP BY Name
ORDER BY COUNT(*) DESC