COPY/PASTE From Project To Project

Jan 12, 2007

Howdy again...

Do I need to re-create a new package from scratch after doing what I did?
It seems I've made what is probably a typical newbie mistake: I used COPY/PASTE
to
consolidate containers from two packages into a single new project/package.

Now my new package generates multiple duplicate errors (23 of each...) whenever I open it:



Warning loading LoadBillingData.dtsx: Process configuration failed to set the
destination at the package path of "PackageData Flow Task to Load
Profiles, Versions, and
Transactions.EventHandlers[OnError].Variables[System::Propagate].Properties[Namespace]".
This occurs when attempting to set the destination property or variable fails.
Check the destination property or variable.



Error loading LoadBillingData.dtsx: Changing the name of a variable failed
because it is a system variable. System variables are read-only.



What happened:



new guy (goes without saying...) creates:

01. PROJECT A
02. add PACKAGE
A to PROJECT A
03. add some
containers, figger out what the heck is going on, get containers working
04. create
PROJECT B
05. create
PACKAGE B
06. add
containers, they work fine
07. whoops!
Want to consolidate the packages. Unix guy naively expects Bill has made MS
Visual Studio like all windows products (of which newbie is aware€¦):
08. create
PROJECT C
09. create
PACKAGE C
10. <ctrl
a> PACKAGE A
11. <crtl
c> PACKAGE A
12. <ctrl
v> PACKAGE C
13. <ctrl
a> PACKAGE B
14. <crtl
c> PACKAGE B
15. <ctrl
v> PACKAGE C
16. copy Flat
File Connection Managers
17. copy
Database Connection Manager
18. drag the
arrows around, fix the flat file sources, renew the column maps, etc
19. whoops! the
connections all look like a registry number! Fix the OLE DB Destinations,
Execute SQL Task containers by selecting the DB Connection Manager copied from
PROJECT A

20. successfully
execute PROJECT C/PACKAGE C
21. save all
22. exit
23. start MS
Visual Studio
24. Open
Solution
25. ERRORS!!!



Is this fixable?





Thanks,
Bill

View 1 Replies


ADVERTISEMENT

Team Project In TFS - SSIS Project Sets Itself As The Startup Project

May 29, 2008



For some reason in a Team Foundation Team Project that has multiple project types (SSRS, SSIS, WebSite, C# Business DLL...), the SSIS project makes itself the startup project to the team project. If I explicitly set another project as the startup project to the team project and then select an SSIS package in the SSIS project in the team project, the SSIS project becomes the startup project automatically.

I am using Visual Studio 2005 SP1.

View 3 Replies View Related

Problem In Opening The Project..Make Sure The Application For The Project Type (.dtproj) Is Installed.

Jun 24, 2007

Hi,

I have been working on some SSIS packages for a while now and today while i was working i was trying to create a new connection and in the process there was an error and it said the BIDS has to be closed and i closed it but later when i open BIDS and try to open my project(.sln) from the file menu to work on the half done package it pops up an error which shows the path to my project location on the first line and next statement on the pop up error box says:



"Make Sure the application for the project type (.dtproj) is installed."



I tried to check some forums in which some suggested to try installing SP1 which i tried but ..i dont know why but the SP1 fails to install (i dont know if its causing problem becoz i already installed SP2 as i had some other problem before for which the cure was to install SP2).



Did anyone here face such a problem before ?

I'd really appreciate if the experts here can tell a cure for this problem.



thanks,

Ravi

View 4 Replies View Related

Visual Studio 2005 Automatically Sets SSIS Project As Startup Project

Feb 23, 2007

I have a Visual Studio 2005 solution which contains a Sql Server Integration Services (SSIS) project.

In this solution I have explicitly set a Web application project as startup project, but whenever I edit a DTS package within the SSIS project, VS automatically sets the SSIS project as startup project and the package I edit as startup object.

Needless to say, this may cause some really unwanted incidents when running the solution - thinking that you're about to run the Web application project (that was explicitly set as startup project), but instead, you run the edited package in the SSIS project.

Is there any way to avoid having the SSIS project automatically setting itself as startup project, any workaround here at all? :)

Thanks.

View 4 Replies View Related

Integration Services :: Importing Deployed Project From Catalog Into New SSIS Project

Jun 16, 2015

in order to maintain a deployed project into an Integration Services Catalog I'd like to know if it is possible to import it into a new project inside SSDT.

View 5 Replies View Related

PSI: How To Update Custom Field Value For A Perticular Project Using PSI(Project Server 2007)

May 6, 2007

Hi,



I want to update value of a custom field for a perticular project in Project Server 2007 using PSI.



I have created 5 enterprise custom fields(A,B,C,D,E) through PWA/Server Settings.



I want to search all Projects on Server. If any project is having value for custom field A then I want to update rest of the custom fields(B,C,D,E) for that perticular project.



I dont know how to do it please help.





Thanks in Advance



Madhukar

View 5 Replies View Related

Can't Create A Setup Project For Project Referencing Microsoft.SqlServer.ManagedDTS

Feb 3, 2007

I have a very small project written in VB.Net 2005 using the SQL Server 2005 SSiS DTSx package.

I took a SQL Server 2000 dts package and using the SQL Server 3005 legacy tools migrated it so I could still use the package withing SQL 2005 until I can build one using BI/SSIS.

Anyway,I added the reference Microsoft.SqlServer.ManagedDTS so I could then use the Microsoft.SqlServer.Dts.Runtime so I can execute the commands:

Dim oApp As New Application
Dim oPkg As New Package
oPkg = oApp.LoadPackage(g_DTSx_Directory & "AOC copy Generic1 CSV to AOC_verify_file_1.dtsx", Nothing)
Dim oResults As DTSExecResult
oResults = oPkg.Execute

Ok. That works fine. Executes without a hitch. So now I try and create a setup project for this and I use the setup wizard.

During the creation of the setup project I get a message that states:
The following files may have dependencies that cannot be determined automatically. Please confirm that all dependencies have been added to the project.
C:windowssystem32msxml6.dll

OK. The dll is part of the reference I mentioned above and I have no idea what other dependencies it may have.

How do I find this out?

Has anyone else created a project like this and experenced the same?

I am on a clean build running WinXP Pro with SP2 - VS2005 with SP1 and the SQL Server 2005 tools.

View 1 Replies View Related

Integration Services :: Automate Process Of Creating A Project On SSISDB Based On SSIS Project Name?

Apr 20, 2015

I've got an SSIS solution file with project deployment model in VS 2013 and would like to deploy that to SSISDB on different environments.All these days I followed the regular way to create a project in SSISDB and deploy it to that. Now want to find out if i can automate this process and so got some questions 

1. Can we automate the process of creating a project on SSISDB based on our SSIS project name?  This will be like when we do a deployment it should check if the project exists or not on SSISDB based on our SSIS project name, if the project exists we just deploy the packages in the project and if the project does not exists in SSISDB it will create that project and deploy the packages.

2. Can we also automate the process of creating environments? In traditional way we manually create the environment variables under environment tab of SSISDB, but can we make that also as part of deployment? Like when we are releasing to Dev server we look if that particular Dev variable exists on that server, if it exists we just update the existing stuff and if it does not exists we just create it.

View 2 Replies View Related

Business Intelligence Project/Integration Services Project Not Showing Up In Visual Studio 2008

Mar 31, 2008

I have visual studio 2005 and sql server 2005 with integration service installed on my machine. Couple of days ago, I installed visual studio 2008 professional. When I go to create SSIS project I dont see it in visual studio 2008. What do I have to do to make it appear in visual studio 2008 so that I can create SSIS projects.

Thanks.

View 7 Replies View Related

Unable To Use Project Professional To Establish Connection To Project Server

Jul 23, 2007

I fail to use project professional 2003 to access to the project server 2003 using MSDE 2000 in local area network, following message was shown,



Connection failed:


SQLState: '01000' SQL Server Error 1326 [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect())
Connection failed:
SQLState '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.



I have seen these pages with similiar cases but can't help.

http://support.microsoft.com/kb/818047/

http://support.microsoft.com/kb/837653/en-us



Can anyone help me?? Thanks a lot!

View 1 Replies View Related

Create SQL Server Project In VB.NET 2.0 (Database Project)

Mar 13, 2008

Hi all  How can create trigger in sql server project in VB.NET 2.0 ?thanks in advance   

View 1 Replies View Related

Cannot Copy Sqlexpress To Another Pc For Vb.net 2.0 Project Update

Nov 1, 2006

Hi. I have done alot of searching around but can't find answer to this specific problem.

Here is my connection string in vb.net app config

<connectionStrings>
<add name="myfile.My.MySettings.ffgscrmConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|myfile.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>

The database is locally attached to the vb.net project residing in a data directory in the project. I am testing installation on a virtual pc - with no sql express managment or other sql server databases attached.

When I do a vb.net setup project and run this on, there is no problem. However, once having done that, when I want to update the app, I can't just copy in the new database along with exe. I get the error:"sql server does not allow remote connections (provider:sql network interfaces error 26 - error locating server/instance specified).

Is this a problem of the virtual PC? I am testing this because I need to be able to send updates to another local machine without using setup program.

View 1 Replies View Related

Cannot Open Database Problem When Copy Project To IIS

Oct 24, 2007

Hi all.I use VWD 2005 Express with SQL Server 2005 Express as a database.I copy my project to IIS and try to run it at the IIS Web Server.I already amended the connection string at web.config file as below:  <connectionStrings>
<add name="GeekSpeakConnectionString" connectionString="Data Source=SEN-M09SQLEXPRESS;Database=GeekSpeak.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>But, I got this error:Cannot open database "GeekSpeak.mdf" requested by the login. The login
failed.Login failed for user 'SEN-M09ASPNET'. I also has granted to user SEN-M09ASPNET . Still, I got this error. Why?

View 1 Replies View Related

Use Report Server Project To Connect To Report Model Project Data Source View?

Jan 17, 2008

Hello,
I've created a Report Model Project that can be used by Report Builder to generate ad-hoc reports. I'm trying to create a connection string in my Report Server Project that points to the Report Model Project data source view.

All I can do is create a regular datasource, which bypasses the metadata contained in the Data Source View.

Basically I want my Report Server Project and my Report Builder reports to leverage the same metadata. Is this possible? If so how do I get the connection string?

Thanks!!
-Matt

View 1 Replies View Related

BUG: Integration Services Project-can't Click On Save Copy Of Package As...

May 19, 2006

Hi.

I found a possible bug. If I open/create a new Integration Services Project and then try to save a copy of the package to SQL Server I found that for the option to "save Copy of Package As..." is only available if I am in the package itself. If I click (highlight) on the package in the Solution explorer and then click on the File tab, the "save Copy of Package As..." option is not available.

I hope that I explained this well enough.

thanks.

View 1 Replies View Related

Convert A SQLExpress File Based DB Project To SQLExpress Server DB Project

Jul 1, 2006

Hi All,I've been struggling with this for hours...Could someone please advise me on how to convert my current File based SQL Server Express website to a Server based SQL Express one.Particularly interested in what I need to do in the SQL Express management tool, changes I need to make the projecvt itself and changes needed to get IIS to understand things have been changed.Thanks,Martin.

View 1 Replies View Related

How To Use Xcopy && User Instance To Copy 3 Dbo Tables From The Database Of SQL Server Management Studio Express To The App_Data Folder Of Website Of VWD Express Project?

Jan 6, 2007

Hi all,
I have read/studied (i) Working with Databases in Visual Web Developer 2005 Express in http://quickstarts.asp.net/QuickStartv20/aspnet/doc/data/vwd.aspx, (ii) Xcopy Deployment (SQL Server Express) in http://msdn2.microsoft.com/en-us/library/ms165716.aspx, (iii) User Instances for Non-Administrators in http://msdn2.microsoft.com/en-us/library/ms143684.aspx, and (iv) Embedding SQL Server Server Express in Applications in http://msdn2.microsoft.com/en-us/library/ms165660.aspx.  I do not understand the concepts and procedures to do Xcopy and User Instances for non-administrators completely-I do not know how to connect to databases and create database diagrams or schemas using the Database Explorer.  I have a stand-alone Windows XP Pro PC. I have created a ChemDatabase with 3 dbo tables in the SQL Server Management Studio of my SQL Server Express and a website of my VWD Express application with an App_Data folder.  I am not able to proceed to use Xcopy and user instance to bring the 3 dbo tables of ChemDatabase to my App_Data folder. Please help and give me some detailed procedures/instructions to bring the 3 dbo tables of ChemDatabase (or ChemDatabase itself) from the SQL Server Management Studio Express to the App_Data folder of the website of my VWD Express project? 
Thanks in advance,
Scott Chang 
 

View 3 Replies View Related

Can Not Copy And Paste

Aug 23, 2006

Hi,

For some reason I can not cut and past objects in BIDS?

I receive the following error:

TITLE: Microsoft Visual Studio
------------------------------

An error occurred while objects were being copied. SSIS Designer could not serialize the SSIS runtime objects.

------------------------------
ADDITIONAL INFORMATION:

Could not copy object 'XSQL CICDB Synonym' to the clipboard.
(Microsoft.DataTransformationServices.Design)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%u00ae+Visual+Studio%u00ae+2005&ProdVer=8.0.50727.42&EvtSrc=Microsoft.DataTransformationServices.Design.SR&EvtID=SerializeComponentsFailed&LinkId=20476

------------------------------

Invalid access to memory location. (Exception from HRESULT: 0x800703E6) (Microsoft.SqlServer.ManagedDTS)

------------------------------
BUTTONS:

OK
------------------------------


Any ideas why?

Thanks!

View 3 Replies View Related

HOW TO COPY DATABASE & PASTE IN NEW M/c

Mar 6, 2006

Hi,
HOW TO COPY DATABASE & PASTE IN NEW M/c

I have a database on remote SQL SERVER M/c
Now i want to copy the database from remote m/c to my local machine. I have SQL 2000 Desktop edition.
I backup the datatbase from server and when i restore a database in local m/c, error msg comes ::

TITILE : Microsoft SQL-DMO(ODBC SQL State:HY000)

Location : upgraddb.cpp:214
Expression : tableIndex <Array_len(upgradeMap)
SPID: 7
ProcessID:2400

Error 22021:[SQL-DMO]You must be logged in as 'sa', or a member of sysadmin, or a member of dbcreator to

perform this operation.

weather i should install SQL desktop again with any special option or is there any way to copy a database from one m/c

to other .

Knidly help me ..

View 3 Replies View Related

Preavent Copy Paste

Nov 2, 2006

hi to all

i want to stop paste in my webpage's textbox
<script type="text/javascript" >

var sSave = "";
function fnBeforeCut() {
event.returnValue = false;
}

function fnCut(id) {
event.returnValue = false;
sSave = id.innerText;
id.innerText = "";
}

function fnBeforePaste() {
event.returnValue = false;
}

function fnPaste(id) {
event.returnValue = false;
id.innerText = sSave;
}

</script>
use this script in html textbox

when asp:textbox
txtcpassword.Attributes.Add("onSelectStart", "return false;")
txtcpassword.Attributes.Add("onPaste", "return false;")use this code
it working fine in intenetexplorer(microsoft)
but not work in firefox
please give me a solution it's urgent

View 4 Replies View Related

Copy/paste Bugs

Jul 11, 2007

try copying a connection manager from one package to another



it does not work



e.g. excel connection manager



it loses the name of the connection manager and also the file you are pointing to

so it is basically no different to 'add new connection manager'





also



try copying the name of the connection manager to another connection



select connection, hit F2 (edit) ctrl C,



try pasting!



in order to paste you have to right click on the selected text and select copy from the context menu



this is not a bug

this sloppy, poorly tested software

View 1 Replies View Related

Copy And Paste From Access Into Columns

Mar 16, 2007

Is there a way to copy and paste data into columns when view the table columns?

I would like to be able to copy and paste data from an access database.

TIA

View 3 Replies View Related

Copy And Paste Minor Irritation

Sep 24, 2007

Can anyone explain why when I copy a data element and attempt to paste it it always appears waaay off screen in my SSIS 2005 package? Why won't it paste where I am right-clicking and telling it to go? I hate having to hunt for the element in the flow.

View 1 Replies View Related

Moving Db Via Detach Then Copy And Paste 44 Gig Db File?

Aug 21, 2000

Hi,

I have a 44 gig db that I moved to another server via the NT copy and paste method. The db has gotten a little larger, and now NT gets almost to the end, but can not complete -- either starts over completely and just does the last few minutes over and over.

Is there an NT copy and paste limit? Any ideas what the problem is? Is the db mixed up?

Thanks for any help.

Judith

View 4 Replies View Related

Copy/paste Grid From QA - No Field Names!

Nov 23, 2004

for debug purposes i tried to copy paste some Query Analyser output into Excel... the data pastes fine, but i can't get the field-names to copy/paste. is there a trick? izy

View 3 Replies View Related

Copy Data From Excel Spreadsheet And Paste To Table

Aug 2, 2007

I have an excel spreadsheet and I want to transport its data into a table. I have tried copying and pasting but it doesn't work. Any ideas?

View 4 Replies View Related

Copy And Paste Control Flow Item Error

Mar 26, 2008

Hi,

I'm trying to copy and paste an 'Execute SQL Tasks' within one of my packages.

I've managed to solve the copy part of the problem by registering the following dlls:



regsvr32.exe msxml3.dll
regsvr32.exe msxml6.dll
However, I can't paste the copied task onto my control flow. When I paste I get the following error:

The designer could not paste one or more executables.
Additional information:
At least one executable could not be pasted correctly.
the executable with the name 'Record Row Count' could not be pasted successfully.
Information about the state of the executable with the name
'Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask, Microsoft.SqlServer.SQLTask,
Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' could not be loaded from the clipboard.
Exception from HRESULT: 0xC0010028 (Microsoft.DataTransformationServices.Design)

Any help getting this fixed would be appreciated.

Tom

View 5 Replies View Related

SQL Tools :: Copy / Paste Fails In Management Studio

Mar 29, 2007

After opening Management Studio and doing some editing it is possible to copy/paste things in the query editor. After a while (working in another app) I come back to Management Studio and I can't copy/paste anything anymore. If I try to copy from the results window I get an error message that the clipboard operation did not succeed. If I try to copy from the query editor window it just doesn't copy. I can copy/paste in other apps without a problem.
 
It is not the clipboard getting full but I can't rule out much else.

View 10 Replies View Related

Reporting Services :: Report Viewer Data Copy / Paste

Sep 15, 2015

I am using Report Viewer 2013 to display Reports, using rdlc to bind the data in visual studio.

I cannot copy the report data from report viewer? is there any work around for copy ?

Does Copy functionality will be included in feature releases or copy functionality will not be there in report viewer?

View 6 Replies View Related

Copy(paste) 'serialize' Error Always Occurs With Task, Never With Components

Aug 15, 2007

Some more insight into the error I am getting.

It always occurs at the task (control flow) level and never at the component (data flow) level

It always occurs on the 'copy' action.

I have tried all the msxml/registry recommendations to no avail.



once again here are the error details

===================================

An error occurred while objects were being copied. SSIS Designer could not serialize the SSIS runtime objects. (Microsoft Visual Studio)

===================================

Could not copy object 'SQT Drop Create RAWMigDeal RAWBarrier table' to the clipboard.
(Microsoft.DataTransformationServices.Design)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%u00ae+Visual+Studio%u00ae+2005&ProdVer=8.0.50727.762&EvtSrc=Microsoft.DataTransformationServices.Design.SR&EvtID=SerializeComponentsFailed&LinkId=20476

------------------------------
Program Location:

at Microsoft.DataTransformationServices.Design.DtsClipboardCommandHelper.SerializeRuntimeObjects(ICollection logicalObjects)
at Microsoft.DataTransformationServices.Design.ControlFlowClipboardCommandHelper.InternalMenuCopy(MenuCommand sender, CommandHandlingArgs args)

===================================

Invalid access to memory location. (Exception from HRESULT: 0x800703E6) (Microsoft.SqlServer.ManagedDTS)

------------------------------
Program Location:

at Microsoft.SqlServer.Dts.Runtime.PersistImpl.SaveToXML(XmlDocument& doc, XmlNode node, IDTSEvents events)
at Microsoft.SqlServer.Dts.Runtime.DtsContainer.SaveToXML(XmlDocument& doc, XmlNode node, IDTSEvents events)
at Microsoft.DataTransformationServices.Design.DtsClipboardCommandHelper.SerializeRuntimeObjects(ICollection logicalObjects)

View 7 Replies View Related

Reporting Services Image Problem Export Excel, Copy Paste ?

Mar 4, 2008



I have a server report which made by ssrs 2005, I am using vs 2005 to build an aspx page and call this report which already uses dynamic query. I use parameters and send these to reportviewer with setparameter method. I dont use DataBind and Refresh method. SetParameter is enough to generate Report. When report generates everything is fine. But when i export this report to excel the pictures in this report get smaller to fit in cell height. I used rendering extensions but its same.


try

{

ReportViewer1.ServerReport.SetParameters(paramList);

//ReportViewer1.ServerReport.Refresh();

//ReportViewer1.DataBind();



}

catch(Exception exc)

{

Response.Write(exc.ToString());

}



And i used copy contents of reportviewer and paste it to excel file. There is interesting case here. If this is the first time that i run the report and copy and paste. No image is seen in excel workseet but other report elements is fine. But if i click on refresh button on reportviewer toolbar and report regenerates, i try to copy and paste and it works fine, and if i dont close ie window copy and paste progress works good and i dont need to click on refresh button on each report to copy and paste?

This is so interesting subject, i tried lots of things for example i tried to use databind and ServerReport.Refresh methods maybe it acts like clicking on refresh button but this wasnt the same only difference is it took more time to generate the report.

Any help?

View 1 Replies View Related

Copy &&amp; Paste Of Custom Task Loses Internal Property Settings

Sep 21, 2006

We have a built a custom control flow task that we use frequently. It has a simple user interface form where we can set certain properties. Problem is, after I configure it once and then copy and paste it all of the internal property settings seem to be lost on the newly pasted task. When I open up the editor for the task all of the properties are displayed visually in the editor form, but the properties pane is empty.

How can this be corrected?

View 3 Replies View Related

Big Project /need Help

Apr 16, 2008

A Southwest Booksellers has stores in three cities:
Albuquerque {Winrock, OldTown, NobHill}
Santa Fe {VistaView, MesaVerde}
Taos {Zia, Zuni}
and sells nine categories of books:
{Computers,Science,ArtHealth,SelfHelp,Business,Fiction,History,Religion}.

The bookstores will keep a database of transaction records for one year.
A sales transaction record contains fields for city id, store id,
book category id, date, and quantity of category sold.
They would like to have a database of aggregate historical data from which
to generate the following reports:


1) Show city sales by quarter for a given year.
2) Show store sales by quarter for a given year.
3) Show Book Category sales by quarter for a given year.
4) Show city sales by year.
5) Show store sales by year.
6) Show Book Category sales by year.
7) Show sales by Book Category and quarter for a given store and year.

Your solution should simulate annual processing and
contain the following elements:

1) Script to generate transaction records.
2) Star Schema database of aggregate historical data.
3) ETL algorithm.
4) Reports implemented as Stored Procedures.

Demonstrate your solution using the following data:

Year Transactions
---- ------------ --------------------------------
2000 1000
2001 1500 TheCaverns store in Carlsbad
2002 2100
2003 2800 Philosophy category
2004 3600 CasaDelRio store in SantaFe
2005 4500 Travel category

A transaction is one book category of quantity between 1 and 5.


please see what i did
create table city
(
idc tinyint,
city varchar(20)
);

insert into city values(1,'Albuquerque');
insert into city values(2,'Santa Fe');
insert into city values(3,'Taos');


create table Alb

(
idal tinyint,
store varchar(20)
);

insert into Alb values(1,'Winrock');
insert into Alb values(2,'Oldtown');
insert into Alb values(3,'NobHill');


create table Santa

(
idsan tinyint,
store varchar(20)
);

insert into Santa values(1,'VistaView');
insert into Santa values(2,'MesaVerde');

create table Taos
(
idta tinyint,
store varchar(20)
);

insert into taos values(1,'Zia');
insert into taos values(2,'Zuni');

create table books

(
bid tinyint,
type varchar(10)
);

insert into books values(1,'Computers');
insert into books values(2,'Science');
insert into books values(3,'Arthealth');
insert into books values(4,'Selfhelp');
insert into books values(5,'Business');
insert into books values(6,'Fiction');
insert into books values(7,'History');
insert into books values(8,'Religion');

create table y2000
(
qtr tinyint,

);

insert into y2000 values(1);
insert into y2000 values(2);
insert into y2000 values(3);
insert into y2000 values(4);

create table SalesCube
(
idal tinyint,
idsan tinyint,
idta tinyint,
bid tinyint,
qtr tinyint,
qty smallint

);
create table ST
(
idal tinyint,
idsan tinyint,
idta tinyint,
bid tinyint,
qtr tinyint,
qty tinyint
)


-- Populate Transaction Table

declare @n smallint,
@idal tinyint,
@idsan tinyint,
@idta tinyint,
@bid tinyint,
@qtr tinyint,
@qty tinyint

set @n = 1

while @n <= 1000
BEGIN
set @idal = convert(tinyint, rand()*100) % 5 + 1
set @idta = convert(tinyint, rand()*100) % 5 + 1
set @idsan = convert(tinyint, rand()*100) % 5 + 1
set @bid = convert(tinyint, rand()*100) % 5 + 1
set @qty = convert(tinyint, rand()*100) % 5 + 1
set @qtr = convert(tinyint, rand()*100) % 5 + 1

insert ST values( @idal ,
@idsan ,
@idta ,
@bid ,
@qtr ,
@qty )
set @n = @n + 1
END

insert salescube (idal,idsan,idta,qtr,qty)
select idal ,
idsan,
idta,qtr,sum(qty)from st
group by idal,idsan,idta,qtr
with cube


this is not working properly. i really do not know how to aproach quarters in the year.
possibly my tables are wrong too.
how to populate transaction tables?
if anyone has any advices i will be happy to apply it.
thanks

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved