Viewing 15 posts - 6,586 through 6,600 (of 15,381 total)
babak3334000 (10/7/2013)
Sean Lange (10/7/2013)
babak3334000 (10/7/2013)
select 'EXEC sp_rename N''' + sch.name + '.' + so.name + '.Phone'', N''TelePhone'', N''COLUMN'';',
*
from sys.objects so
join sys.columns sc on so.object_id = sc.object_id
join sys.schemas sch on...
October 7, 2013 at 2:37 pm
karunakar2351 (10/7/2013)
ALTER TABLE t ADD x char(1)
UPDATE t set x =1
Even when it lets me create that stored procedure (if I create it when x exists), when...
October 7, 2013 at 2:31 pm
babak3334000 (10/7/2013)
execsp_msforeachtable N'
IF EXISTS(SELECT 1 FROM sys.columns WHERE object_id=OBJECT_ID(''?'') AND name = ''Col1'')
EXEC (''UPDATE ? SET Col1= case when Col1 = ''''ppp''''...
October 7, 2013 at 2:25 pm
babak3334000 (10/7/2013)
select 'EXEC sp_rename N''' + sch.name + '.' + so.name + '.Phone'', N''TelePhone'', N''COLUMN'';',
*
from sys.objects so
join sys.columns sc on so.object_id = sc.object_id
join sys.schemas sch on sch.schema_id = so.schema_id
where...
October 7, 2013 at 2:24 pm
NineIron (10/7/2013)
Shouldn't there...
October 7, 2013 at 2:06 pm
babak3334000 (10/7/2013)
The Name tables should be placed as oneEXEC sp_rename N'TableName1.Phone', N'Telephone', N'COLUMN';
EXEC sp_rename N'TableName2.Phone', N'Telephone', N'COLUMN';
There are many Tables and Views
That looks to my like it...
October 7, 2013 at 2:03 pm
babak3334000 (10/7/2013)
It does not matter to me what can be done with the command
Just change the column name in all tables...
October 7, 2013 at 1:48 pm
babak3334000 (10/7/2013)
After finding the table name command to rename writing
I think you mean how do you rename the column once you find it?
You mentioned the proc in your first post...
October 7, 2013 at 1:22 pm
Quite simple. If you want your results in a given order, you need to add an ORDER BY to your query.
October 7, 2013 at 1:21 pm
RamSteve (10/7/2013)
In TableA We don't have Product Column, It only in TableB
You really need to quote the original post in your responses so we have a clue what you are...
October 7, 2013 at 1:19 pm
RamSteve (10/7/2013)
I guess this Query will delete all rows in TableA
Which query?
October 7, 2013 at 1:10 pm
I think you could use this for the same. It is a bit simpler but should accomplish the same thing.
DELETE TableA
FROM TableA a
WHERE a.ConsumerID IN
(
SELECT ConsumerID
FROM TableB
group by...
October 7, 2013 at 1:03 pm
RamSteve (10/7/2013)
and moreover this is not a home work , but i am trying...
October 7, 2013 at 12:50 pm
babak3334000 (10/7/2013)
HiI want to change the name of a column in all tables and views
(rename Feild "Phone" To "TelePhone")
Sp-ReName Change only one table can be done
Plz Help Me
You...
October 7, 2013 at 12:43 pm
DaveDB (10/7/2013)
October 7, 2013 at 12:29 pm
Viewing 15 posts - 6,586 through 6,600 (of 15,381 total)