Showing posts with label produce. Show all posts
Showing posts with label produce. Show all posts

Monday, March 19, 2012

BOL ABS Overflow error?

Ugh... Why does books online state that ABS can cause an overflow error?

The example given:

The ABS function can produce an overflow error. For example, the tinyint data type can hold only values that range from 0 to 255:

Copy Code SELECT ABS(CONVERT(tinyint, -256)); GO

It's the convert function that causes the overflow error, not ABS itself, right?

Hi Robert,

You're correct. It is the CONVERT function that is causing the overflow error in this example. Thanks for pointing that error out. We'll update the topic with a corrected example in a future update to Books Online.

Here's a better example.

DECLARE @.si smallint

SET @.si = -32768

SELECT @.si = ABS(@.si)

Regards,

Gail

boilerplate code/template for custom task UI?

does anyone know of any boilerplate code or templates (codesmith or other code-generation software) that can be used to produce a UI for a custom task?

Yes, I have one in my book:

Kirk Haselden
Author "SQL Server Integration Services"

Thursday, February 16, 2012

BLANK Lines

Hi,
I am running a stored procedure with many select
statements in it. I want the output from the stored
procedure NOT to produce Blank lines between each select
query. How can I do this. I am using Query Analyser to
execute the stored procedure and saving the results to a
text file.
Thanks,
SerghiosHi
It is not clear what you are trying to do here. Output in Query analyser is
not really designed for reports. You may want to look at a different tool.
If you are using something like ADO then it is not the blank lines that are
a problem! You will need to move to the next record set to obtain the second
set of results.
Alternatively... if the outputs are the same then you could use a union.
John
"Serghios" <Serghios.Florides@.elthion.com> wrote in message
news:37aa01c37494$4b8b2d60$a401280a@.phx.gbl...
> Hi,
> I am running a stored procedure with many select
> statements in it. I want the output from the stored
> procedure NOT to produce Blank lines between each select
> query. How can I do this. I am using Query Analyser to
> execute the stored procedure and saving the results to a
> text file.
> Thanks,
> Serghios