Viewing 15 posts - 1 through 15 (of 20 total)
:w00t: Thank You So Much Master :w00t:
Always be healthy " Sean Lange "
October 7, 2013 at 2:46 pm
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 sch.schema_id...
October 7, 2013 at 2:33 pm
This is done with the command ??
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'''' then...
October 7, 2013 at 2:19 pm
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 sc.name...
October 7, 2013 at 2:15 pm
The Name tables should be placed as one
EXEC 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
October 7, 2013 at 1:58 pm
I mean that this command can not be used (Sp-rename)
It does not matter to me what can be done with the command
Just change the column name in all tables should...
October 7, 2013 at 1:33 pm
After finding the table name command to rename writing
October 7, 2013 at 1:17 pm
HanShi (9/5/2013)
HAVING sum(case...
September 5, 2013 at 5:54 am
excuseme
Contact information table was forgotten
Plz Download New Database Attachment
SELECT FirstName, LastName, CompanyID, NCode, FatherName, nPercent, NationalCode
FROM View_Report
WHERE ...
September 5, 2013 at 5:06 am
Attach Sample Database (SQl 2008)
My Query is :
SELECT NationalCode, CompanyID, nPercent, NCode, FirstName, LastName, FatherName
FROM View_Report
WHERE...
September 2, 2013 at 5:27 am
First Table Personal Information Included Feilds :
NationalCode(Key), FirstName, LastName, CompanyID, NCode, FatherName, nPercent,
Second Table Tools Information Included Feilds :
ID_Tools(key),NationalCode ,TypeTools,NameTools,PriceTools
Third View(View_Report) Included Feilds :
NationalCode,FirstName, LastName, CompanyID,...
September 2, 2013 at 4:15 am
Mrci
You are quite right in my Answer
But I have a view and send it to the different conditions By Collection (Asp.net)
I added the condition to Having, but will...
September 2, 2013 at 3:27 am
My code is correct
I Tested
USE TestDb;
DECLARE @Table NVARCHAR(MAX),
@Col NVARCHAR(MAX)
DECLARE Table_Cursor CURSOR
FOR
SELECT a.name,b.name
FROM sysobjects a,syscolumns b
WHERE a.id = b.id
AND a.xtype = 'u'
AND...
January 17, 2012 at 1:05 am
mhike2hale (1/17/2012)
My script works.I think you did not execute this line:
exec(@queries)--execute your query
This will execute the generated scripts and make changes to your database.
Ok very Good
I quickly did...
January 17, 2012 at 12:58 am
Plz Download Attach Test Databace
And Run Your Query
January 17, 2012 at 12:42 am
Viewing 15 posts - 1 through 15 (of 20 total)