I stored a flat file into a table. The tag P is for the master The tag I is for the detail Always a P row was precede with a (n) numbers of I rows. The problem is, The I rows doesn’t have an ID to …
Why Week conversion failed in SQL Server in my case?
I am trying to convert week of the date based on my criteria. My date condition: if my @date is less than 4 AM, then @date – 1, else @date declare @dates datetime set @dates = ‘2019-01-01 03:59:59’…
Reading data from a sql database with spring data fails
I’m having a database with existing tables. One of these is called AKTIVE_AUFTRAEGE with the id “AKTIVE_AUFTRAGE_ID” and the second field “ROBOTER_AUFTRAG_ID”. I want to read the data using Spring …
Transpose Rows Into Columns by Delimiter Column Name and Column Title
I’m slightly stuck on this issue and need some SQL assistance please. Iv got a hierarchy table from someone who needs help transposing it and putting them into actual columns of another table. Here is …
SQL Server : “invalid column name” error after GROUP BY on subquery
I am trying to perform the following query on a SQL Server database table with a GROUP BY on a column which results from a CASE statement done on a subquery: SELECT AVG(sales) as avg_sales, …
Calculate Mode of points that fall within each polygon
I have two tables in SQL Server. Address Points & District Regions Both have geom fields and share common SRID The Address Points have an integer value field. For each district I want to take the …
postgresql conditionally generating value for each row
I am trying to implement a simple search functionalitu over links.name column. I would like to match keywords against name values and wanted to get the names with more matchings on the top of result. …
Isolate/Sum Data Conditionally Based On Event Sequence
I have a table that tracks events sequentially and calculates the time for each event. What I want to do using the below sample data, is calculate the total number of Time Elapse (Seconds) of all …
Query SQL with similar values
I have to make a query to a base using as a comparison a string like this 12345678, but the value to compare is this way12.345.678, if I do the following query it does not return anything. SELECT * …
Is there a way that i can highlight or colour various table rows based on data entered in textfield?
What i’m trying to do it’s highlight the serial number that i scan from a box of items. So when i scan the S/N. My idea is that the table, which contains the items in the box, change their color. My …