Viewing 15 posts - 166 through 180 (of 1,156 total)
I forgot to mention that you can also query the information schemas to get quick access to detailed table and column information.
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
March 27, 2008 at 5:43 pm
You will not be able to get away with this one, using your current methodology. You will have to use dynamic sql, unless anyone else has other options.
IF EXISTS...
March 27, 2008 at 5:38 pm
I would include some logic to prevent the sp from being created in the system databases. I would also check for existence; otherwise, you can get an error.
sp_MSforeachdb
'USE...
March 27, 2008 at 5:29 pm
I feel obliged, for the sake of accuracy, to point out that although your co-workers steps for adding a column to a table bear an eerie similarity to the scripts...
March 27, 2008 at 1:41 pm
I dont think it matters. The service pack should update on a per instance basis. Meaning when you install service packs it will update all nodes for that...
March 27, 2008 at 1:31 pm
Are you trying to search for 'cat' in a particular column or every column of every table? What exactly is the purpose for this search?
March 27, 2008 at 1:25 pm
Good point Michael. If positioning of the column is needed, the alter statement will not help you.
March 27, 2008 at 11:24 am
You may want to turn on profiler and catch what is going on when the stored procedure runs. this way you can see what the memory,io, and locking really...
March 27, 2008 at 10:39 am
Thanks for doing the legwork :). I have been learning a lot of new stuff, in the past few days 😀
March 27, 2008 at 10:32 am
Adam, i think the whole drop thing and rename etc is only scripted by SSMS when you alter a column (create new table with new structure, copy accross the data,...
March 27, 2008 at 10:28 am
Simple recovery does not mean the log is not used. If transaction were not logged in the t-log how would you rollback transactions? This is why the t-log...
March 27, 2008 at 10:22 am
Chris,
The reason the developer prefers this method is Microsoft creates its change script just like this. If you make a change to a table via SSMS, a create change...
March 27, 2008 at 10:09 am
does that answer it?
Not quite.
Basically the question is can you put this into over().
sum(werksmassFM / (Sum_Lmenge.SumCol/ls.lmenge)* p_transpreis)
March 27, 2008 at 9:33 am
Matt, can you use over with the sum of a calculation? I have never tried, but I believe the over is used for deterministic columns. Like I said...
March 27, 2008 at 9:03 am
SUM(CONVERT(NUMERIC(9,2),werksmassFM / (Sum_Lmenge.SumCol/ls.lmenge)* p_transpreis)) AS Rechnungsbetrag
This will only work if you use a group by in your query. You cannot perform aggregate functions without a group by, if multiple...
March 27, 2008 at 7:33 am
Viewing 15 posts - 166 through 180 (of 1,156 total)