Viewing 15 posts - 61 through 75 (of 223 total)
append charindex(':',task) > 0 to the query?
Not sure of the requirement. If you want to filter only subgroup 'a' and not 'b' or 'c' you may want to check out...
February 27, 2013 at 8:55 pm
select
Name, stuff((select ';' + Task from Allocation where Name = a.Name for xml path('') order by Task),1,1,'') [Tasks]
from
Allocation a
group by Name
Wrote on notepad, may have syntax error.
February 27, 2013 at 7:22 pm
I'm assuming you want to copy the output and execute it.
Try this
select col1 + char(10) + 'go' from table
February 27, 2013 at 4:11 am
It is not static. UPDATE STATISTICS updates the statistics that SQL Server stores for a table.
define: Statistics - The practice or science of collecting and analyzing numerical data in large...
January 8, 2013 at 12:33 am
The error says you tried to select a column which was not mentioned in the 'group by'. Post data and the complete query please!
October 25, 2012 at 6:47 am
Also, keep in mind that SQL Server stores statistics for left-based subsets of an index. You may want to look at all SPs or queries which refer to the table...
October 25, 2012 at 5:59 am
Check this out. My team ran into an issue when concatenating like in your example. The issue was that the output was different for the same query when a certain...
October 25, 2012 at 5:50 am
Memo, I think I understand the logic. I will post a query shortly and I hope it will help you. In the mean time, you may want to learn about...
October 24, 2011 at 3:52 am
set @a = 'if exists(select top 1 * from ' + @tableName +') select * from ' + @tableName
The code you have posted will not compile. Check before...
October 21, 2011 at 2:20 am
memostone86 (10/20/2011)
The logic is as followed:
For example, ID=1, the first change is on 7/3 18:45, TYPE=OFF, then we need to insert before 7/3/2011, all types should be ON
On the day...
October 21, 2011 at 1:50 am
Use google. It helps. I'm replying only because I assume you did a search and did not find many articles because you have got the term wrong.
http://www.sql-server-performance.com/2004/index-fragmentation/
- arjun
October 21, 2011 at 1:41 am
You can generate a dynamic query with Steve's query and use it with exec sp_executesql in case you do not want to execute manually.
- arjun
October 20, 2011 at 2:59 am
You can copy from bigint (not null) column to nvarchar(50) (null). It may not work the other way. I assume you intend to concatenate the ID value with some char...
September 14, 2011 at 4:39 am
This is pretty much what Sean has posted. More customized.
--a1 is the table that's missing lat-long info
update a1
set a1.latitude = a2.latitude, a1.longitude = a2.longitude
from address1 a1
join address2
on a2.street_address = a1.street_address
and...
September 13, 2011 at 7:32 am
Viewing 15 posts - 61 through 75 (of 223 total)