Click here to Skip to main content
15,900,471 members
Home / Discussions / Database
   

Database

 
QuestionCombining two data base of the same schema Pin
militiaware14-Jun-06 22:09
militiaware14-Jun-06 22:09 
AnswerRe: Combining two data base of the same schema Pin
r.stropek15-Jun-06 0:20
r.stropek15-Jun-06 0:20 
QuestionHow to change date format Pin
MikeRT14-Jun-06 20:20
MikeRT14-Jun-06 20:20 
AnswerRe: How to change date format Pin
Eric Dahlvang15-Jun-06 3:55
Eric Dahlvang15-Jun-06 3:55 
QuestionAlter Tables Pin
myNameIsRon14-Jun-06 19:02
myNameIsRon14-Jun-06 19:02 
AnswerRe: Alter Tables Pin
r.stropek15-Jun-06 0:29
r.stropek15-Jun-06 0:29 
GeneralRe: Alter Tables Pin
myNameIsRon15-Jun-06 14:39
myNameIsRon15-Jun-06 14:39 
AnswerRe: Alter Tables Pin
Eric Dahlvang15-Jun-06 4:47
Eric Dahlvang15-Jun-06 4:47 
You could create this stored procedure, then just execute it with a delimited list of table names:

CREATE PROCEDURE AlterMyTables 
@cTablesToAlter varchar(500)
AS

declare @cSQL varchar(100)
declare @nLoc int
declare @nLoc2 int

select @nLoc = 1

while (@nLoc<len(@cTablesToAlter))
begin
	select @nLoc2 = CHARINDEX(',',@cTablesToAlter,@nLoc + 1 )

	if (@nLoc2=0)
	  	select @nLoc2 = len(@cTablesToAlter) +1
	
	select @cSQL = 'ALTER TABLE ' + SUBSTRING(@cTablesToAlter,@nLoc,@nLoc2-@nLoc) + ' ALTER COLUMN ItemNumber TEXT'
  	exec(@cSQL)

	select @nLoc = @nLoc2 +1
end


----------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters

GeneralRe: Alter Tables Pin
myNameIsRon15-Jun-06 14:38
myNameIsRon15-Jun-06 14:38 
Question'Best practices' info needed [modified] Pin
Gary Wheeler14-Jun-06 10:49
Gary Wheeler14-Jun-06 10:49 
AnswerRe: 'Best practices' info needed Pin
Colin Angus Mackay14-Jun-06 11:10
Colin Angus Mackay14-Jun-06 11:10 
GeneralRe: 'Best practices' info needed Pin
Gary Wheeler15-Jun-06 1:18
Gary Wheeler15-Jun-06 1:18 
QuestionDAO - Stored Procedure Execution Pin
KSMANN14-Jun-06 9:32
KSMANN14-Jun-06 9:32 
QuestionSystem.Data.DBConcurrencyException Pin
IMC200614-Jun-06 7:30
IMC200614-Jun-06 7:30 
Questionsqldataadapter sqlcommandbuilder stripping off identity column HELP??? Pin
isgrom14-Jun-06 7:16
isgrom14-Jun-06 7:16 
QuestionAggregation function error Pin
tadhg8814-Jun-06 4:02
tadhg8814-Jun-06 4:02 
AnswerRe: Aggregation function error Pin
Colin Angus Mackay14-Jun-06 5:34
Colin Angus Mackay14-Jun-06 5:34 
GeneralRe: Aggregation function error Pin
tadhg8814-Jun-06 6:39
tadhg8814-Jun-06 6:39 
GeneralRe: Aggregation function error Pin
Colin Angus Mackay14-Jun-06 8:16
Colin Angus Mackay14-Jun-06 8:16 
GeneralRe: Aggregation function error [modified] Pin
tadhg8822-Jun-06 4:31
tadhg8822-Jun-06 4:31 
Questiondo tasks perodically on SQL Server 2000 Pin
{darkside}14-Jun-06 3:22
{darkside}14-Jun-06 3:22 
AnswerRe: do tasks perodically on SQL Server 2000 Pin
ToddHileHoffer14-Jun-06 3:33
ToddHileHoffer14-Jun-06 3:33 
AnswerRe: do tasks perodically on SQL Server 2000 Pin
Frank Kerrigan15-Jun-06 5:03
Frank Kerrigan15-Jun-06 5:03 
GeneralRe: do tasks perodically on SQL Server 2000 [modified] Pin
{darkside}21-Jun-06 11:39
{darkside}21-Jun-06 11:39 
QuestionDatabase design question [modified] Pin
ToddHileHoffer14-Jun-06 2:34
ToddHileHoffer14-Jun-06 2:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.