Hi, i'm writing a simple sp that check if an email address already exist in
an AddressBook table.
This sp expect a parameters called @.Address.
When i call this sp and pass to it an email address which contains an at
character (@.) the stored procedure will return no values.
i think the @. alter the parameters value.
Whitout the @. char the sp works fine .
Can someone help me?
ThanksIf you post the stored procedure the chances of getting help will be
much, much better.
Roy Harvey
Beacon Falls, CT
On Wed, 3 May 2006 14:59:01 -0700, Pantano Antonio
<PantanoAntonio@.discussions.microsoft.com> wrote:
>Hi, i'm writing a simple sp that check if an email address already exist in
>an AddressBook table.
>This sp expect a parameters called @.Address.
>When i call this sp and pass to it an email address which contains an at
>character (@.) the stored procedure will return no values.
>i think the @. alter the parameters value.
>Whitout the @. char the sp works fine .
>Can someone help me?
>Thanks|||How does your routine differ from the following?
create table address_book
(
address varchar(64)
)
insert address_book values ('address@.google.com')
create procedure add_check
@.address varchar(64)
as
if exists (select 1 from address_book where address = @.address)
print 'exists'
else
print 'not exists'
declare @.address varchar(64)
set @.address = 'address@.google.com'
exec add_check @.address|||Thanks. I solved. The error was that the parameter i declared was nvarchar
without the size.
When i changed it whit the same size of the table column, nvarchar(70), the
stored procedure works well and return me the right result.
Thanks to all.
Showing posts with label expect. Show all posts
Showing posts with label expect. Show all posts
Friday, March 9, 2012
Friday, February 17, 2012
Effect of Shrinking a DB
Just wondering, other than the effect of making the database smaller, how does the shrink call affect actual performance? Should I expect an performance increase after it is done? Thanks.
~piroGenerally all shrink does it reduce the size of the database files, no real performance gain as far as I know. You have to ask your self why did they grow to that size in the first place, before shrinking them as it is a performance hit when they have to grow again.|||Thank you for replying.
So there really is no performance decrease when I shrink the database. The performance hit will come from db growth, which is normal. Do you know of any other commands or functions that are similar to Access's compact command?
~piro|||Not sure what Access's compact command does, but DBCC SHRINKDATABASE can move all data to contiguous pages and remove any remaining unused space. This has the potential of reducing I/O since you would need to read fewer pages to access all data.|||Good point, forgot about the moving of data pages.
~piroGenerally all shrink does it reduce the size of the database files, no real performance gain as far as I know. You have to ask your self why did they grow to that size in the first place, before shrinking them as it is a performance hit when they have to grow again.|||Thank you for replying.
So there really is no performance decrease when I shrink the database. The performance hit will come from db growth, which is normal. Do you know of any other commands or functions that are similar to Access's compact command?
~piro|||Not sure what Access's compact command does, but DBCC SHRINKDATABASE can move all data to contiguous pages and remove any remaining unused space. This has the potential of reducing I/O since you would need to read fewer pages to access all data.|||Good point, forgot about the moving of data pages.
Subscribe to:
Posts (Atom)