this is going to sound like a ridiculous question, but when you are first adding all your records, do you need to add all the foreign key data yourself so that it ties together?
eg. If studentid =1 in first table, then you need to add record for student id in bridging table so that studentid= 1:teacherid=1 and add teacher id=1 if it is not autoincrementing????
I need to see inside a SSIS 2012 project a new SSIS installed component, but in the SSDT 2010 I cannot see the SSIS Data Flow Items tab for adding data source/data destination respect to the choose toolbox items pane.
I need to know what a table's max row Identity is part way thru a data flow. I can't get it at the beginning of the data flow. I need to either (1) add it to the data buffer part way thru or (2) set it into a package variable and then reference the var in a script component.
I've not found a way to add a database column to the data buffer without doing a lookup for each row (too slow and not appropriate here) or some goofy oledb source and then merge join into the data buffer on a contrived join.
I've read questions about referencing package vars in scripts but I can't get that to work. DTS.Variables("varname").Value isn't recognised when I code it up.
Anyone have an idea or solution for either one of these? If you're gonna explain the script code, please include the entire snipet including the INCLUDEs, etc.
I have some website work lined up and it involves some simple modifications to a MS SQL 2000 server. What I'll need to do is add some new data fields and insert some data.
I have some experience with databases - MS Access and MySQL, but I have never used or seen MS SQL 2000. My question is, is this a relatively simple thing to do for someone who hasn't used it before? I can do these things quite simply in Access or MySQL, so is MS SQL 2000 going to be any different?
Also, does anyone know of any free tutorials online that would help me out?
Hi there,I am currently setting up a registration system where customers can registers their details and the details of the product, using ASP.net and MS SQL.There is a column called customerID in the Custoemrs table, and a column of the same name in the Products table, so that I can have relationships between the tables.For obvious reasons (ie. people that quit half-way through), I want to hold all the information until the end. The ID in the Customer table is unique, and auto-increasing, and therefore not assigned until the data enters the database.However, I wish to submit information to the Products table at the same time, but what shall I put in for the custoemrID (which hasn't yet been assigned)Thank you in advance for your help,Nathair
I'm new at this and wondering if someone would have the heart to help.I want to know how to add data into a database. Here's the details:I have a sqldatasource( sqldatasource1) attached to a database with a table named customers.The table(customers) has one field named 'Name' with datatype varchar(50)I have a textbox (textbox1) and a button (button1)I want to insert the text into textbox1 into my database. how can i do that?
Hi! Is it possible to add/delete/modidy data through views? What is the major difference between SQL Stored procedure & SQL function?One diff i know is using SP we can execute transact-sql statements.Is there any other difference?
I'm currently in an SQL internship, and am running into an issue with a project they've given me. Primarily, he's asking me to try to get a table containing student entry testing information to update with a new column that's supposed to contain the testing dates. This in mind, there is another table that contains testing data, and who's students are grouped by date, the data in each group all coming from the students table. Issue is, I don't know how to get the testing dates from the TestData table into the Students table. There's already a relationship set up between the TestID fields on the TestData table (PK) and the Students table (FK), so I don't think I can set up a new relationship to get it working.
I'm not a programmer by trade, so please be gentle with me! I am trying to add or insert data to the beginning of an existing string of data. The string is in one field in a table, with various options seperated by [ ]. An example of the current data is: [Eye Color:TEST][Hair Color:TEST] and I would like to add the data [# Persons:1] to the beginning of the string so it looks like this: [# Persons:1][Eye Color:TEST][Hair Color:TEST]
Hello everyone, I finally got the SDF file on my pocket pc, and now am having trouble loading the data into the listview. I am not sure where I am going wrong, but the code is listed below. Any ideas? Thanks so much, everyone.
private void LoadList(string szSQL)
{
// Clear out anything that might already be in the list
Hi.. When I try to add new item "SQL Data Base" the following error generate: Failed to generate a user instance of SQL server due to a failure in starting the process for the user instance. The connection will be closed. what is mean? what is its reason? how I can solved? Please help me as soon as possible.. Thanks..
EX: I have a table for products, and each product has a quantity. How can I add up the QTY field in all the rows to find out the total QTY of all the products.Any help would be greatly appreciated.gkc
We are using SQL server 7.0 as RDBMS for BaaN ERP. We have created the database file in E: drive. Now E: drive is going to be exhausted, We are trying to add a new file at different location. When we add the file into database it creates a file with default extension .ndf but previous file has the extension .mdf. should we change the extension of new file to .mdf or we should continue with default extension .ndf.
is it necessary to add a secondary file group or we add a file to the existing primary group.
We have 1 TB database and we recently got space so 1) can i add data files and put in different disk in production hours 2) what are the effects of doing this. JUst want to get expert advise
I try to add data to SQL via Access Forms. When I add a data and open tables in Access which are connected to SQL, I can see my new datas. But if I open tables in SQL Server Management Studio I can not see any of those new datas. What should I do to solve this problem. I will be very happy if you can help me about this matter. Thanks in advance...
I'm attempting to create a new GUI for an existing MySQL database I have. I would like to program this application using Visual Studio 2005 using the Visual C++ or C# language.
I'm having trouble connecting to the database though. When I attempt to add it as a data source I get the following error: "Could not retrieve schema information for table or view"
I'm using the MySQL ODBC driver version 3.51 and MySQL versoin 5.0. Visual Studio 2005 Professional Edition.
Can someone help me get this project started? How do I connect to my database?
I am new to ADO.NET and have a emergency problem to slove.
I am using VS 2005 to open a solution that created by previous VS. After the solution is upgraded by VS, I was gonna add a data souce to the form. The destinated database is a sample called Northwind. But right after I want to add a table called "employee" as the object database in dataset, I got an error "error using the dropdown: Could not get type information for 'Getting_Started.NorthwindDataSet'"
I created a test form and did the same procedure but got no error at all. So I guess there must be something wrong with using VS 2005 to open solution created by previous VS.
This may sound a bit weird...but here it goes. I have in my SSRS 2005 report one table. In that table I have:
Header1
Groupp1
Footer1
Some of the fields in the Group look like this:
Company Number Branch FeeGoal
The problem I have is FeeGoal. It comes from a table that is simply joined to my main dataset (via the dataset's stored proc) on company number. So I do not want this one summed. I want it to be the value the user entered for that company only, not summed. I have an ASP.NET input form where each of the companies has one FeeGoal input field. I then update all company records in a temp table where they have a FeeGoal field....and update each FeeGoal Field for that company with the FeeGoal the user entered into my form.
IN the report group, I do not put sum for this field, I just put
=Fields!FeeGoal.Value
So that I end up with basically Top 1 of FeeGoal for the particular company in the group. The problem I have now is how to sum up all FeeGoals without summing up of the same FeeGoal values for each company. Remember, I just want to sum up all Top 1 values for FeeGoal in the Group.
Now in my Report, I have the followingfields in my Group, grouped by CustomerNumber(not shown)
Group1 CustomerName Field1 Field2 FeeGoal
In my FeeGoal, I simply put =Fields!FeeGoal.Value, not =SUM(Fields!FeeGoal.Value) because I want to only sum Distinct, not 30000 + 30000 + 30000 for example..I only want to show 300000 for Company DCE
But in the Footer, I put the same Fields!FeeGoal.Value. Of course that only returns the top result which is 20000 for company ABC.
If I then try =SUM(Fields!FeeGoal.Value), it's way over inflated because it's counting the FeeGoal multiple times per customer, I only want to sum up each common instance.
FeeGoal is a unique case, usually you let the grouping do it's work but I don't want to overinflate my total for FeeGoal in my Footer.
If there is some way to do =SUM(Top 1 FeeGoal) or SUM(Distinct FeeGoal) in SSRS 2005 VB syntax somehow in the expression builder, this is the only way to get this to be accurate unless someone else knows...
Here's a couple of screen shots. You'll see the overinflated FeeGoal sum:
I want to insert a record with fields let say"ProductCode, Name" to a table with records like "ProductCode, Name, NumberofItems". I get mismatching errors "Conversion from string "INSERT INTO dbo.t_Shopping(Productcod" to type 'Double' is not valid.". Note the missing last letter. ProductCode and Name are both varChars, NumberofItems is int in table and double in my code. This is my insertion script ".CommandType = CommandType.Text = "INSERT INTO dbo.t_Shopping(ProductCode, Name, NumberofItems)SELECT ProductCode, Name, @NumberofItems FROM dbo.t_Product WHERE ProductCode=@ProductCode"I have asked this question previously in an other mail, but probably because that thread was marked solved, no one answered.The whole code is like this: I translated some names. I hope its still valid. Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim NumberofItems As Double = 1 Dim conn As New SqlConnection("Data Source=DV2SQLEXPRESS;Initial Catalog=testaus;Integrated Security=True") Dim row As DetailsViewRow = DetailsView1.Rows(0) Dim ProductCode As String = row.Cells(1).Text Dim cmd As New Data.SqlClient.SqlCommand Dim param As New SqlParameter() TextBox1.Text = ProductCode With cmd .Connection = conn .CommandType = CommandType.Text = "INSERT INTO dbo.t_Shopping(ProductCode, Name, NumberofItems)SELECT ProductCode, Name, @NumberofItems_ FROM dbo.t_Product WHERE ProductCode=@ProductCode" .Parameters.AddWithValue("@ProductCode", ProductCode) .Parameters.AddWithValue("@NumberofItems", NumberofItems) ' End With Try conn.Open() cmd.ExecuteNonQuery() Catch ex As Data.SqlClient.SqlException Throw New ApplicationException("An error occurred while trying to insert the record") Finally conn.Dispose() End Try RegardsLeif
I have 3x6 textbox lay out, QTY, Descp, Cost, with submit button with followin code...., insert function has too many function, anyone know how to work thiis type of data entery?? Thanks in advanc.Dim Quntityx() As Integer = {txtQ1.Text, txtQ2.Text, txtQ3.Text, txtQ4.Text, txtQ5.Text, txtQ6.Text} Dim xDex() As String = {txtD1.Text, txtD2.Text, txtD3.Text, txtD4.Text, txtD5.Text, txtD6.Text}Dim xcost() As Decimal = {txtC1.Text, txtC2.Text, txtC3.Text, txtC4.Text, txtC5.Text, txtC6.Text} Dim i As IntegerFor i = 0 To 5 itemInput.InsertParameters.Add("RequestN", RequestN)itemInput.InsertParameters.Add("Description", xDex(i)) itemInput.InsertParameters.Add("Cost", xcost(i))itemInput.InsertParameters.Add("Quantity", Quntityx(i)) itemInput.Insert(i) Next i
Is it possible to add new data to an existing report. I already updated the SQL query, but the new data does not appear within the report. How can I modify the rows, columns and data fields???
I have a flat file(pipe delimited), like below( only two rows shown)
1|001|B|C|002|A|003|
1|005|D|C|003|A|004|
I have to import column 2( that is 001), column 5 (that is 002), column 7(that is 003) from the above flat file to column in Database that has DataType Numeric DataTyp (4,3).
In the Database the columns shoule have values like(.001), (.002), (.007). I have used flat file source, Script component, and OleDbDesitnation in my DataFlow task.
In the script component, I have added a "." for each column as a string.
I cannot import to OldeDbDestination becuase of Data conversion issue.
Is it possible to add a Fuzzy Grouping Transformation in a Data flow task by Programmatically ? If it possible, what is the C# or VB .net code for that ?
I am trying to develop a data flow task in C#. I need to add an expression tab in the task where i can write expressions on the input columns and map it to outputs. Please let me know how to go about it. I am new to SSIS coding so dnt have much idea abt it.