Viewing 15 posts - 91 through 105 (of 424 total)
sorry, but xml always seems to get mangled in the post body. here's the function as an attachment.
July 29, 2008 at 12:05 pm
EXCEPT is not optimized to perform like a join. it's the same as doing thing as you dumping your first query into a temp table and then deleting any...
July 28, 2008 at 6:26 am
this will group anything to Sun-Sat weeks for each month:
select
year([your_date_column])*100 + month([your_date_column]) as year_month,
(day( [your_date_column] ) + 6 - datepart(weekday,[your_date_column])) / 7 + 1 as week_number,
min(day( [your_date_column] )) as...
July 27, 2008 at 7:04 pm
select replace(
replace(
replace(
convert( varchar(16), cast(1234.20 as money), 1 )
,'.','!')...
July 25, 2008 at 8:06 pm
you can do it by transforming report services XML output into Excel's XML format.
http://spacefold.com/lisa/post/Changing-the-Sheet-names-in-SQL-Server-RS-Excel-QnD-XSLT.aspx
July 23, 2008 at 3:54 pm
the stored procedure must return some data item by which you can partition.
if you can group by some data item, then adding a page break before/after a group...
July 23, 2008 at 3:50 pm
i assume you mean that the report exceeds excel's row limit and is split into 2 sheets when you export.
if so, you could add second table and have...
July 22, 2008 at 4:53 pm
best to cast all expressions to a common type or cast the entire case statement to the desired type.
July 22, 2008 at 4:41 pm
print is limited to 8K varchar and 4K nvarchar (since nvarchar is double byte).
PRINT msg_str | @local_variable | string_expr
Arguments
msg_str
Is a character string or Unicode string constant. For more information,...
July 21, 2008 at 1:41 pm
how are you building your string? if you're attempting to concatenate 'regular' varchars together, they'll max out at 8000 characters regardless of what you're trying to stuff them into.
declare...
July 21, 2008 at 1:15 pm
GSquared (7/14/2008)
July 14, 2008 at 7:49 am
GSquared (7/11/2008)
select case
when
...
July 11, 2008 at 2:07 pm
To me, a sub-query is dependent on the containing query. A derived table (table expression) is independent of the containing query. That's why the example below is invalid...
July 11, 2008 at 1:37 pm
antonio.collins (7/11/2008)
Ken Simmons (7/10/2008)
Select CASE WHEN 0 > any ( Select @val1 UNION ALL Select @val2 UNION ALL...
July 11, 2008 at 1:30 pm
Ken Simmons (7/10/2008)
Declare @Val1 int
Declare @Val2 int
Declare @Val3 int
Declare @Val4 int
Declare @Val5 int
Set @Val1 = 1
Set @Val2 =...
July 11, 2008 at 6:38 am
Viewing 15 posts - 91 through 105 (of 424 total)