you don't need the sub.productnamecode in your outer query select max (sub.number) no_pro from ( select productnamecode, count(*) number...
see http://www.sommarskog.se/arrays-in-sql-2005.html http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm
is it always in pairs ? Will there be situation where there are more than 2 records within the time range that you specified ? And in such case how...
Since you are zipping the database backup file, just use the zip software to break into multiple files while zipping it. Check the documentation of...
Or you can make use of a random generation function by MVJ from...
seehttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926 KH
try this CREATE TABLE #temp ( valuedecimal(10,2) ) INSERT INTO #temp (value) SELECT10UNION ALL SELECT20UNION ALL SELECT30UNION ALL SELECT40UNION...
Do you have any problem with your delete query, post it here, we will help to fix it. Also please refer to the Books Online on the syntax for...
try adding this line left outer JOIN SystemUsers su1 on s.ShiftClosedBy = su1.SystemUserID or s.ShiftClosedBy is...
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by...
Rule 1 : update t set grade = 'A' from table where examscore is not null and areacode is not null Rule 2 : update t set grade =...
ninglima, You want the average time taken by hour ? Can you post your table structure and some sample data ? KH
you can't aliased a column in the order by and group by. You can just use the column alias in the order by but you have to use the full expression in...
also your insert statement is wrong. insert #a1 values(1,'testing1') insert @b1 values(1,'testing1') KH
Update b set [desc] = 'testing3' from #c1 a inner join @b1 b onb.cno = a.cno KH
try this update o set StatusDate = a.StatusDate from tbl o inner join tbl a on o.PaperID = a.PaperID and o.StatusKey <> 'A'...
please do not cross post http://www.sql-server-performance.com/forum/topic.asp?TOPIC_ID=21827 KH
Please do not cross post. http://www.sql-server-performance.com/forum/topic.asp?TOPIC_ID=21827 KH
can you post the query that you used ? and also what is the result that sp_diskspace return ? KH
<br />May Nonut = McDonald<br />kalah ok = Karaoke<br />annie wear sari = anniversary<br /><br />Anybody guess correctly what that is ? [<img...
Separate names with a comma.