I am trying to make a join in between 2 tables. One table which we can called func has 2 columns a and column b.
The other table which is called export has 16 columns. I will like to make a join in these tables and insert the result of the join into another table i have.
The table that is going to have the information has 4 columns, so I will get 1 column information from table export, and the other 2 column from table func, the other column shall be left in blank for the time being.
The problem is also that when i make a select from table export, there are only some values i want to get, this are values from a period where there is only the periods 11.
Select Company, A and B
FROM FUNC, EXPORT where period = '1101', '1102', '1103'
column in FM_SHARE_RO_MOVED File_name FG00E3PK.csv
column in PARSE_FILE INSTANCE File_Location D:ToParseFLEXSTARPNGFLEXSTAR12FG00E3PK.csv
I want to check if the values in file name in FM_SHARE_RO_MOVED is available in PARSE_FILE_INSTANCE. And if it is available the update a column in FM_SHARE_RO_MOVED
Hello, I am a beginner using MSDE & Visual Basic.NET standard version (not Visual Studio.NET) . MSDE was downloaded from microsoft.com yesterday, which is sql2ksp3.exe.
OK looking for anyone out there that may have already tackled this and what they may have learned I have multiple flat files providing dimensional data to multiple tables. The source files and destination tables are very similiar in structure, the columns are named differently in each table
ID - surrogate key Code - match for lookup Desc - updated column
flow options I have considered or might work are: source (flat file) - this is easy to make dynamic
lookup against existing Table -
1. I can make this dynamic on the advanced tab by restricting memory. have not really tried this option yet. Seems like it might be a performance issue for large tables but so far it seems all these dimensional tables will be small. 2. Could create a view in the control flow,before execution of the DataFlow with generic column names against a variable table and use this same view for every lookup - again not sure of performance etc 3. could just replace this with a merge/join as long as it does full outer, have not used this option so I'm not quite clear on the dynamic properties
now the last part update or insert Insert
1. Seems like I could use the OLEDB destination and make the table a variable - have not tried to see if this works.
Update-
1. looking at the OLEDB command but not sure how it would handle a variable table name in an update statement - will need to try this out 2. OLEDB command that calls a proc that executes a dynamically built update statement 3. Write the update items to a generic holding table then run an update in the control flow from a dymanically built sql statement.
I have one database named StudInfo. It has two tables named StudentInfo, and GradeInfo. StudentInfo conntains 4 columns. The 1st one is StudentID (PK) int, LastName varchar(10), FirstName varchar(10), and PhoneNumber int.
GradeInfo contains 4 columns also StudentID (FK) int, GradeID varchar(10), Grade int, Date Datetime.
What I would like to know is how using a T-sql query I could make a temp table with studentID, LastName, FirstName, and then the average of all the different types under GradeID. As of right now I have been limiting the names that are put into GradeID to Homework, Daily, Test, Quiz, and Bonus. When I say average I mean the average of all Homeworks under one studentID, and all Daily under one studentID... etc. I would like the info returned for each student in studentID. Allow Nulls has been turned off.
Never assume someone knows what you are talking about.
I've a doubt regarding deploying and creating package (MSI and EXE files) for SQL Stored procedures,views,tables,functions,triggers etc.,just like ASP.NET application by publishing and deploying..Is it possible in the same way for sql objects.If so,pls help me how to do it?
I actually work in an organisation and we have to find a solution about the data consistancy in the database. our partners use to send details to the organisation and inserted directly in the database, so we want to create a new database as a buffer database to insert informations from the partners then make an update to the main database. is there a better solution instead of that?
I am almost wrapping up a project of my own and I will have the option to restore the database, so dropping the existing one and then running the SQL script to create the database, tables, stored procedures and so on.
My question is, (using .NET 2.0 C#) - what is the best way to resolve the "cannot drop database as it is currently in use" message, or some message of the similar sort?
Even though I specified "USE MASTER" in the commandText string, there will be somewhere, in a situation, where the database will still be in use.
How can I forcefully make it NOT in use, drop it and do other things I like to?
Hi: I have installed sql server 2005 express and SQL Server Management Studio Express How can I generate a database from another copying the structure and data? For example I have a database named Customers, I need to make a copy of Customers named Customers2. Customers2 also will be attached to the same Database Engine Server where Customers is attached. How I Can do it? Thanks! P.S. I tryied to make a copy of mdf an ldf files from Windows Explorer and renamed these files but I could not attach to the same Database Engine Server because I got an error.
at work all the databases i use are only accessible via the local network, i am wanting to take a copy of the databases and save them as a database file so i can burn them onto cd and take home with me so i can get some extra work done on the weekend (i'd also like to start doing this so i have backed up copies of the database incase anything happens to it)
i was wondering how i can do this? are there any tutorials on the web that someone can point me to? i have SQL Server 2005 Management Studio Express.
hi how can i make a user give it a name ReportUser and a password msdn for a certain database named on the sql server 2000 and thank you for your help and oyur time
I work as a computer repair tech for my company and have been offered the opportunity to do a project. I'm looking to make a database of about 2000 peoples fingerprints (2 copies of each finger). We have Microsoft SQL Server but I have no Idea where to start. The vision is, to have an RFID scanner and have everyone swipe their badge then scan their prints and it automatically associates their prints with the badge number. Is there an easier or more simple way to do this or do you have any pointers on where to start? any help will be greatly appreciated. Thanks.:angel:
I am making a project where I have to add city, agentname, rankofagent, referenceagent name the problem is that who can I make a table where suppose I add member a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p like that
b is joined by a c is joined by b d by c, e by d and so on,
What I want here is that how can I get the result suppose i want to see that chain of p. I want result to be printed as a,b,c,d,e,f,g,h,i,j,k,l,m,n,o either result should be in horizontal form or vertical. with or without comma. I am doing this in SQL....
Hello faculties,We've a production database that is being used by one of our clientsas a backend for his website. The database size is around 1GB.Recently we added some tables to our local database which is areplica of the production database. Now we need to apply the samechanges at the production one aslo.I've no clue about what steps should i implement.Please guide me!Thanks in advanceDebian*** Sent via Developersdex http://www.developersdex.com ***
Hallow My code does not insert Data into Database, please can someone look on it and give a technical problem over here please It does not generate any error please, when I CLICK THE BUTTON IT DOES NOT GENERATE ERROR, IT GIVE ME THE MESSAGE THAT ITEM ADDED, BUT WHEN I LOOK MY TABLE NOTHING ID INSIDE Sub Add_To_Cart(ByVal Src As Object, ByVal Args As EventArgs) Dim FVProductID As Label = FormView1.FindControl("ProductID") Dim FVProductName As Label = FormView1.FindControl("ProductName")Dim FVProductPrice As Label = FormView1.FindControl("ProductPrice") Dim DBConnection As SqlConnection Dim DBCommand As SqlCommand Dim sql As String Dim SQLAddString As String DBConnection = New SqlConnection("Data Source=MANDARISQLEXPRESS;Initial Catalog=SHOES;Integrated Security=True") DBConnection.Open() If Not Session("OrderID") Is Nothing Then sql = "SELECT Count(*) FROM ShoppingCart " & _ "WHERE OrderID = '" & CType(Session("OrderID"), String) & "' " _ & "AND ProductID = '" & FVProductID.Text & "'" DBCommand = New SqlCommand(sql, DBConnection)
If DBCommand.ExecuteScalar() = 0 Then SQLAddString = "INSERT INTO ShoppingCart (OrderID, ProductID, OrderDate, ProductName, ProductPrice, ProductQnty) VALUES (" & _ "'" & CType(Session("OrderID"), String) & "', " & _"'" & FVProductID.Text & "', " & _ "'" & Today() & "', " & _"'" & FVProductName.Text & "', " & _ "'" & FVProductPrice.Text & "', 1)"DBCommand = New SqlCommand(SQLAddString, DBConnection) DBCommand.ExecuteNonQuery() End If End If DBConnection.Close()
I am setting up a web application, where the application needs to access a database. I have created the user (for the application) and it can log in to the SQL 2005 Sp2 server, but when I try to open the required database using Server Management Studio, it says "The database [name] is not accessible. (ObjectExplorer)"How do I make a database accessible to a login, using Server Management Studio?
I found a database file and a log file over 2G on mssql 2000 server. Actually, they only need around 200M. I try to backup, truncate the database in order make the size smaller. But the size cannot be smaller. How can I do it?
When you make a join, it may look something like this:
SELECT Products.ProductName from Products, Categories WHERE Categories.CategoryName = 'Seafood' AND Products.CategoryID = Categories.CategoryID
In this query you use 'Products.CategoryID = Categories.CategoryID' to give the relation between the two tables. But if you already added the relationships to your database, this should be known.
My question is, why is it necessary to add the relation in the query when the relationships are already in the database? Is it somehow possible to ommit the relation in the query and make use of the relationships in the database.
I'm trying to make a copy of our 2005 SQL Server production database (25 meg) so we can install it in a new office being set up in another state. I have right clicked on the database I want to copy, selected Tasks, then option Copy Database... I'm trying to put the copy on the same server, and I am doing this work signed into the Management Studio as "sa" The wizard creates 5 steps, the first 4 run ok, then the 5th step runs for 10 to 20 seconds, then quits. The message says to look in the log on the server for the reason it quit. The only log I can find is the Error Logs at the bottom of the Object Explorer window. I look into the current log, then select the SQL Server log, the current one. There is only one line in here about the copy I just tried, and it only says "Starting up database XXXXXXXX" which is the database I'm trying to create through the copy process. Within Database Mail, SQL Agent, and Windows NT log lines, I can not find any reference to the copy job that just bombed. Needless to say, I'm VERY new to all of this SQL Server admin stuff. If someone could point me in the right direction, it would really help! Thanks!
Hi All:I need to make my database unavailable when i am loading the db. Thishappens daily and the db is not connected to any online app, to makethe app unavailable. It is queried thru an Access and hence availableall the time.The load happens daily for an hour in the morning.Is there anyway to make it inaccessible to users while loading dataand then make it accessibleThank youRS
I have two separete databases, what Ineed is that I want to make a single database of the two. Although all the table definitions of both the database are same.
I will be glad to know "how to make a single database from two" and i will be happy to see the query to insert the values from one database to another one.
I have a table where I need to set some rows to Read only (to protect the rows from being edited). Can I do this with a trigger checking against a column (where dataReadOnly = 1)?
Hi, I am beginner developer, Creating simple application which will create, handle small database of genral store products (like adding products and substracting no. of products) . I am creating application with native win32 APIs in VS 2005. Please suggest , how to create such data base , and suggest me link where i will get step by step knowledge to do (learn) it. Do i need to learn ODBC or OLEDB or SQL server
I have asp.net 1.1 web form and it inserts date and time in SQL database, but it insert only date not time , It insert date time in following format 2002-01-22 00:00:00.000 some one tell me why it is not inserting time or why it is inserting time as 00:00:00:000. I want to my time to look like 14:42:51:153. (format) How can I change my time format give me asp.net codes for time formating or what do I need to do to resolve the problem,