Viewing 15 posts - 31 through 45 (of 55 total)
You can place your logic in a CTE and then use your WHERE clause when selecting from the CTE.
Probably not the best solution but still an option
November 1, 2017 at 4:47 am
What does your query look like so far?
ie. What have you tried?
November 1, 2017 at 3:04 am
SQL Server's builtin "big data" functionality is actually something called Polybase.
Polybase allows users to interface with HDFS (Hadoop Distributed File System) which is the storage layer for a Hadoop...
October 31, 2017 at 6:51 am
The issue is with construction of the dynamic SQL.
If you look at this section as an example:
StartDateTime >= ' + @StartDate + '
October 30, 2017 at 2:57 am
I don't think you can dynamically use the parameter like that.
You'll have to build your sql statement dynamically like this:
DECLARE @pDB AS VARCHAR(10)
DECLARE
October 27, 2017 at 8:52 am
There are a few suggestions here:
https://www.mssqltips.com/sqlservertip/3171/identify-sql-server-databases-that-are-no-longer-in-use/
October 27, 2017 at 8:18 am
Have a look at some of the suggestions in this link:
https://www.sqlservercentral.com/Forums/Topic1556669-148-1.aspx
October 27, 2017 at 5:11 am
Does your destination table already contain data?
If so, maybe you could import your data into a staging heap table first (empty table with no indexes)
October 27, 2017 at 2:37 am
I have been wondering about how a SQL instance should be set up properly on a VM.
With physical drives you would put your data and log files on separate...
October 27, 2017 at 2:23 am
I wouldn't nest a select statement like that.
Rather do another outer join:
select A.name
,(Case WHEN A.id = 2 then C.ID ELSE ??? END)
from...
October 27, 2017 at 1:49 am
October 26, 2017 at 1:17 am
Although you'll get better performance by flattening everything into one table / view, the users' experience might not be as great.
The data might make better sense if attributes are...
October 25, 2017 at 8:34 am
Maybe this is the LIKE syntax you are looking for as in this example:
DECLARE @String AS VARCHAR(7)
SET @String = '33AA5CV'
SELECT CASE...
October 25, 2017 at 8:07 am
The "Import Flat File" feature is quite new, and I'm not sure if it resolves collation issues, but maybe worth trying:
http://www.sqlservercentral.com/blogs/discussionofsqlserver/2017/10/11/new-features-in-ssms-173/
October 25, 2017 at 6:14 am
Hi Sam, have a look at this article about the OUTPUT clause of a merge statement:
http://www.sqlservercentral.com/articles/T-SQL/156901/
Hopefully it'll help with what you are trying to achieve.
October 25, 2017 at 6:06 am
Viewing 15 posts - 31 through 45 (of 55 total)