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
I have a question about how to best make a comparison of two aggregated SELECT€™s. I'm using SQL Server 2005 on a Windows XP machine.
I€™m doing a comparison between donor/gift information from one table and donor/gift information from another table. I have a difference of 7 records/gifts between the two tables. For whatever reason one table is supposedly Header level data and the other is Line level data and they are supposed to have the same number of records/gifts (not an issue here).
The aggregated SELECT€™s, which will show the donor and the number of gifts each made, are listed below:
SELECT [Account Number] ,count(*) as [Count] FROM Zk_HeaderMulti GROUP BY [Account Number]
--
SELECT [Account Number] ,count(*) as [Count] FROM Zk_LineMulti GROUP BY [Account Number]
Is there a more efficient way to do this than the below listed method in which I use temp tables, join them and find the donor(s) with differing number of gifts between the header table and the line table?
=================================================
SELECT [Account Number] as Line_Donor ,count(*) as LineGift_Num INTO #Line FROM Zk_LineMulti GROUP BY [Account Number]
--
SELECT [Account Number] as Head_Donor ,count(*) as HeadGift_Num INTO #Header FROM Zk_HeaderMulti GROUP BY [Account Number]
--
SELECT Line_Donor ,LineGift_Num ,Head_Donor ,HeadGift_Num FROM #Line A JOIN #Header Z ON a.Line_Donor=z.Head_Donor WHERE LineGift_Num<>HeadGift_Num
I am doing this 2 queries, they get data from the same tables in a very different way. The new way is a lot faster but of course there are problems. There are some discrepancies in the results. Both queries produce results with more than 200.000 rows. Second one has ca. 100 rows less than the first one and some of the results are wrong (most are correct though).
My question is how do I find the differences. I did the left outer join when column a.result != b.result (lines are defined by date and ID so they should be unique).but the join gives me problematic results (some are not different at all, some differences are not in the result).so how do I find the differences between 2 queries, including missing results/rows?
I have a requirement to compare data between two tables in SQL Server.
What is the fastest way to do it using SSIS? There are approx 6~7 millions of records in each table.
My solution: Read both the tables and store the data in Object Type variable. Then run an except query. But I am stuck at except query part. How do I implement it?
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'
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 am new to the topic T-SQL. I am trying to use T-SQL to merge the content of two tables (table1 and table2) into one table making sure there are no duplication.
I wonder if any body can let me have a simple code.
Hey guys what would be the easiest way to create a report of value changes for particular records from one day to the next..... ? Any suggestions would be greatly appreciated....
Hi there! can anyone help me out??? I need to compare a date from the database and the system date which will be coded in a store procedure in SQL... HELP!!!!!
I have a table with a field with a bit datatype. When I execute the stored procedure line if @bitvalue = 1 begin ... and the value is passes as 0 the statements beneath the begin execute. What am I doing wrong?
Is there a way to compare two similar tables? I'm more interested in finding out if the data content is exactly the same or not between the two tables.
We are converting our project into new version. They have done lot of changes in new version including normalization/denormalization. I need to compare the old and new database. Do you have any standard script or procedure like SQL Compare software?. Let me know what are the possibilties we need to check. Your help appreciated. Thanks, Ravi
Assuming a table with a column defined char or varchar. I have a SQL query like this :
Select * from table1 where column1='Building'
It returns the same result that
Select * from table1 where column1='BUILDING'
It is my understanding SQL Server (verison 7 or 2000, I tried on both) is lower/capital insensitive by default when it is installed. If I want SQL Server to be case-sensitive with my char or varchar columns, where can I set it?
Is it at database level or server level I can find this setting . What is the setting that control it?
Best Regards, Alain Gagne, Lead DBA gagnea@msagroup.com
Morning! Folks, i want some links where i could find healthy stuff regarding New Features and Compliance levels, performance comparisons, TPC tests etc about SQL 2000 and Yukon specially. I've to submit a document regarding Top database features that shall be used for a Medical-Billing Software in plan.
I have two tables that I am needing to link by the tables date field. In one table the date field is defined as varchar(23). The time for this field is always zeros. Example: '2005-12-27 00:00:00.000'
The other table is defined as datetime, and it does have the date and time in this field. Example: 2005-12-27 08:00:35.000
The problem i am having is 2005-12-27 00:00:00.000 does not = 2005-12-27 08:00:35.000.
Because I will never have more than one record on the same date I would like to be able to only compare the date. Example 2005-12-27 = 2005-12-27
Since the fields are 2 different field types, this is giving me a problem. Could someone please help. I have tried everything I know to do.
What I really need is the a way to format the datetime fields date into a string such as '2005-12-27'.
In management studio, is there a way to compare databases side by side? Or would anyone know of any freeware out there that would do such a task? :beer:
I have an Employee table with 3000 records and an Excel file having themodified data of those emplyoees. Some of the data of Excel may be sameas that of table data but some may differ. EmpId is the unique field.Other than this field, other fields of Excel may have modified data.Ineed to compare the data from SQL Server table with Excel Data.I decided to write a VB Program having two recordsets,one for SQLServer and other for Excel and compare each field's value. If themodified value is found then update that to table. Is there any way tocompare in SQL Server itself?Madhivanan
I am looking for some papers/information that compare relationaldatabases such as oracle, mysql, sql server etc. I am particularlyinterested in their features such as locking mechanisms, integrityconstraints, views... Anyone know where I can find the information?Thanks,Susan
I'm in need of a sql query that I'm not sure is possible. Here is anexample of how it's laid out.employee ID Job class Last Change Date12345 x 2/1/200412345 y 1/15/200412345 z 1/1/2004We know that this person is in job class 'x' because it's the mostrecent change. Is there a way to write a query that will exclude thelines 'y' and 'z' because they are currently incorrect?I would appreciate any help I could get. Thanks
As many of you know I've been hunting down a SQL CE alternative / embedded DB that is easily portable among handhelds.
It turns out, that without paying for some other DB, there really aren't any good ones... Unless you go GPL, and the interpretation of GPL that most are using is that your code too is GPL even though you may only Dynamically Link to their app. I think this is likely wrong, but none the less I'm back here yet again.
What I'm looking for this time is a definition of how SQL Server CE is implemented, how it differs from a full blown DB, etc, so I can more thourally explain "why SQL CE" is an embedded DB, and how it isn't the full blown SQL Server that has a bad reputation with some.
My guess is:
SQL Server CE is implemented via DLL. There aren't sockets etc to allow you to connect, and it operates more like an advanced hash on the file system.
Please correct me if i'm wrong, or... send me a link where I can further research. Also, if you have another embedded DB as a suggestion, that's free of course, please point it my way.