Friday, March 30, 2012
newbie question on DTS
I am trying to create a DTS package to transfer tables and views from SQL
Server to MySQL, the tables and views I want to transfer do not exist in
MySQL yet. In DTS designer I created the connections to SQL server and
MySQL server without problems, then tried to use "Data Transform Task" to
transfer, the problem I have, "Data Transform Task" tries to map tables
from SQL Server to the tables in MySQL, that defies my whole purpose.
Please help! I am using SQL Server 2000 Developer Edition.
I may be incorrect on this, but I don't think that you can transfer objects
(i.e., table schema) to other vendors' databases.
That would require that the DTS Import/Export Wizard have intimate knowledge
of each vendors permutation of the SQL DDL.
Of course, as inferred above, I haven't attempted to transfer objects to
MySQL. I would expect the DTS Export Wizard to provide me the option to
transfer the table as well as the data IF it were possible.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Raymond Du" <rdrd@.yahoo.com> wrote in message
news:eTEI4moBHHA.4024@.TK2MSFTNGP04.phx.gbl...
> Hi,
> I am trying to create a DTS package to transfer tables and views from SQL
> Server to MySQL, the tables and views I want to transfer do not exist in
> MySQL yet. In DTS designer I created the connections to SQL server and
> MySQL server without problems, then tried to use "Data Transform Task" to
> transfer, the problem I have, "Data Transform Task" tries to map tables
> from SQL Server to the tables in MySQL, that defies my whole purpose.
> Please help! I am using SQL Server 2000 Developer Edition.
>
newbie question on DTS
I am trying to create a DTS package to transfer tables and views from SQL
Server to MySQL, the tables and views I want to transfer do not exist in
MySQL yet. In DTS designer I created the connections to SQL server and
MySQL server without problems, then tried to use "Data Transform Task" to
transfer, the problem I have, "Data Transform Task" tries to map tables
from SQL Server to the tables in MySQL, that defies my whole purpose.
Please help! I am using SQL Server 2000 Developer Edition.I may be incorrect on this, but I don't think that you can transfer objects
(i.e., table schema) to other vendors' databases.
That would require that the DTS Import/Export Wizard have intimate knowledge
of each vendors permutation of the SQL DDL.
Of course, as inferred above, I haven't attempted to transfer objects to
MySQL. I would expect the DTS Export Wizard to provide me the option to
transfer the table as well as the data IF it were possible.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Raymond Du" <rdrd@.yahoo.com> wrote in message
news:eTEI4moBHHA.4024@.TK2MSFTNGP04.phx.gbl...
> Hi,
> I am trying to create a DTS package to transfer tables and views from SQL
> Server to MySQL, the tables and views I want to transfer do not exist in
> MySQL yet. In DTS designer I created the connections to SQL server and
> MySQL server without problems, then tried to use "Data Transform Task" to
> transfer, the problem I have, "Data Transform Task" tries to map tables
> from SQL Server to the tables in MySQL, that defies my whole purpose.
> Please help! I am using SQL Server 2000 Developer Edition.
>
newbie question on DTS
I am trying to create a DTS package to transfer tables and views from SQL
Server to MySQL, the tables and views I want to transfer do not exist in
MySQL yet. In DTS designer I created the connections to SQL server and
MySQL server without problems, then tried to use "Data Transform Task" to
transfer, the problem I have, "Data Transform Task" tries to map tables
from SQL Server to the tables in MySQL, that defies my whole purpose.
Please help! I am using SQL Server 2000 Developer Edition.I may be incorrect on this, but I don't think that you can transfer objects
(i.e., table schema) to other vendors' databases.
That would require that the DTS Import/Export Wizard have intimate knowledge
of each vendors permutation of the SQL DDL.
Of course, as inferred above, I haven't attempted to transfer objects to
MySQL. I would expect the DTS Export Wizard to provide me the option to
transfer the table as well as the data IF it were possible.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Raymond Du" <rdrd@.yahoo.com> wrote in message
news:eTEI4moBHHA.4024@.TK2MSFTNGP04.phx.gbl...
> Hi,
> I am trying to create a DTS package to transfer tables and views from SQL
> Server to MySQL, the tables and views I want to transfer do not exist in
> mysql yet. In DTS designer I created the connections to SQL server and
> mysql server without problems, then tried to use "Data Transform Task" to
> transfer, the problem I have, "Data Transform Task" tries to map tables
> from SQL Server to the tables in MySQL, that defies my whole purpose.
> Please help! I am using SQL Server 2000 Developer Edition.
>sql
Wednesday, March 28, 2012
Newbie Question about views
ALTER VIEW vw_ctotalweeks AS
select DISTINCT allweek from hr_depts WHERE allweek > DateAdd(day,
-28, GetDate()) order by allweek desc
But I am getting follwoing error message:-
The ORDER BY clause is invalid in views, inline functions, derived
tables, and subqueries, unless TOP is also specified.
My question is, can I use Order by class in Views if not, how can sort
dates
in view
Please helpViews are like tables - their data is not logically ordered, which is why
ORDER BY isn't valid.
The way to sort a view is in the SELECT statement when you retrieve data
from it:
SELECT allweek
FROM vw_ctotalweeks
ORDER BY allweek DESC
--
David Portas
----
Please reply only to the newsgroup
--|||It is possible to order data in a view use the following select statment:
SELECT TOP 100 PERCENT *
FROM Orders
ORDER BY CustomerID
The top 100 percent option makes the order by posible|||...so the create view statement would look something like this:
Create view v_orders as
SELECT TOP 100 PERCENT *
FROM Orders
ORDER BY CustomerID|||Some people do suggest using this "trick" to order views. I believe that
there are good reasons to avoid doing this.
This behaviour of TOP in a view is undocumented or at least,
under-documented. The ORDER BY is valid only for the purpose of defining the
TOP x PERCENT so intuitively you would not expect it to apply to the result
of a SELECT from the view. 99% of the time it *may* work but there is no
guarantee that it will always continue to work.
A view is supposed to behave like a table - without a logical order.
Sometimes you don't want the view to be sorted. Consider this example:
CREATE TABLE foo (x INTEGER PRIMARY KEY NONCLUSTERED, y INTEGER NOT NULL)
GO
CREATE VIEW foo_view
AS
SELECT TOP 100 PERCENT x,y
FROM foo
ORDER BY y
GO
SELECT x FROM foo_view
The most efficient plan for the SELECT x query is an index scan of the
nonclustered index. The optimiser therefore has a choice either to ignore
the ORDER BY and retrieve an unsorted result set or to force a sort which
gives a sub-optimal execution plan.
As always with specific engine behaviour, results could change between
different installations, service packs or versions of SQLServer, which could
break your code if it relies on an undefined feature.
In short, don't use undocumented tricks as a substitute for good design and
if you do use this feature be aware of its limitations and risks.
SELECT * FROM view ORDER BY ...
Hope this helps.
--
David Portas
----
Please reply only to the newsgroup
--
Newbie question about Object transfer
Hi,
I'm new to Integration Services and I have a problem when I try to make a simple transfer of tables and views between 2 DB.
The idea is to copy tables and views from DB1 to DB2.
If the object exists in the target DB, it must be dropped, then created and the data must be copied.
The problem occurs when a new object is created in the source DB and thus does not exist in the target DB. This throws an error because the system cannot drop an object wich does not exist.
What is the workaround ?
The idea is to execute this package every hour to have a cached DB. In this case, replication is not a solution.
Thanks in advance,
Patrice.
This issue is a bug in SQL Server 2005 RTM. Hopefully it will be fixed in one of the SP releases in the near future.