Slightly Off-topic Topic
Feb 14, 2006
Hi,
I wanted to know how actually a database converter works.
I am working on a converter from DBF to MS SQL server 2000
using Visual Basic 6.0. I wanted to know that once a legacy database
is enterd in the program, how does it get normalised.
I have aboout 40 tables in DBASE IV format. I want to convert them
into relational database and store them on server. But on conversion,
how can the converted data be normalised by itself.
Awaiting the replies,
Thanks
View 2 Replies
Dec 4, 2006
I absolutely agree with you.
I managed to find the error, it was a typo.
Here is the code, if somebody is interested about it. It is oracle, not SQL server, but the idea is the same.
drop view a;
drop view b;
drop view figure5_9;
create view a
as
select d.donorID, dt.donortype, dt.donortargetq1
from donortype dt, donor d
where d.donortype=dt.donortype;
select * from a;
create view b
as
select a.donortype, sum(c.ContributionAmount) as amount
from Contribution c, a
where c.ContributionDate between '01-JAN-06' and '31-MAR-06' and a.donorID=c.donorID
group by a.donortype;
select * from b;
create view figure5_9
as
select b.donortype, a.donortargetq1, b.amount, b.amount/a.donortargetq1 as percentage
from a, b
where a.donortype=b.donortype
group by b.donortype, a.donortargetq1, b.amount;
select * from figure5_9;
Thanks for the help anyway ;-)
View 2 Replies
View Related
Feb 26, 2008
Hi,
I am trying to extract data from a MySQL DB. I have installed the MySQL Connector (mysql-connector-odbc-3.51.23-win32), then set up an ODBC connector in the Control Panel > ODBC.
Then in BIDS I have setup a new ODBC connection in Connection Managers, and then used the ODBC connection I setup above so at that point everything looks cool.
Now what? Do I setup a Execute SQL Task or how do I get the data out and into a Data Flow Task?
Thanks
View 3 Replies
View Related
Sep 14, 2006
I'm in China doing TechEds in Shanghai, Guangzhou, Beijing and Hong Kong - returning to the office Monday 2nd October.
There may be significant delays in my replies to any topics on this forum. Just fyi so you don't sit waiting for me to respond.
Thanks
Paul Randal
Lead Program Manager, Microsoft SQL Server Core Storage Engine (Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
View 4 Replies
View Related
Dec 13, 2006
It's been pretty quiet here recently - hopefully people either aren't experiencing corruptions or they're finding what they need in the previous threads.
Just a quick note to say that I'll be totally offline from tomorrow until January - going diving in Indonesia (http://www.wakatobi.com).
Happy holidays and may your pagers be silent throughout
Cheers
Paul Randal
Principal Lead Program Manager, Microsoft SQL Server Core Storage Engine (Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
http://blogs.msdn.com/sqlserverstorageengine/default.aspx
View 4 Replies
View Related
Sep 23, 2005
I'm thinking of doing some basic parsing of address. I want to seprateout the house number from the street name from the suffix. I have thesuffix's from the USPS, but I cant find a database of US street names.Anyone come across one or know where I can get one?TIARob/end off topic
View 2 Replies
View Related
Aug 1, 2006
I have 2 problems:
1) When I run this, etch time I keep getting the error saying that constraint isn't found when I try to drop because my creation of the constraint at the end for some reason isn't creating it or being run
2) The first insert doesn't insert anything, although I get no errors
ALTER PROCEDURE Categories_I
3) I also get this when trying to run just the first 2 insert statements together
Msg 2627, Level 14, State 1, Line 7
Violation of PRIMARY KEY constraint 'Category_PK'. Cannot insert duplicate key in object 'Category'
ALTER PROCEDURE [domainnamemyaccountname].[Categories_I]
AS
BEGIN
/* delete contents from Category table and reseed
Cannot use truncate on a table which contains constraints therefore
use DBCC to reset the seed and DELETE to clear the records
*/
DELETE dbo.Category
DBCC CHECKIDENT ('Category', RESEED, 0)
-- Now, insert the initial 'All' Root Record
ALTER TABLE dbo.Category DROP CONSTRAINT Category_Category_FK1
PRINT 'Dropped FK'
SET IDENTITY_INSERT Category ON
INSERT INTO dbo.Category
(CategoryId, ParentCategoryID, [Name], [Description], DisplayOrder, DisplayInExplorer, Keywords, Active, CreateDate, CreateUserID)
SELECT 1, 1, CategoryName, '', 1, 1, '', 1, GETDATE(), 1 FROM CategoriesStaging WHERE CategoryName = 'All'
PRINT 'Inserted All Record'
INSERT INTO dbo.Category
(CategoryID, ParentCategoryID, [Name], [Description], DisplayOrder, DisplayInExplorer, Keywords, Active, CreateDate, CreateUserID)
SELECT 2, 1, CategoryName, '', 1, 1, '', 1, GETDATE(), 1 FROM CategoriesStaging WHERE CategoryName = 'Store'
PRINT 'Inserted Store Record'
SET IDENTITY_INSERT Category OFF
/* Finally, insert the rest and match on the Parent
Category Name based on the CategoryStaging table
*/
WHILE (@@ROWCOUNT <> 0)
BEGIN
INSERT INTO dbo.Category
(ParentCategoryID, [Name], [Description], DisplayOrder, DisplayInExplorer, Keywords, Active, CreateDate, CreateUserID, UpdateDate, UpdateUserID)
SELECT c.CategoryID, s.CategoryName, '', 1, 1, '', 1, GETDATE(), 1, GETDATE(), 1
FROM Category c INNER JOIN CategoriesStaging s ON c.[Name] = s.ParentCategoryName
WHERE NOT EXISTS (SELECT 1 FROM Category c WHERE s.[CategoryName] = c.[Name])
END
PRINT 'Inserted Rest of Category Records'
PRINT 're-create FK Call'
ALTER TABLE dbo.Category
ADD CONSTRAINT Category_Category_FK1 FOREIGN KEY
(
ParentCategoryID
) REFERENCES Category (
CategoryID
)
PRINT 'create FK2'
END
Other errors:
(1 row(s) affected)
Checking identity information: current identity value '2', current column value '0'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Msg 3728, Level 16, State 1, Line 6
'Category_Category_FK1' is not a constraint.
Msg 3727, Level 16, State 0, Line 6
Could not drop constraint. See previous errors.
ALTER TABLE statement conflicted with COLUMN FOREIGN KEY SAME TABLE constraint 'Category_Category_FK1'. The conflict occurred in database 'Chefs2', table 'Category', column 'CategoryID'.
Schemas & Data:
http://www.webfound.net/category.bmp
http://www.webfound.net/category.sql
http://www.webfound.net/categoriesstaging.sql
http://www.webfound.net/stagingdata.txt
View 1 Replies
View Related
May 7, 2004
Hi,
The subject say it all :)
I have a field which stores date which the datetime datatype... The problem is that I am also getting time information in this stored field.
I just want to extract the date part in dd-Mmm-yy format (e.g. 07-May-04). I tried convert (char (8), MyDateField, 112) but it gives me date in yyyymmdd format. How do I get the results in dd-Mmm-yy format instead?
Thanks.
View 7 Replies
View Related
Sep 8, 2007
I was curious if using RAISERROR in the catch block of a stored procedure does actually causes some hit on performance? I think it would, as compared to simply returning an error code in this sp's output parameter.
View 1 Replies
View Related
Mar 23, 2008
In Connect To Server dialog, I have a dropdownlist of recently used server names. I am curious to know where these names are stored so that I can remove an invalid entry.
Thanks.
View 1 Replies
View Related
Jul 18, 2006
I'm a SQL noob still and need some help figuring out a weird problem. I have directory information I am trying to pump out in the correct order, no big deal except some entries need to be categorized based on a simple hierachy. So for example, there is an entry for a company division, and then there are all the subdivisions, and then a few offices. So it goes like this:
Divsion=Computing
Subdivision=Networking
Subdivision=Development
Subdivision=Support
Office=Desktop
Office=Application
In other words, Desktop is an office in Support which is a part of Computing.
Now what I want is to basically pump all that data out via SQL in that exact order. So I have 3 fields that I am using and then trying to arrange it using Order By - except it doesn't come out correctly.
Code:
SELECT Division, Subdivision, Office
FROM directory
ORDER BY Division, Subdivision, Office
What happens with this is that I end up with all my Divisions in order only. So for example, the main entry for Computing has "Computing" as it's Division and Office, but I want it to appear first in the list so I set Subdivision to be "A" - Instead of it appearing first it appears second below an entry for a different Division that also has it's Subdivision set as "A". I end up with Divisions mixed into the wrong cluster of subdivisions and offices.
Anyone have any ideas? It seems like this should be fairly simple and yet somehow it isn't. Thanks in advance for any help!
View 7 Replies
View Related
Feb 9, 2015
I have a query with a nested query that is used as an in line view. When I run the whole query I keep getting slightly different results each time (10000, 10002, 10001, 9999 etc.), nothing is being changed, no jobs are running on the DB to affect the tables etc.
When I run the inline view query with the nested query, or nested query on its own, it returns same number each time.
What could potentially be the cause of this?
Using SQL Server 2008 R2 Express Edition on local W7 PC
View 1 Replies
View Related
Jul 20, 2005
Hello All,I'm trying to find out exactly what JOIN doeseg.SELECT A.NameFROM Author A JOIN Publisher PON A.SomeID = P.SomeIDWHERE P.Country = 'X'I know what inner, outer, right and left joins do, but what does justJOIN on its own do? (Can't find it in help either)Thanks,K Finegan
View 3 Replies
View Related
Mar 13, 2007
Why, when I have SQL 2005 SP1 on Windows Server 2003 do I get, when I set up a new database WITH CONTENT IN IT, a polite message on the report builder informing me that:
"The selected datasource does not have any content associated with it."??!??!??!?!
When it quite clearly does because I can see it.
This appears to be an extension of the previous problem (that I am still encountering) wherein I can only see some but not all of the content of a database via ReportServer; but more - when I copy the content that I could see into the new database, I can NO LONGER SEE IT.
Please will somebody give some suggestions because this is starting to get ANNOYING!!!!!!!!!
View 2 Replies
View Related