Saturday, February 25, 2012

Migration from DB2

Hi,
We are migrating from DB2 to SQL Server 2000. We have used DB2 OLAP
functions (rank, sum, etc.) quit liberally. How should be translate them in
SQL Server.
Thanks
PrashantTake a look at SQL Server Analysis Services
http://www.microsoft.com/sql/evalua...bianalysis.mspx
http://sqlservercode.blogspot.com/
"Prashant Bharti" wrote:

> Hi,
> We are migrating from DB2 to SQL Server 2000. We have used DB2 OLAP
> functions (rank, sum, etc.) quit liberally. How should be translate them i
n
> SQL Server.
> Thanks
> Prashant
>
>|||I mean how can I translate following DB2 SQL to MS SQL Server SQL.
SELECT JOB, YEARS, ID, NAME,
ROW_NUMBER() OVER(PARTITION BY JOB ORDER BY YEARS) AS ROW#,
RANK() OVER(PARTITION BY JOB ORDER BY YEARS) AS RN1#,
DENSE_RANK() OVER(PARTITION BY JOB ORDER BY YEARS) AS RN2#
FROM STAFF
WHERE ID < 150 AND YEARS IN (6,7) AND JOB > 'L'
ORDER BY JOB, YEARS, ID, NAME
Thanks
Prashant
"SQL" <SQL@.discussions.microsoft.com> wrote in message
news:C1B8F525-56CC-419F-A731-AD70626DC169@.microsoft.com...
> Take a look at SQL Server Analysis Services
> http://www.microsoft.com/sql/evalua...bianalysis.mspx
> http://sqlservercode.blogspot.com/
>
> "Prashant Bharti" wrote:
>|||Use SQL Server 2005. It will be released in a few ws and has those constr
ucts.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Prashant Bharti" <prashantb@.aditi.com> wrote in message
news:uzB0lF%230FHA.3568@.TK2MSFTNGP15.phx.gbl...
>I mean how can I translate following DB2 SQL to MS SQL Server SQL.
> SELECT JOB, YEARS, ID, NAME,
> ROW_NUMBER() OVER(PARTITION BY JOB ORDER BY YEARS) AS ROW#,
> RANK() OVER(PARTITION BY JOB ORDER BY YEARS) AS RN1#,
> DENSE_RANK() OVER(PARTITION BY JOB ORDER BY YEARS) AS RN2#
> FROM STAFF
> WHERE ID < 150 AND YEARS IN (6,7) AND JOB > 'L'
> ORDER BY JOB, YEARS, ID, NAME
> Thanks
> Prashant
> "SQL" <SQL@.discussions.microsoft.com> wrote in message
> news:C1B8F525-56CC-419F-A731-AD70626DC169@.microsoft.com...
>|||Can you please send me any document/link which says that these will be in
SQL Server 2005.
Thanks
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:O25Vh$%230FHA.2072@.TK2MSFTNGP14.phx.gbl...
> Use SQL Server 2005. It will be released in a few ws and has those
> constructs.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Prashant Bharti" <prashantb@.aditi.com> wrote in message
> news:uzB0lF%230FHA.3568@.TK2MSFTNGP15.phx.gbl...
>|||You might be able to find the information at http://www.microsoft.com/sql/2005/def
ault.mspx. Or
download and install the documentation for 2005:
http://www.microsoft.com/downloads/...&displaylang=en
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Prashant Bharti" <prashantb@.aditi.com> wrote in message
news:u4Kl3Kk1FHA.980@.TK2MSFTNGP14.phx.gbl...
> Can you please send me any document/link which says that these will be in
SQL Server 2005.
> Thanks
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:O25Vh$%230FHA.2072@.TK2MSFTNGP14.phx.gbl...
>

No comments:

Post a Comment