245 Answered Questions for the topic SQL
Sql
04/12/19
SSRS(rdl file) How to add multiple expressions to one text box?
When choosing a textbox in rdl design file - you can add expression. But how do I add multiple expressions to the same textbox?
Sql
04/12/19
How do you comment out a line in a reporting services function?
Nothing I have tried so far has worked...
Sql
04/11/19
What is the difference between UNION and UNION ALL?
What is the difference between `UNION` and `UNION ALL`?
04/11/19
Geometry datatype to latitude /Longitude MS SQL Server?
I need to convert Sql Server geometry datatype to latitude /Longitude
I have just imported a shapefile to my table (geometry)
This query does not work:-
select
geom.Lat as [Latitude],
...
more
Sql
04/10/19
Is SQL syntax case sensitive?
Is SQL case sensitive. I've used MySQL and SQL Server which both seem to be case in-sensitive. Is this always the case? Does the standard define case-sensitivity?
Sql
04/09/19
Are soft deletes a good idea?
Are soft deletes a good idea or a bad idea?
Instead of actually deleting a record in your database, you would just flag it as `IsDeleted = true`, and upon recovery of the record you could just...
more
Sql
04/09/19
How to select records from last 24 hours using SQL?
I am looking for a `where` clause that can be used to retrieve records for the last 24 hours?
Sql
04/08/19
Difference between natural join and inner join?
What is the difference between a natural join and an inner join?
Sql
04/05/19
how do I query sql for a latest record date for each user?
I have a table that is a collection entries as to when a user was logged on.
username, date, value
--------------------------
brad, 1/2/2010, 1.1
fred, 1/3/2010, 1.0
bob, ...
more
Sql
04/04/19
How to retrieve current month in SSRS expression?
I want to get current month as default value of a parameter.
I've come up with (which does not work):
=Month(Now())
Sql
04/04/19
Select statement to find duplicates on certain fields?
Can you help me with SQL statements to find duplicates on multiple fields?
For example, in pseudo code:
select count(field1,field2,field3)
from table
where the combination of field1,...
more
Sql
04/04/19
Is there ever a time where using a database 1:1 relationship makes sense?
I was thinking the other day on normalization, and it occurred to me, I cannot think of a time where there should be a 1:1 relationship in a database.
Name:SSN? I'd have them in the same...
more
Sql
04/04/19
Using group by on multiple columns?
I understand the point of `GROUP BY x`
But how does `GROUP BY x, y` work, and what does it mean?
Sql
04/04/19
Count work days between two dates?
How can I calculate the number of work days between two dates in SQL Server?
Monday to Friday and it must be T-SQL.
Sql
04/04/19
Display Seconds Count in HH:MM:SS format in SSRS 2008?
I have a table with a column, TotalTime that is an Integer value in seconds.
In Visual Studio / SSRS 2008 I want to display it in HH:MM:SS format.
Thanks!
Sql
04/04/19
What are best practices for multi-language database design?
What is the best way to create multi-language database? To create localized table for every table is making design and querying complex, in other case to add column for each language is simple but...
more
Sql
04/04/19
Truncate (not round) decimal places in SQL Server?
I'm trying to determine the best way to truncate or drop extra decimal places in SQL without rounding. For example:
declare @value decimal(18,2)
set @value = 123.456
This will auto round...
more
Sql
04/02/19
How do I list all tables in a schema in Oracle SQL?
How do i list all tables in a schema in Oracle SQL?
Sql
04/01/19
Difference between EXISTS and IN in SQL?
What is the difference between the `EXISTS` and `IN` clause in SQL?
When should we use `EXISTS`, and when should we use `IN`?
Sql
03/27/19
How to remove trailing zeros using ssrs?
I have a column `DECIMAL(18,4)`. when I insert data like *123.45* it becomes *123.4500*
I want to show it in `SSRS` like 123.45.
How to remove those zeros in `SSRS`?
Sql
03/27/19
How to alter a column and change the default value?
I got the following error while trying to alter a column's data type and setting a new default value:
ALTER TABLE foobar_data ALTER COLUMN col VARCHAR(255) NOT NULL SET DEFAULT '{}';
> ERROR...
more
Sql
03/27/19
How to check if SSRS Textbox is empty?
How do you check if a textbox is empty in SSRS 2008?
I've tried this code and it doesn't work.
IIF(ReportItems!txtCountVolunter.Value = "", false, true)
Sql
03/27/19
Postgres: SQL to list table foreign keys?
Is there a way using SQL to list all foreign keys for a given table? I know the table name / schema and I can plug that in.
Sql
03/27/19
How to get a single value in a textbox from a row group in SSRS?
I have the following table row group:
Name|Percent|
val1|67% |
val2|33% |
I want to know if is possible to get the percent of the val1 in a textbox? Thanks for the help.
How to use use_spheroid=false in ST_DWithin?
I have created 2 geography columns and indexed them using `GIST`. I am looking to use `ST_DWithin` for a larger dataset and to make it faster trying to use the `use_spheroid=false`.
SELECT...
more
Still looking for help? Get the right answer, fast.
Ask a question for free
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.