Viewing 15 posts - 49,711 through 49,725 (of 59,102 total)
Very good article... you did a heck of a good job on it. 🙂
Just a couple of observations...
You did all of this just because BCP won't export column headers......
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2008 at 3:10 pm
Wow... lots of RBAR there 😀
For starters, you can replace the following WHILE loop...
declare @cnt int
declare @UnitCount int
set @cnt=1
set @UnitCount=1
while @cnt<len(@s_Table_PkgNumber)
begin
if(substring(@s_Table_PkgNumber,@cnt,1)=', ')
begin
set @UnitCount=@UnitCount+1
end
set @cnt=@cnt+1
End
... with this...
SET @UnitCount = LEN(@s_Table_PkgNumber)-LEN(REPLACE(@s_Table_PkgNumber,',',''))+1
That one...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2008 at 7:31 am
Darned forum... please replace the smiley faces in the code with right parenthesis...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2008 at 7:12 am
Here's an example of what I'm talking about... go look at the nightmare code behind sp_MsForEachTable and sp_SpaceUsed... both can be replaced with this relatively simple and very fast...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2008 at 7:11 am
sp_MSforeachtable is nothing more than a cursor/RBAR on steroids...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2008 at 7:06 am
habib_nub (6/25/2008)
i want to insert multiple data into multiple tables column
You need to include a wee bit more info about what you want to do than that. Otherwise,...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2008 at 6:51 am
Sorry... you are talking about "Table Variables"... best to look up about those in Books Online and take a look at the following article...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2008 at 6:47 am
Change the default setting will likely open a huge can of worms for you... lot's of other folks code depends on NULLs not being equal to anything and changing that...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2008 at 6:45 am
That's what happens when you "send" it to just one person, Venki... why don't you post the procedure here so we can all lend a hand... 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2008 at 6:40 am
Studying the code for sp_help and sp_SpaceUsed will give you a wealth of knowledge about system "tables"... the code sucks (especially for sp_SpaceUsed) but where they get some of the...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2008 at 6:28 am
Umm... I don't email reports or even let folks know when something has been updated... because it's always updated (with a few exceptions of course).
Favorite "trick" is to write an...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2008 at 6:24 am
Oh yeah... I'm a bit lazy myself... that's why I wrote a little ditty that also adds the commas to the column names... 😀
I've got one for INSERT/SELECTs... writes the...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2008 at 6:03 am
That would be true... and, except for what may occur on Inserts, indexes don't harm another's query.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2008 at 5:56 am
No... I've verified that sp_help is bound to Alt-F1... it just doesn't work for me. I highlight the table name as you suggested and press Alt-F1... all that happens...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2008 at 5:54 am
Nice article, Austin... title is just a bit deceiving, though. Most of the article talks about how to setup a report instead of about how to email. From...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2008 at 5:35 am
Viewing 15 posts - 49,711 through 49,725 (of 59,102 total)