Showing posts with label suppose. Show all posts
Showing posts with label suppose. Show all posts

Sunday, March 25, 2012

Comparing One Database to another for Changes..?

Hi,
Lets suppose i am having 2 database that is
Database1 and Database2
Then both datbases are same having same number of tables, sp's, vies and etc.
Then wht i have done is i have added two tables in database1 tb23 and tb24, and at the same time i have added one table out of these two table that is tb23 in the database2,
Now i want a querry by using that querry i am able to find out that how many objects are there that are present in database1 but not in database2. Basically i want to do comparison in between two databases.
ANY QUERRY, OR ANY TOOL by using which we can acheive this.....
HOW?

Dear Prashant,

Check this

http://msdn2.microsoft.com/en-us/library/aa833297(VS.80).aspx#CompareSchemasofTwoDatabases

For a 30 day evaluation version, you can use this.

Also check the Tablediff Utility in Books Online for SQL Server 2005 for comparing tables.

HTH,
Suprotim Agarwal

--
http://www.dotnetcurry.com
--

|||Check out RedGate SQLCompare.

http://www.red-gate.com/products/SQL_Compare/index.htm

Sunday, February 12, 2012

comma separated value

Suppose I have a table like this

code Value
1 a
1 a
1 b
2 c
2 c
1 d
2 g

Now my require ment that I want a distinct comma separated report about these data.Means for code 1 I need a comma separated distinct values.In this case it should be a,b,d
My output should be like this
1 a,b,d
2 c,g
Can anybody help me I can I do this with the help of a cursor or any other way?
SubhasishOriginally posted by subhasishray
Suppose I have a table like this

code Value
1 a
1 a
1 b
2 c
2 c
1 d
2 g

Now my require ment that I want a distinct comma separated report about these data.Means for code 1 I need a comma separated distinct values.In this case it should be a,b,d
My output should be like this
1 a,b,d
2 c,g
Can anybody help me I can I do this with the help of a cursor or any other way?
Subhasish

there is an article explaining exactly what u are looking for :
http://www.sqlteam.com/item.asp?ItemID=256

Regards,
Harshal.