Showing posts with label posting. Show all posts
Showing posts with label posting. Show all posts

Monday, March 12, 2012

Import Data from Oracle9i DB

I hope this is the correct forum to be posting this in but,

we have a database setup on a linux box that we are trying to get rid of and replace w/ sql server 2005 once we have the data off that machine. The problem that we are running into when we try and import data from that machine is, we get the following message during the DTS import / export wizard:

'Error Source: Microsoft OLE DB Provider for ODBC Drivers'
'Error Description: [Oracle][ODBC][Ora]ORA-00942: table or view does not exist'
'Context: Error calling OpenRowset on the provider'

Hopefully this is just a silly mistake on my end but I have been searching around and have not been finding anything too helpful.

does anyone have any advice?

thank you very much in advanceMoving to the SQL Server Integration Services forum.|||

Please note that ODBC via OleDB is not supported. To use any ODBC driver in SSIS, ADO.NET-ODBC bridge should be used.

One exception to this is the Execute SQL Task in the control flow, which has native ODBC support. Apart from that, to use ODBC directly, the option of using the extensibility model, either with a script component or custom component is available as well.

Sunday, February 19, 2012

Impliment MySQL LIMIT command on SQL Server

Hi there, it seems the search feature refuses to work so i am posting a question which I am sure has been answered :)

What is the best way to get the LIMIT command functionality in SQL SERVER?

I am making an ASP.NET page, and am unsure how to go about tabbing through 100s of results.

Many thanks,
TazSql Server does not have a LIMIT functionality. You can either use TOP to only select the TOP n records, or implement your own paging.|||BTW: In .NET, you can implement paging through a .NET control. Performance isn't as good as building your own paging, but if you don't want to go through the trouble, it's worth looking into.|||Use SQL Server 2005? The LIMIT clause shouldn't be implimented in a relational database, even though it is quite convenient. In SQL 2005, Microsoft chose to implement this functionality due to user demand in spite of the fact that it limits the design of the database engine in other ways.

-PatP|||the SQL server equivalent of MySql LIMIT is TOP

MySQL
select * from MyTable LIMIT 10

SQL Server
select TOP 10 * from MyTable|||the SQL server equivalent of MySql LIMIT is TOPSo, where does the comma go?

While you are correct that the TOP predicate implements part of what LIMIT does in MySQL (i.e. the first parameter), it does not handle the paging portion (when there are two parameters). Paging result sets has no set based solution (because it is both stateful and sequence dependant), so it really should be implemented via an N-tier solution.

-PatP|||Right Pat. TOP is only a closest equivalent in Sql2K and having Limitations compared to MySql LIMIT.|||Please remember that both limit and top are dangerous if not paired with some order by's. Without that control, a relational DB is free to return records in any order it feels like.