Showing posts with label created. Show all posts
Showing posts with label created. Show all posts

Wednesday, March 21, 2012

Does Report Builder support Analysis Services Databases?

The webcast on Report Builder mentioned that you can run reports that were
created in Report Designer in Report Builder. Is it possible?There are two questions in your post.
1. Does Report Builder support Analysis Services Databases?Yes, with
Analysis Services 2005. You can automatically generate the model from an
SSAS 2005 cube in the Management Studio.
2. Is it possible to open reports that were created in the Report Designer
in the Report Builder? Sort of. Some Report Designer features are not
supported in the Report Builder since the Report Designer is more advanced.
I am not aware about a document that lists all of these features. The
reverse should be OK -- you shoudl be able to open Report Builder reports in
the Report Designer.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"Dan Krish" <DanKrish@.discussions.microsoft.com> wrote in message
news:41DCA968-5E67-4D8B-B66A-3E9A83E5E214@.microsoft.com...
> The webcast on Report Builder mentioned that you can run reports that were
> created in Report Designer in Report Builder. Is it possible?|||Hi,
Thanks for the info.
I am not able to open a Report Builder report iN Report Designer. When I go
to the preview screen of the report (.rdl), it throws an error that it cannot
find the Model. I guess we need to change the rdl definition to open it
properly. Do you have any idea how to correct the information and open Report
Builder report in Report Designer.
"Teo Lachev [MVP]" wrote:
> There are two questions in your post.
> 1. Does Report Builder support Analysis Services Databases?Yes, with
> Analysis Services 2005. You can automatically generate the model from an
> SSAS 2005 cube in the Management Studio.
> 2. Is it possible to open reports that were created in the Report Designer
> in the Report Builder? Sort of. Some Report Designer features are not
> supported in the Report Builder since the Report Designer is more advanced.
> I am not aware about a document that lists all of these features. The
> reverse should be OK -- you shoudl be able to open Report Builder reports in
> the Report Designer.
> --
> HTH,
> ---
> Teo Lachev, MVP, MCSD, MCT
> "Microsoft Reporting Services in Action"
> "Applied Microsoft Analysis Services 2005"
> Home page and blog: http://www.prologika.com/
> ---
> "Dan Krish" <DanKrish@.discussions.microsoft.com> wrote in message
> news:41DCA968-5E67-4D8B-B66A-3E9A83E5E214@.microsoft.com...
> > The webcast on Report Builder mentioned that you can run reports that were
> > created in Report Designer in Report Builder. Is it possible?
>
>|||1. Save the ad hoc report as a file.
2. Open it in your RS project.You shoudl be able to see its layout but not
to preview it.
3. Add a data source based on the Report Server Model. extension with a
connection string, such as
server=http://localhost/reportserver;datasource=/<Folder>/<your model name>
4. Link the report dataset to that data source.
Now you should be able to preview the report.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"Dan Krish" <DanKrish@.discussions.microsoft.com> wrote in message
news:5D591912-0FD8-4812-A44F-8CB3FE312C84@.microsoft.com...
> Hi,
> Thanks for the info.
> I am not able to open a Report Builder report iN Report Designer. When I
> go
> to the preview screen of the report (.rdl), it throws an error that it
> cannot
> find the Model. I guess we need to change the rdl definition to open it
> properly. Do you have any idea how to correct the information and open
> Report
> Builder report in Report Designer.
>
> "Teo Lachev [MVP]" wrote:
>> There are two questions in your post.
>> 1. Does Report Builder support Analysis Services Databases?Yes, with
>> Analysis Services 2005. You can automatically generate the model from an
>> SSAS 2005 cube in the Management Studio.
>> 2. Is it possible to open reports that were created in the Report
>> Designer
>> in the Report Builder? Sort of. Some Report Designer features are not
>> supported in the Report Builder since the Report Designer is more
>> advanced.
>> I am not aware about a document that lists all of these features. The
>> reverse should be OK -- you shoudl be able to open Report Builder reports
>> in
>> the Report Designer.
>> --
>> HTH,
>> ---
>> Teo Lachev, MVP, MCSD, MCT
>> "Microsoft Reporting Services in Action"
>> "Applied Microsoft Analysis Services 2005"
>> Home page and blog: http://www.prologika.com/
>> ---
>> "Dan Krish" <DanKrish@.discussions.microsoft.com> wrote in message
>> news:41DCA968-5E67-4D8B-B66A-3E9A83E5E214@.microsoft.com...
>> > The webcast on Report Builder mentioned that you can run reports that
>> > were
>> > created in Report Designer in Report Builder. Is it possible?
>>|||You need to create a data source that uses the Report Server Model extension
with a connection string sth like:
server=http://localhost/reportserver;datasource=/<Folder where model is
located>/<model name>
Next, you need to bind the report dataset to that data source.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"Dan Krish" <DanKrish@.discussions.microsoft.com> wrote in message
news:5D591912-0FD8-4812-A44F-8CB3FE312C84@.microsoft.com...
> Hi,
> Thanks for the info.
> I am not able to open a Report Builder report iN Report Designer. When I
> go
> to the preview screen of the report (.rdl), it throws an error that it
> cannot
> find the Model. I guess we need to change the rdl definition to open it
> properly. Do you have any idea how to correct the information and open
> Report
> Builder report in Report Designer.
>
> "Teo Lachev [MVP]" wrote:
>> There are two questions in your post.
>> 1. Does Report Builder support Analysis Services Databases?Yes, with
>> Analysis Services 2005. You can automatically generate the model from an
>> SSAS 2005 cube in the Management Studio.
>> 2. Is it possible to open reports that were created in the Report
>> Designer
>> in the Report Builder? Sort of. Some Report Designer features are not
>> supported in the Report Builder since the Report Designer is more
>> advanced.
>> I am not aware about a document that lists all of these features. The
>> reverse should be OK -- you shoudl be able to open Report Builder reports
>> in
>> the Report Designer.
>> --
>> HTH,
>> ---
>> Teo Lachev, MVP, MCSD, MCT
>> "Microsoft Reporting Services in Action"
>> "Applied Microsoft Analysis Services 2005"
>> Home page and blog: http://www.prologika.com/
>> ---
>> "Dan Krish" <DanKrish@.discussions.microsoft.com> wrote in message
>> news:41DCA968-5E67-4D8B-B66A-3E9A83E5E214@.microsoft.com...
>> > The webcast on Report Builder mentioned that you can run reports that
>> > were
>> > created in Report Designer in Report Builder. Is it possible?
>>|||Hi
> 1. Does Report Builder support Analysis Services Databases?Yes, with
> Analysis Services 2005. You can automatically generate the model from an
> SSAS 2005 cube in the Management Studio.
Where is that option located?
Thanks,
Andrés
"Teo Lachev [MVP]" <teo.lachev@.nospam.prologika.com> wrote in message
news:e3zEGJs5FHA.2776@.TK2MSFTNGP15.phx.gbl...
> There are two questions in your post.
> 1. Does Report Builder support Analysis Services Databases?Yes, with
> Analysis Services 2005. You can automatically generate the model from an
> SSAS 2005 cube in the Management Studio.
> 2. Is it possible to open reports that were created in the Report
> Designer in the Report Builder? Sort of. Some Report Designer features are
> not supported in the Report Builder since the Report Designer is more
> advanced. I am not aware about a document that lists all of these
> features. The reverse should be OK -- you shoudl be able to open Report
> Builder reports in the Report Designer.
> --
> HTH,
> ---
> Teo Lachev, MVP, MCSD, MCT
> "Microsoft Reporting Services in Action"
> "Applied Microsoft Analysis Services 2005"
> Home page and blog: http://www.prologika.com/
> ---
> "Dan Krish" <DanKrish@.discussions.microsoft.com> wrote in message
> news:41DCA968-5E67-4D8B-B66A-3E9A83E5E214@.microsoft.com...
>> The webcast on Report Builder mentioned that you can run reports that
>> were
>> created in Report Designer in Report Builder. Is it possible?
>|||In the SQL Server Management Studio, connect to your RS instance. Then,
right-click on a data source that points to SSAS 2005 and select Generate
Model.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"Andres" <andres.fontan@.alcuadrado.com> wrote in message
news:u1pSfXW8FHA.3504@.TK2MSFTNGP11.phx.gbl...
> Hi
>> 1. Does Report Builder support Analysis Services Databases?Yes, with
>> Analysis Services 2005. You can automatically generate the model from an
>> SSAS 2005 cube in the Management Studio.
> Where is that option located?
> Thanks,
> Andrés
>
>
> "Teo Lachev [MVP]" <teo.lachev@.nospam.prologika.com> wrote in message
> news:e3zEGJs5FHA.2776@.TK2MSFTNGP15.phx.gbl...
>> There are two questions in your post.
>> 1. Does Report Builder support Analysis Services Databases?Yes, with
>> Analysis Services 2005. You can automatically generate the model from an
>> SSAS 2005 cube in the Management Studio.
>> 2. Is it possible to open reports that were created in the Report
>> Designer in the Report Builder? Sort of. Some Report Designer features
>> are not supported in the Report Builder since the Report Designer is more
>> advanced. I am not aware about a document that lists all of these
>> features. The reverse should be OK -- you shoudl be able to open Report
>> Builder reports in the Report Designer.
>> --
>> HTH,
>> ---
>> Teo Lachev, MVP, MCSD, MCT
>> "Microsoft Reporting Services in Action"
>> "Applied Microsoft Analysis Services 2005"
>> Home page and blog: http://www.prologika.com/
>> ---
>> "Dan Krish" <DanKrish@.discussions.microsoft.com> wrote in message
>> news:41DCA968-5E67-4D8B-B66A-3E9A83E5E214@.microsoft.com...
>> The webcast on Report Builder mentioned that you can run reports that
>> were
>> created in Report Designer in Report Builder. Is it possible?
>>
>sql

Monday, March 19, 2012

Does not have permission to run DBCC CHECKIDENT

I have created a stored procedure in which i have created a temproray table with 2 fields, one is IDENTITY column and i set the seed by using DBCC CHECKIDENT but it gave an error about permission.

Please give suggestion for resolving this issue.

DBCC CHECKIDENT permissions default to the table owner, members of the sysadmin fixed server role, and the db_owner and db_ddladmin fixed database role

Pls check the ONLINE Document for more details..

Sunday, March 11, 2012

Does Interactive Sort works with Snapshots and Cached Reports?

I have created reports in RS 2005 using interactive sort on some columns.
When the reports are rendered real time, the sort works perfectly. When the
execution is changed to Snapshot, the sorting no longer works. When the
execution is set to Cached, the sort works the first time the report is
viewed, but not in subsequent viewings.
If this is a known bug, I'll give up on including this feature in my
reports. Can anyone confirm if this is supposed to work in RTM or SP1, or if
it's still on the bug list?
Thanks.I have this exact problem in designer mode with Visual 2005!
I have no clue what is going on - at times with RS2005 - was so stable with
2000 - now I am getting frustrated!
"Denise" wrote:
> I have created reports in RS 2005 using interactive sort on some columns.
> When the reports are rendered real time, the sort works perfectly. When the
> execution is changed to Snapshot, the sorting no longer works. When the
> execution is set to Cached, the sort works the first time the report is
> viewed, but not in subsequent viewings.
> If this is a known bug, I'll give up on including this feature in my
> reports. Can anyone confirm if this is supposed to work in RTM or SP1, or if
> it's still on the bug list?
> Thanks.

Friday, March 9, 2012

Does Computed Column Update on Select General Question

Okay, newb question alert!!!

I created a computer column that is based on the difference between the column start_date and getdate().

Does the computed column only update when you update the column or does it change when you select it also?

Nevermind... Sorry to crowd the forums with stupid questions... I gave it another two seconds worth of thinking and realized that if I changed it to seconds just for the sake of testing that I could see it updating (It was at months before and I didn't want to wait a month to find out)

Huh?

Sorry again about the wasted post!

Wednesday, March 7, 2012

Does auto update stats do anything if auto create stats are turned off

I am using SQL 2000 and wondered if a database is created and auto create
stats would be turned off, but auto update stats are turned on, does auto
update stats have any stats to update ? I am kinda confused ? Assuming we
load some tables with indexes and have stored procedures,etc..and start
modifying data, will update stats have any stats to work with since auto
create stats is off ? Will query plans ever be recompiled ? Will the query
optimiser figure a different execution plan ?
Are statistics ever created ? Do indexes behave like statistics ?
Thank youHi Hassan,
There is a difference between 'Statistics' as an 'object' and 'Statistical
Information' which is the data stored in the row.
When 'Auto Create Stats' Is turned off, no new statistics will be generated
automatically , i.e. no new statistical 'objects' will be created.
A column that already has a 'statistics' created for it, will still have
it's statistics information 'refreshed' or recollected. this option is
controlled by the 'Auto Update Statistics' option.
Statistics are a seperate object from Indexes. Indexes 'have' Statistics
information that is collected by the query optimizer and stored in the index
row in sysindexes.
Statistics are created not only for indexes, but also for unindexed columns
(for example, columns that participate in join conditions) and are also
stored in sysindexes.
This is done automatically by the query optimizer when the 'Auto Create
Statistics' option is on or you could create it yourself by using the CREATE
STATISTICS statement. To update statistics yourself, you can use the UPDATE
STATISTICS statement or the sp_updatestats system SP.
If you disable either DB options and just leave it at that (not creating and
updating stats), the query optimizer will not be able to choose optimal
execution plans.
It will still produce some plan and your queries will be executed but it's
bound to have a negative effect on performance.
I hope it makes some sense :-)
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:OQcYPi7YDHA.2032@.TK2MSFTNGP10.phx.gbl...
> I am using SQL 2000 and wondered if a database is created and auto create
> stats would be turned off, but auto update stats are turned on, does auto
> update stats have any stats to update ? I am kinda confused ? Assuming we
> load some tables with indexes and have stored procedures,etc..and start
> modifying data, will update stats have any stats to work with since auto
> create stats is off ? Will query plans ever be recompiled ? Will the query
> optimiser figure a different execution plan ?
> Are statistics ever created ? Do indexes behave like statistics ?
> Thank you
>|||So if I understand correctly, if Auto Create Stats are not turned on ,
'Statistics' will not be created and hence Auto Update Statistics will only
work with the index created 'Statistics' since only indexes are created
assuming we did not Create Statistics manually. Am I correct ?
"Amy" <l.a@.usa.com> wrote in message
news:eQbneiAZDHA.3232@.tk2msftngp13.phx.gbl...
> Hi Hassan,
> There is a difference between 'Statistics' as an 'object' and 'Statistical
> Information' which is the data stored in the row.
> When 'Auto Create Stats' Is turned off, no new statistics will be
generated
> automatically , i.e. no new statistical 'objects' will be created.
> A column that already has a 'statistics' created for it, will still have
> it's statistics information 'refreshed' or recollected. this option is
> controlled by the 'Auto Update Statistics' option.
> Statistics are a seperate object from Indexes. Indexes 'have' Statistics
> information that is collected by the query optimizer and stored in the
index
> row in sysindexes.
> Statistics are created not only for indexes, but also for unindexed
columns
> (for example, columns that participate in join conditions) and are also
> stored in sysindexes.
> This is done automatically by the query optimizer when the 'Auto Create
> Statistics' option is on or you could create it yourself by using the
CREATE
> STATISTICS statement. To update statistics yourself, you can use the
UPDATE
> STATISTICS statement or the sp_updatestats system SP.
> If you disable either DB options and just leave it at that (not creating
and
> updating stats), the query optimizer will not be able to choose optimal
> execution plans.
> It will still produce some plan and your queries will be executed but it's
> bound to have a negative effect on performance.
> I hope it makes some sense :-)
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:OQcYPi7YDHA.2032@.TK2MSFTNGP10.phx.gbl...
> > I am using SQL 2000 and wondered if a database is created and auto
create
> > stats would be turned off, but auto update stats are turned on, does
auto
> > update stats have any stats to update ? I am kinda confused ? Assuming
we
> > load some tables with indexes and have stored procedures,etc..and start
> > modifying data, will update stats have any stats to work with since auto
> > create stats is off ? Will query plans ever be recompiled ? Will the
query
> > optimiser figure a different execution plan ?
> >
> > Are statistics ever created ? Do indexes behave like statistics ?
> >
> > Thank you
> >
> >
>|||AFAIK, Auto update will continue to update all statistics that were created
before turning the option off, including indexes and column statistics.
If you did not execute any queries on the DB prior to turning the auto
create option off, probably no auto statistics were created for columns.
It is recommended that you leave both options 'on'.
The creation process will probaly have a quick 'run in' time. Initially,
there will be no column statistics. once you start issuing queries against
the DB, the query optimizer will create the proper statistics and once it
has 'seen' all your queries, there will be no need to create new ones unless
you change the schema or introduce new queries that use previously unused
columns for joining, searching etc.
The updating process is controlled by SQL server. It uses an algorithm that
takes into account the size of the table and the number of changed rows
since the last statistics collection. It will automatically initiate the
recollection of statistical data when it thinks the old data might be
invalid.
'The cost of this automatic statistical update is minimized by sampling the
data, rather than analyzing all of it.'
Unless your DB experinces very heavy modifications on very large tables and
you have verified for a fact that the statistical update process is causing
performance issues during peak usage and you make sure that the density and
distribution of data does not change in such a way that not updating the
statistics will not cause the optimizer to choose inappropriate plans and
have tested this thoroughly and have prepared some alternatives to creation
and update of statistics during off peak hours etc. etc. then there is
really no need to turn these option off.
Look in BOL under 'statistical information'.
Kalen's 'Inside SQL Server 2000' has an excellent chapter about the query
processor and the way SQL Server handles statistics.
HTH
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:eoTHooBZDHA.2020@.TK2MSFTNGP10.phx.gbl...
> So if I understand correctly, if Auto Create Stats are not turned on ,
> 'Statistics' will not be created and hence Auto Update Statistics will
only
> work with the index created 'Statistics' since only indexes are created
> assuming we did not Create Statistics manually. Am I correct ?
> "Amy" <l.a@.usa.com> wrote in message
> news:eQbneiAZDHA.3232@.tk2msftngp13.phx.gbl...
> > Hi Hassan,
> >
> > There is a difference between 'Statistics' as an 'object' and
'Statistical
> > Information' which is the data stored in the row.
> > When 'Auto Create Stats' Is turned off, no new statistics will be
> generated
> > automatically , i.e. no new statistical 'objects' will be created.
> > A column that already has a 'statistics' created for it, will still have
> > it's statistics information 'refreshed' or recollected. this option is
> > controlled by the 'Auto Update Statistics' option.
> >
> > Statistics are a seperate object from Indexes. Indexes 'have' Statistics
> > information that is collected by the query optimizer and stored in the
> index
> > row in sysindexes.
> > Statistics are created not only for indexes, but also for unindexed
> columns
> > (for example, columns that participate in join conditions) and are also
> > stored in sysindexes.
> > This is done automatically by the query optimizer when the 'Auto Create
> > Statistics' option is on or you could create it yourself by using the
> CREATE
> > STATISTICS statement. To update statistics yourself, you can use the
> UPDATE
> > STATISTICS statement or the sp_updatestats system SP.
> >
> > If you disable either DB options and just leave it at that (not creating
> and
> > updating stats), the query optimizer will not be able to choose optimal
> > execution plans.
> > It will still produce some plan and your queries will be executed but
it's
> > bound to have a negative effect on performance.
> >
> > I hope it makes some sense :-)
> >
> > "Hassan" <fatima_ja@.hotmail.com> wrote in message
> > news:OQcYPi7YDHA.2032@.TK2MSFTNGP10.phx.gbl...
> > > I am using SQL 2000 and wondered if a database is created and auto
> create
> > > stats would be turned off, but auto update stats are turned on, does
> auto
> > > update stats have any stats to update ? I am kinda confused ? Assuming
> we
> > > load some tables with indexes and have stored procedures,etc..and
start
> > > modifying data, will update stats have any stats to work with since
auto
> > > create stats is off ? Will query plans ever be recompiled ? Will the
> query
> > > optimiser figure a different execution plan ?
> > >
> > > Are statistics ever created ? Do indexes behave like statistics ?
> > >
> > > Thank you
> > >
> > >
> >
> >
>

Sunday, February 19, 2012

Documentation

I'd like to know what best practice is on documenting a new database that I
created. What type of diagrams and definitions and how specific or high
level should the documentation be?
Thanksthat's hard to answer without knowing the particulars of your database
or application, however, i use the following guideline for documenting
pretty much anything i work on: if someone new were to take over your
role, would they have enough documentation to do the job?
sorry for the unspecific answer.
arthur

Friday, February 17, 2012

Document map Problem

I accidentally created a document map and would like to remove it but I can
not find out which object in the report is causing the map to be generated.
I have a Chart and a matrix in the report. How can I figure out what is
causing the map to get created?
TIA
Deanthe one that's named is the one with something in the label; remove that value
"Dean" wrote:
> I accidentally created a document map and would like to remove it but I can
> not find out which object in the report is causing the map to be generated.
> I have a Chart and a matrix in the report. How can I figure out what is
> causing the map to get created?
> TIA
> Dean
>
>

Document Map for Excel

I've created a document map which displays a text string as the bookmark label (Document map label) when exporting to PDF (e.g. "January 2004", "March 2004"). However, when exporting to Excel, the tabs are named "Sheet1", "Sheet2", etc.

Is it possible to configure a report such that the tab names when exported to excel match the labels used in PDF?Excel worksheets (tabs) are a completely different concept than PDF bookmarks.
Excel worksheets are created based on the pages in the report. Support for providing specific names for Excel worksheets (i.e. report sections) is under consideration for a future release.
-- Robert

Document Map doesnt display in IE7

Can anyone help,

I have created a report which works great when the users run from IE6, but when anyone runs report from IE7, the report displays ok, but the document appears to build but displays absolutely nothing.

Has anyone seen this problem with IE7 using Reporting Services 2000?

Thanks people

See http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=971203&SiteID=1.

Tuesday, February 14, 2012

Do you understand this Error msg (ERROR Msg 512, Level 16, State 1, Line 33)

I have created a procedure which start by fecthing data from DB-X and put in into the temporary memory. what im trying to do now is to take data from temporary memory insert/update DB-Y.

But now I get this ERROR Msg 512, Level 16, State 1, Line 33
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

HERE IS MY PROCEDURE

DECLARE @.MineID int,
@.MineName varchar(80),
@.MineDescription [varchar](80) ,
@.MineLocation varchar(80),
@.Country varchar(80),
@.Northing float,
@.Easting float,
@.Elevation float,
@.Latitude float ,
@.Longitude float,
@.MineLogo varbinary(max)

DECLARE MYCURSOR CURSOR
FOR SELECT * FROM [TLC].[DBO].[MINE]
OPEN MYCURSOR
FETCH NEXT FROM MYCURSOR INTO
@.MineID,
@.MineName ,
@.MineDescription ,
@.MineLocation ,
@.Country ,
@.Northing ,
@.Easting ,
@.Elevation ,
@.Latitude,
@.Longitude,
@.MineLogo
WHILE @.@.FETCH_STATUS = 0

BEGIN

IF @.MineID =(select MineID from [TEST].[dbo].[MINE1])
SET IDENTITY_INSERT [TEST].[dbo].[MINE1] ON
BEGIN UPDATE [TEST].[dbo].[MINE1]
SET MineName = @.MineName
,MineDescription = @.MineDescription
,MineLocation = @.MineLocation
,Country =@.Country
,Northing = @.Northing
,Easting = @.Easting
,Elevation = @.Elevation
,Latitude = @.Latitude
,Longitude = @.Longitude
,MineLogo =@.MineLogo
where MineId = @.MineID

END
IF @.MineID <> (select MineID from [TEST].[dbo].[MINE1])
SET IDENTITY_INSERT [TEST].[dbo].[MINE1] ON
INSERT INTO [TEST].[dbo].[MINE1]
(MineID
,MineName
,MineDescription
,MineLocation
,Country
,Northing
,Easting
,Elevation
,Latitude
,Longitude
,MineLogo )
VALUES (
@.MineID
,@.MineName
,@.MineDescription
,@.MineLocation
,@.Country
,@.Northing
,@.Easting
,@.Elevation
,@.Latitude
,@.Longitude
,@.MineLogo)

FETCH NEXT FROM MYCURSOR INTO

@.MineID,
@.MineName ,
@.MineDescription ,
@.MineLocation ,
@.Country ,
@.Northing ,
@.Easting ,
@.Elevation ,
@.Latitude,
@.Longitude,
@.MineLogo

END
SET IDENTITY_INSERT [TEST].[dbo].[MINE1] OFF
SET IDENTITY_INSERT [TEST].[dbo].[MINE1] OFF
CLOSE MYCURSOR
DEALLOCATE MYCURSORYou don't need cursors for this purpose. Please look at following sample that demonstrates how you should synchronize your data:

create database temp
create database temp1
go
create table temp.dbo.mine(id int identity, name nvarchar(max))
create table temp1.dbo.mine(id int identity, name nvarchar(max))

insert temp.dbo.mine(name) values('UpdatedValue1')
insert temp.dbo.mine(name) values('UpdatedValue2')
insert temp.dbo.mine(name) values('UpdatedValue3')
insert temp.dbo.mine(name) values('UpdatedValue4')
insert temp.dbo.mine(name) values('UpdatedValue5')
insert temp.dbo.mine(name) values('NewValue6')
insert temp1.dbo.mine(name) values('OldValue1')
insert temp1.dbo.mine(name) values('OldValue2')
insert temp1.dbo.mine(name) values('OldValue3')
insert temp1.dbo.mine(name) values('OldValue4')
insert temp1.dbo.mine(name) values('OldValue5')
select * from temp.dbo.mine
select * from temp1.dbo.mine

update temp1.dbo.mine
set
name = Source.name
from temp.dbo.mine Source
where mine.id = Source.id

set identity_insert temp1.dbo.mine on
insert temp1.dbo.mine(id, name)
select id, name
from temp.dbo.mine
where id not in (select id from temp1.dbo.mine)
set identity_insert temp1.dbo.mine off

select * from temp.dbo.mine
select * from temp1.dbo.mine

drop database temp
drop database temp1
|||Thank you for your response, But my problem is not resolved yet, What im actually trying to do is to take data from Another DB-TLC to DB-Test. And these two database they are not integrated and we can't intergrate them.So what will happen is: if the data exist it can update else insert a new record. I'm not creating database from scratch.

this error is trigged by these statemement

IF @.BlasterID <> (select BlasterID from Blasters )
INSERT INTO [TEST].[dbo].[Blasters]

BELOW IS THE ERROR
{Msg 512, Level 16, State 1, Line 33
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.}

It seems like SQL doesn't want that , I have also tried the IF NOT EXIST clause but still it doesn't help. Please if you have any ideas agains on how to handle this with SQL please help|||

Quote:

Originally Posted by Sally1053

Thank you for your response, But my problem is not resolved yet, What im actually trying to do is to take data from Another DB-TLC to DB-Test

Have you looked at sample I provided? It demonstrates how to synchronize data from two different databases in more efficient way than you do.
--
Concerning your particular problem with
IF @.BlasterID <> (select BlasterID from Blasters ):
You can compare a variable (@.BlasterID) with resultset (select BlasterID from Blasters) only when resultset contains a single row with single column. In your case resultset contains all rows from Blasters table, not one. Correct solution is:
IF NOT EXISTS (select * from Blasters WHERE BlasterID = @.BlasterID)