Showing posts with label greetings. Show all posts
Showing posts with label greetings. Show all posts

Friday, March 23, 2012

Order By- CREATIVITY NEEDED!

Greetings,
I want to order by Orders then RecType, BUT leaving RecType=13 in
between 30 and 40. So the sequence should be: 10, 15, 30, 13, 40 for
Order=4501130 then Order=5006730.
CREATE TABLE TblA (RecType int, Orders varchar(255))
INSERT INTO TblA (RecType, Orders) VALUES (10, '4501130')
INSERT INTO TblA (RecType, Orders) VALUES (10, '5006730')
INSERT INTO TblA (RecType, Orders) VALUES (15, '4501130')
INSERT INTO TblA (RecType, Orders) VALUES (15, '5006730')
INSERT INTO TblA (RecType, Orders) VALUES (30, '4501130')
INSERT INTO TblA (RecType, Orders) VALUES (30, '5006730')
INSERT INTO TblA (RecType, Orders) VALUES (13, '4501130')
INSERT INTO TblA (RecType, Orders) VALUES (13, '5006730')
INSERT INTO TblA (RecType, Orders) VALUES (40, '4501130')
INSERT INTO TblA (RecType, Orders) VALUES (40, '5006730')
SELECT * FROM TblA ORDER BY Orders ASC, RecType ASC
--
Thanks in Advance,
Don
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!SELECT * FROM TblA
ORDER BY Orders ASC,
Case RecType When 13 Then 35 Else RecType End ASC
"don larry" wrote:

> Greetings,
> I want to order by Orders then RecType, BUT leaving RecType=13 in
> between 30 and 40. So the sequence should be: 10, 15, 30, 13, 40 for
> Order=4501130 then Order=5006730.
> --
> CREATE TABLE TblA (RecType int, Orders varchar(255))
> INSERT INTO TblA (RecType, Orders) VALUES (10, '4501130')
> INSERT INTO TblA (RecType, Orders) VALUES (10, '5006730')
> INSERT INTO TblA (RecType, Orders) VALUES (15, '4501130')
> INSERT INTO TblA (RecType, Orders) VALUES (15, '5006730')
> INSERT INTO TblA (RecType, Orders) VALUES (30, '4501130')
> INSERT INTO TblA (RecType, Orders) VALUES (30, '5006730')
> INSERT INTO TblA (RecType, Orders) VALUES (13, '4501130')
> INSERT INTO TblA (RecType, Orders) VALUES (13, '5006730')
> INSERT INTO TblA (RecType, Orders) VALUES (40, '4501130')
> INSERT INTO TblA (RecType, Orders) VALUES (40, '5006730')
> SELECT * FROM TblA ORDER BY Orders ASC, RecType ASC
> --
> Thanks in Advance,
> Don
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
>|||Wow, what a nifty little trick!
Sure worked though.
Thanks, i appreciate.
Don
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!

Monday, March 19, 2012

Oracle's TO_CHAR, what in SQL Server 2005?

Greetings,

In oracle i use the following sentence TO_CHAR(Table1.DateIn, ,'mm/yyyy') within a query. I need how to replace this for using it in SQL Server. I tried to use the SQL Server CONVERT function but nothing work. Could you help me?

Thank you in advance,

Fernando

use convert(varchar,table1.dateIn)|||SUBSTRING(CONVERT(varchar(10), Table1.Dateln, 103), 4, 7)

Monday, March 12, 2012

Oracle to SQL 2005 Replication

Greetings,
I am looking for a tool that i can use to replicate oracle tables into Sql
2005 database. Or if i can pull the data out of oracle using a sql tool that
would be perfect. The database tables are only 2GB or so. Can someone share
some insight on whether this is feasible or not.
Thanks In Advance
Deon
Transactional replication for Oracle Publishers (v 8.0.5 upwards) is built on
the Microsoft SQL Server transactional replication publishing architecture
for SQL 2005.
Pls have a look in BOL for more details.
Cheers,
Paul Ibison
|||Thanks Paul.
What is BOL?
"Paul Ibison" wrote:

> Transactional replication for Oracle Publishers (v 8.0.5 upwards) is built on
> the Microsoft SQL Server transactional replication publishing architecture
> for SQL 2005.
> Pls have a look in BOL for more details.
> Cheers,
> Paul Ibison