I have a problem that file encoding was windows-1256 and it shows strange text when using ie11 and arabic text, so i changed the file encoding to utf-8 and it works fine but i need to convert back the …
How to delete duplicate data from MySQL except latest data
I want to delete records from mysql table I have table like this I am checking here if (date, url, price, hotelName) is same then remove except one id | hotelName | price | url | date | …
Wrong SQL Syntax; Incorrect syntax near ‘)’
I’m using Microsoft SQL Server Management Studio that’s hooked up to an Azure SQL database; usually, I’m used to using Oracle (It’s just a rookie mistake I guess). What exactly am I doing wrong? These …
Change the column value depends on occurrence count
There is the table: NAME GENRE book1 genre1 book2 genre2 book3 genre1 book3 genre2 book4 genre1 etc So, we can have a book with only one or with many genres. From this table I would like to …
How to select list of rooms containing all items from a list?
I have a table items_in_room that links which item is in which room (columns are room_id and item_id). Is there a way to select all rooms that contain all items from the list? I’m aware that …
showing columns in a particular pattern in postgresql
i have written a query which returns a table showing monthly total working hours of each person in the company. so the result is: name*****jan************feb**********march ……… dec Tom 170:…
How to order the query result based on following condition?
Let’s suppose I have a table as below: employee | period | commission A | 1Y | 100 A | 2Y | 150 B | 1Y | 80 C | 1Y | 200 C | 2Y | 270 C …
SQL Server: remove duplicates in exchangeable columns
I have this query: select OSFES97.CodeId, OSFBA97.CodeId, OSFES97.ReceiveDate from StockArchives OSFES97 inner join StockArchives OSFBA97 on OSFBA97.ReceiveDate = OSFES97.ReceiveDate …
Value referenced by NEW on an unchanged column in an UPDATE trigger
I have a table Group_Members with a DELETE trigger and an UPDATE trigger. The DELETE trigger updates some rows in A hence invoking the UPDATE trigger. Here’s the DELETE trigger code: UPDATE …
Find Interest rate on account statement in sql
i hava table of statement and it has the date,credit,debit and balance column through these i want to find total interest. TRX_DATE CREDIT DEBIT BAL ——– ———- ———- —-…