Viewing 15 posts - 136 through 150 (of 268 total)
sp_spaceused can also give the "possible innaccurate" value from sysindexes,
unless the paramter @updateusage is set true.
The belief that count(*) is bad practice and that you should use count(0) or...
July 2, 2004 at 6:41 am
-- No cursors please
set nocount on
create table #scores( person char(10) not null, grp int not null, result int not null,
primary key(person,grp) )
insert #scores(person,grp,result)
select...
July 2, 2004 at 5:06 am
You still have the same security context if you use qualified names.
specifying owner.object does not override your current security context for that object.
Using qualified names will tell sql server exectly...
July 2, 2004 at 4:46 am
After You have completed this task you will want to set the column to NOT NULL, and perhaps DEFAULT = -1.
ALTER TABLE myTable ALTER COLUMN myColumn INT NOT NULL
ALTER TABLE myTable...
July 2, 2004 at 3:57 am
Best practice is to fully qualify your names:
owner.name in same database,
databse.owner.name for calling into another database.
iof: " ...from dbA..TableA... "
better: " ...from dbA.dbo.TableA... "´
/rockmoose
July 2, 2004 at 3:42 am
EXEC myStoredProcedure @prm1 = 6, @prm2 = 7
So Sql Server has to find out that you are executing a stored procedure ?
EXEC( 'EXEC myStoredProcedure @prm1 = 6, @prm2 = 7'...
July 2, 2004 at 3:36 am
Why left join ???,
I think that is where the performance hit is.
You could rewrite sql like this:
UPDATE email_status_master
SET global_opt_out_ind = 1
FROM email_log l(nolock)
WHERE l.consumer_id = email_status_master.consumer_id
l.email_type_cd = 1
and email_status_master.email_sent_date...
July 2, 2004 at 3:23 am
There is no gotcha to not using sp_executesql or exec() afaik.
This is the way to do it, a parameter in a sp.
Imo a sp is more flexibe than using sp_executesql.
/rockmoose
July 2, 2004 at 2:54 am
Yup,
Good luck with your query string..
A common error (for me anyway) with long generated sql strings/scripts is to forget a space or to have a comma too much/little somewhere.
You...
July 1, 2004 at 10:12 am
Hi,
It seems that string varchar(8000) + string varchar(8000) is still equal to 8000.
Yes, that is true, adding two varchar(8000) will result in varchar(8000).
This shouldn't affect the beavior of execute(...
July 1, 2004 at 9:18 am
Some of our transaction systems use this technique. For example when a customers bill is adjusted, a new "credit" record is added which negates the first one, and then a...
July 1, 2004 at 7:14 am
Hi,
Do You have "incremental update filters" ? - see in BOL.
When Analysis Services does an incremental update, it does not not
update changed records, it only reads new records into the...
July 1, 2004 at 5:05 am
Hi,
You did not leave much to go on schemawise.
Maybe You could do it in the following way:
Retrieve 2 customer sets,
one with all the mall customers, and one with all the...
July 1, 2004 at 4:31 am
Glad to be of help
Keep practicing...
/rockmosse
July 1, 2004 at 3:07 am
create table #randomphonenumbers( nmbr char(10) primary key )
declare @digits table(nr char(1))
insert @digits(nr) select '0' union select '2' union select '4' union select '6' union select '8'
insert @digits(nr) select nr+1 from...
July 1, 2004 at 2:42 am
Viewing 15 posts - 136 through 150 (of 268 total)