I have the following query:- select dbo.table1.service, dbo.table1.level_3_structure, Sum(table1.Reduced) as Total_Reduced from dbo.table1 where dbo.table1.Period = ‘Cumulative’ Group by dbo….
Rails Nested SQL Queries
I have a database model Position(lat,lon) which holds latitudes and longitudes. I have a controller action called show_close_by which recieves a position in degrees (my_lat, my_lon), a tolerance (in …
Altering column size in SQL Server
How to change the column size of the salary column in the employee table from numeric(18,0) to numeric(22,5) Answer
How to use “like” and “not like” in SQL MSAccess for the same field? [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 5 y…
How to write an “exclusive” query in SQL?
I am going over a past paper for a database course I am taking and I am stuck on an SQL question Here is the schema provided Country(name, capital, area), name is the key People(country, population, children, adult) where country refers to the name in Country, population is the total population, and children …
How to sort values in columns and update table?
I’m completely new to sql and can’t do that myself. So I need your help. I want to sort values in column and then save changes. But I don’t know how to do that. Table looks like that: Id | Name | …
Why am I getting duplicate results in my query?
I am using the Moodle database to query the latest forum posts made by students and teachers for the relevant course they are enrolled in. Here are the tables I need to join and an explanation in …
Oracle: transpose table
I’ve got the following query SELECT 1, 2 FROM DUAL AND I’d like something like SELECT TRANSPOSE(SELECT 1, 2 FROM DUAL) Which outputs the same as SELECT 1 FROM DUAL UNION SELECT 2 FROM DUAL I’d like …
Set an empty DateTime variable
I would declare an empty String variable like this: string myString = string.Empty; Is there an equivalent for a ‘DateTime’ variable ? Update : The problem is I use this ‘DateTime’ as a …
What is the difference/relationship between extent and allocation unit?
Can you explain the difference -or relationship- between ‘Extent’ and ‘Allocation Unit’ in SQL?