Viewing 15 posts - 6,271 through 6,285 (of 15,381 total)
In order to help we will need a few things:
1. Sample DDL in the form of CREATE TABLE statements
2. Sample data in the form of INSERT INTO statements
3. Expected results...
November 15, 2013 at 12:35 pm
davidandrews13 (11/15/2013)
so it was unecessary to call the column...
November 15, 2013 at 10:00 am
Hi and welcome to the forums. In order to help we will need a few things:
1. Sample DDL in the form of CREATE TABLE statements
2. Sample data in the form...
November 15, 2013 at 7:13 am
jbalbo (11/14/2013)
Thanks Sean & Keith,That article is great.
I used the typical Catch-All and it worked
I may try to do it dynamically (looks fun, never did it)
Thanks
Joe
It will perform better...
November 14, 2013 at 3:18 pm
IgorMi (11/14/2013)
By specifying identity(1,1) primary key, you already have clustered primary key. For the property identity(1,1) there is no...
November 14, 2013 at 3:09 pm
I would suggest that you take a look at the stairways articles right here on SSC. Proper knowledge of indexes is vital to the performance of your system.
http://www.sqlservercentral.com/stairway/72399/%5B/url%5D
Also, SQL server...
November 14, 2013 at 3:02 pm
This is a type of catch all query. Check out this article for an explanation of how to handle this type of thing.
http://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/%5B/url%5D
November 14, 2013 at 2:43 pm
Something like this?
select 'All' as code, 'All Locations' as name, 1 as SortOrder
union all
select code, name, 2 from location
order by SortOrder, WhateverOtherSortingCriteria
November 14, 2013 at 12:15 pm
Chad Crawford (11/14/2013)
SQLRNNR (11/14/2013)
Greg Edwards-268690 (11/14/2013)
They are as rare as seeing a unicorn!
SQL Server covers such a...
November 14, 2013 at 10:38 am
David Tooker (11/14/2013)
GROUP BY Location,A.EmpId,EmpLastName,EmpFirstName,A.Type,A.Total_Hours.
that caused all the rows to be displayed.
Thanks...
November 14, 2013 at 9:27 am
Golden_eye (11/14/2013)
Hello,Any suggestions how I can prevent the NULL values in a column when the datatype is float?
Thanks
P.S. ISNULL(mycolumn,'0') is not working
Pretty sparse on details here. Not sure what you...
November 14, 2013 at 9:25 am
SteveEClarke (11/14/2013)
The problem is that there is a "Custom Database" setup which people have used Text/Char fields to store numeric in - what I am trying...
November 14, 2013 at 9:22 am
I know this is not the proper way of storing data
Phew!!! That is an understatement!!!
So do you have duplicates only on contact_number? If so, you could do something like this:
select...
November 14, 2013 at 9:02 am
Thanks for posting ddl and sample data. This goes a LONG way to making it easy on us.
This should work for you.
select ID, MAX(name), MAX(age), MAX(contact_number)
from #temp
group by ID
November 14, 2013 at 8:08 am
Viewing 15 posts - 6,271 through 6,285 (of 15,381 total)