Viewing 15 posts - 1,411 through 1,425 (of 3,489 total)
Did you try COALESCE instead?
DECLARE @LastName VARCHAR(20) = NULL;
SET NOCOUNT ON;
SELECT p.[BusinessEntityID]
,p.[Title]
,p.[FirstName]
,p.[MiddleName]
,p.[LastName]
,p.[Suffix]
,pp.PhoneNumber
FROM [Person].[Person] p INNER JOIN [Person].[PersonPhone]...
September 21, 2017 at 8:31 pm
Maybe something like this? (Might get shredded for this one, but live & learn!)
/* populate dummy table */SELECT PatientID, Gender, Birthdate
INTO #Dummy
FROM dbo.Patient p
September 19, 2017 at 1:39 pm
Nashville, TN has a ridiculous number of Healthcare IT jobs, especially SQL Server and .NET. If you can do those, you can almost write your own ticket here. Not sure...
September 19, 2017 at 12:59 pm
I'm sure.
You could do the cleanup in SSIS, and then once clean, insert the cleaned data into your final table. No MS Access required. And schedule the jobs...
September 14, 2017 at 5:05 pm
The biggest thing is to remove all the VBA data functions that are in the database. Push all the data processing type stuff to SQL Server.
September 14, 2017 at 3:52 pm
If you're doing it from within SSIS, I'd do what Phil said... if you're reading from Access, then you can do this:
DBEngine(0)(0).Tabledefs("TableName").Columns.Count will work if you're reading from the...
September 13, 2017 at 6:37 pm
You could mock this up in Excel, then use PowerBI Desktop or something for the visuals. Sounds like a good use of SSAS tabular. The "Questionnaire/Survey" pattern is covered by...
September 11, 2017 at 11:40 am
SELECT c.CustomerID
, SUM(t.amount) AS TotalAmount
FROM Customer c
CROSS APPLY (SELECT TOP 2 o.*
FROM Orders o
WHERE o.Customer = c.CustomerID) t
GROUP BY c.CustomerID
HAVING SUM(t.Amount)>150;
September 10, 2017 at 12:43 pm
If you want YYYY - YYYY then you have to cast the Years as strings, otherwise, T-SQL will interpret the + as the addition operator. Check out CAST()
September 9, 2017 at 7:17 am
Welcome to SSC. It helps everyone if you post CREATE TABLE and INSERT scripts so people can run them and have at least a mockup of what you're dealing with....
September 8, 2017 at 11:16 pm
Rod,
if you have an HDMI port on your computer, send the signal to your TV. Just display some stuff on your computer screen and some on the TV. That's...
September 7, 2017 at 8:06 pm
This is trivial in SSRS.
Connect to your datasource, create your dataset, drop in a matrix.
People are on rows, Dates are on columns. Add a parameter for the start...
September 5, 2017 at 5:51 pm
You could use REPLACE(), but there are no spaces in that string to begin with.
DECLARE @TextWithSpaces VARCHAR(100) = 'I have a whole lot of spaces';
PRINT REPLACE(@TextWithSpaces,' ','');
September 5, 2017 at 12:52 pm
Looks like this works...
You may want to include other rows from both tables, but this should give you the gist of how to do it.use AdventureWorks2014;
September 5, 2017 at 10:00 am
Viewing 15 posts - 1,411 through 1,425 (of 3,489 total)