Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create a 'public' view which can be used by ODBC connection?

Status
Not open for further replies.

henky

Programmer
Jul 20, 2000
56
NL
Hello,

I am trying to import data directly out of Progress 9.1E into SQL Server 2005. For many tables this is no problem, I created a Linked server and am able to connect the tables and can use T-SQL statements to select records out of the tables.

SQL Server 2005 has a big F***-up in their 'valid' datetime range. Only dates between 1735-01-01 and 9999-12-31 are valid.

Progress accepts all dates ofcourse and you can fill in a date when Columbus discovered America. (This is not possible to fill in a SQL Server 2005 datetime field :s).

My problem here is, I got records with 'invalid-SQL-Server-datetime' dates and still want to read that data.

Its not possible to do a cast/convert in SQL Server, becaus before the cast will be done, SQL Server will see the invalid date and stop the select action.

I was thinking to create a View in Progress and make it public, so I can access it with SQL Server using the Linked server and gather the information like this way.
In the view I will update the datetime field with a 'valid' date. (or I do a cast in the view already to make it char)

My question is How can I create a public view.

I know I can type:
Code:
CREATE VIEW myview AS
SELECT name, country, invalid_date_field from ancient_ppl)
but I cant find that view back using ODBC.

Can anyone help me with this?

Henky
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top