Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Decode Help

Author  Topic 

augustocolom
Starting Member

4 Posts

Posted - 2010-06-16 : 13:54:50
Hello,

Could anyone tell me what's wrong with this DECODE,
it just returns me the values when
FATTPFT.CTPMVTPFT = 'E'

REPLACE (TO_CHAR (DECODE (FATTPFT.CTPMVTPFT, 'E', FATFATU.CCCOMFATU, 'S', FATFATU.CDOCOFATU), '000, 000.0000000'),',','-') DOCUMENT,

Sachin.Nand

2937 Posts

Posted - 2010-06-16 : 13:58:40
I think this is related to oracle.This forum is for Microsoft SQL Server only.Please post it in oracle forum.

http://www.orafaq.com/forum/



Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless.

PBUH
Go to Top of Page

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2010-06-16 : 13:58:56
This looks like ORACLE. This is a dedicated MS SQL Server Forum.
You may want to try [url]http://www.dbforums.com/[/url] for better help.
Go to Top of Page

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2010-06-16 : 13:59:22
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2010-06-16 : 14:19:33
quote:
Originally posted by vijayisonly





Missed by 16 secs



Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless.

PBUH
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2010-06-16 : 14:26:21
quote:
Missed by 16 secs
Ummmm, 26 seconds.
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2010-06-16 : 14:32:25
quote:
Originally posted by robvolk

quote:
Missed by 16 secs
Ummmm, 26 seconds.



select DATEDIFF(ss,'13:58:40','13:58:56')


Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless.

PBUH
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2010-06-16 : 14:36:03


I looked at the timestamp on the sniped post.

I haven't had coffee today, blame that.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2010-06-16 : 14:47:46
pfffftttt...just trying to catch up....

Did I say I hate Oracle?

In any case....because I have to code this crap...try breaking it up into pieces....not only that...you need to post more code...

Did you know that in Oracle...you can do this

SELECT a.Col1, a.Col2
FROM Table1 a, Table2 a
WHERE a.Col1 = a.Col2



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2010-06-16 : 14:58:16
quote:
Originally posted by X002548

Did you know that in Oracle...you can do this

SELECT a.Col1, a.Col2
FROM Table1 a, Table2 a
WHERE a.Col1 = a.Col2

Sure.. and you can do it in SQL Server too. Not that I would.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2010-06-16 : 15:01:22
[smack]

GD Amazing....would never have thought to try


[/smack]

DB2 wouldn't allow it...at least not z/OS

BUT I run across the Oracle "DBA's"...freakin amazing crap they write




Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -