Viewing 15 posts - 6,136 through 6,150 (of 8,731 total)
Prudhvi _SQL (7/15/2014)
...
UPDATE R
SET R.Unmort = CASE WHEN ISNULL(R.Unmort,'-') = '-' THEN '0' ELSE R.Unmort END,
R.Total = CASE WHEN ISNULL(R.Unmort,'-') = '-'...
July 15, 2014 at 3:48 pm
GilaMonster (7/15/2014)
Jeff Moden (7/15/2014)
Lynn Pettis (7/15/2014)
Whose turn with the...
July 15, 2014 at 3:40 pm
I must be sincere, I can't guarantee this method and you should test it thoroughly before implementing it. This method is documented in the following article and you should read...
July 15, 2014 at 11:33 am
You just need to add more columns to your query.
It might look something like this:
SELECT p.name,
p.anyothercolumns,
n.idnumber,
...
July 15, 2014 at 11:21 am
There's no problem for us if you post it here. However, this site is focused on SQL Server and you might not get the best answers. You should try an...
July 15, 2014 at 8:30 am
You could easily use CROSS TABS to pivot your data.
Read the following article and come back if you need extra help. 😉
July 15, 2014 at 8:25 am
You need to realize that excluding the wildcard (%) will generate different results. It doesn't matter if the query runs 1000x faster if the results aren't correct.
The leading wildcard will...
July 14, 2014 at 3:13 pm
Read this to get better answers for performance questions.
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
July 14, 2014 at 2:55 pm
This will deduplicate the rows that have missing values. However, if the duplicate rows are the majority, I might use a different approach.
INSERT INTO @DiamondsMissingData
SELECT '6157560941C','Crown','CR50135','GIA',6157560941,35588000,177940,NULL UNION ALL
SELECT '6157560941C','Crown','CR50135','GIA',6157560941,35588000,NULL,27375500 UNION...
July 14, 2014 at 2:52 pm
Maybe something that's been more tested could help. 🙂
WITH bug (BugID, BugComment) AS (
SELECT 1, 'Hello DB_001000, DB_001000, DB_001000 Blick'
...
July 14, 2014 at 2:33 pm
You need to format the string.
SELECT CAST( STUFF( STUFF( STUFF( '2013-05-24-20.03.46.843480', 11, 1, 'T'), 14, 1, ':'), 17, 1, ':') AS datetime2(7))
July 14, 2014 at 11:12 am
I'm posting a different option that will read the table just once. It might be faster but I can't assure that. I included an option with ISNULL which will work...
July 14, 2014 at 11:01 am
You're missing information. There's no way to relate employees with managers in the sample data posted.
July 14, 2014 at 10:14 am
Viewing 15 posts - 6,136 through 6,150 (of 8,731 total)