Viewing 15 posts - 7,381 through 7,395 (of 8,731 total)
Congratulations Gail, thank you for all the shared knowledge.:-D
December 5, 2013 at 12:45 pm
Something like this?
WITH CTE([MemberName])AS(
SELECT 'Cazares, Luis' UNION ALL
SELECT 'Cazares, Luis A')
SELECT LEFT( MemberName, CHARINDEX(',', MemberName) - 1) LastName,
SUBSTRING( MemberName, CHARINDEX(',', MemberName) + 1, LEN( MemberName)) FirstName
FROM CTE
December 5, 2013 at 12:44 pm
Have you tried it?
December 5, 2013 at 12:40 pm
Example:
IIF ( [ES Fully approved data 1] = '', '', [ES Fully approved data 1] + ';') +
IIF ( [ES Fully approved data 2] = '', '', [ES Fully...
December 5, 2013 at 12:10 pm
Could you post DDL and sample data on the way of INSERT statements so we can work directly on it?
December 5, 2013 at 12:04 pm
This should do the trick, however, I can't assure you that because I have nothing to test on.
Be aware that you can't use ORDER BY in a TVF because it...
December 5, 2013 at 12:02 pm
You have a declaration for a single statement table valued function but your function has multiple statements.
Maybe I can help you with the code but it would be easier with...
December 5, 2013 at 11:51 am
DATEADD(mm, DATEDIFF(mm, 0, GETDATE()) - 1, 0)
Is getting the first day of previous month.
DATEADD(mm, DATEDIFF(mm, 0, GETDATE()), 0)
Is getting the first day of current month.
- '00:00:01'
Is substracting one second...
December 5, 2013 at 10:49 am
Actually you can use a variable inside IN if it is called from SSRS. The variable is replaced in the query before submitting it to SQL Server.
My knowledge in SSRS...
December 5, 2013 at 10:01 am
You can't use a variable with a comma-separated values string to be evaluated with IN().
You could as well try the Delimited String Splitter[/url].
Read the article and if you have any...
December 5, 2013 at 8:43 am
To build one set as John said:
DROP TABLE #TableA
CREATE TABlE #TableA
(
ID INT,
SourceData nvarchar(MAX)
)
INSERT INTO #TableA
VALUES(1, 'INSERT TableX VALUES( 1''Something'')'),
(2, 'INSERT TableY VALUES( ''Something Else'', 1)'),
(3, 'INSERT TableX VALUES( ''Something...
December 4, 2013 at 8:33 am
It's a great thing that you found an answer that will perform correctly and will be fast and simple to understand and an answer that will help you to learn...
December 3, 2013 at 2:49 pm
This might do the trick as well.
SELECT DISTINCT IPCode, ID
FROM Profile p
WHERE EXISTS( SELECT IPCode
FROM Profile x
WHERE p.IPCode = x.IPCode
GROUP BY IPCode HAVING COUNT( DISTINCT ID) > 1)
December 3, 2013 at 11:54 am
Viewing 15 posts - 7,381 through 7,395 (of 8,731 total)