RSS

Tag Archives: OLTP

Arabic Series for SQL Server Ranking Functions Part 1 – Ranking Function – RowNumber

Advertisements
 
Leave a comment

Posted by on July 15, 2011 in OLTP, SQLServer, SQLServer Tools, T-SQL

 

Tags: , , , , , , ,

Dynamic Alter Query for all columns in database

 

I submit this SQL statements maybe it’s useful for you all

it’s dynamic query which used to change current data types for selected columns in tables with specific name to new data types and you can make a lot of things by this SQL Statements

Example

declare @tb nvarchar(200),@col nvarchar(200)

DECLARE Table_Cursor CURSOR FOR

/*Select columns you want to change and put them in cursor*/

SELECT t.name tb, c.name col FROM sys.tables t inner join sys.columns c on t.object_id=c.object_id where c.name like ‘columnPrefix%’

order by tb

OPEN Table_Cursor;

FETCH NEXT FROM Table_Cursor into @tb,@col;

WHILE @@FETCH_STATUS = 0

BEGIN

/*Start Change Current data types to new data types */

select @tb,@col

Execute(‘ALTER TABLE ‘+@tb+‘ ALTER COLUMN ‘+@col+

nvarchar(300) null’) ;

FETCH NEXT FROM Table_Cursor into @tb,@col;

END;

CLOSE Table_Cursor;

DEALLOCATE Table_Cursor;

GO

 
Leave a comment

Posted by on January 15, 2010 in Cursor, OLTP, SQLServer, T-SQL

 

Tags: , ,

SQLHero Dec Session – Microsoft Egypt

SQLHero delivered June Session in Microsoft SQL Server 2008

Topic Microsoft SQL Server 2008
Date Dec 29, 2009
Time 10:00 – 3:00
Location Microsoft, Smart Village
Presenter Ahmed Mosa
Presentation download
 

Tags: , , , , , , ,

SQLHero Nov Session – Microsoft Egypt

SQLHero delivered June Session in SQL Enterprise Reporting (SQL2008)

Topic SQL Enterprise Reporting (SQL2008)
Date Nov 19, 2009
Time 10:00 – 3:00
Location Microsoft, Smart Village
Presenter Ahmed Mosa
Presentation download
 

Tags: , , , , ,

SQLHero Oct Session – Microsoft Egypt

SQLHero delivered June Session in SQL Enterprise Reporting (SQL2008)

Topic SQL Enterprise Reporting (SQL2008)
Date Oct 29, 2009
Time 10:00 – 3:00
Location Microsoft, Smart Village
Presenter Ahmed Mosa
Presentation download
 

Tags: , , , , , ,

Virtual Labs

you can now test SQL Server 2008 new features through virtual labs on line in Business intelligence, Data warehousing, OLTP and Application Deployments

believe me really useful

http://www.microsoft.com/sqlserver/2008/en/us/virtual-labs.aspx

 

Tags: , , , ,

 
%d bloggers like this: