473,396 Members | 1,968 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Using DECODE and LEAST in MySQL

hi all..
i dont understand this sql statement(decode and least)
please help me..

Expand|Select|Wrap|Line Numbers
  1. sum(decode(f.code_category,'3', nvl(decode(d.flag_result,null,decode(least(b.date, :p_startingdate+1)b.date,1),0),1),0))
please convert this to if and else statement...so that i can understand...thank you..
Aug 16 '07 #1
1 2948
Atli
5,058 Expert 4TB
Hi, and welcome to TSDN!

I have change the title of this thread to better describe it's contents.

Please read the Posting Guidelines before posting in the forums, specifically the parts about using good thread titles, how to ask a question and using [code] tags.

Please describe your problem in greater detail. For example, explain what this query is supposed to achieve.
Also, note that this is an incomplete query. We can only give answers based on the information you give us. Bad information leads to bad answers.

Check out these links. (MySQL Reference Manual)
DECODE() function
LEAST() function

Moderator
Aug 17 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Valiz | last post by:
Hi, I am updating system time with IRIG time source which sends irregular pulses as shown below 11000011111100111111111111111111....(1-IRIG present and 0-IRIG not present) I need to update...
0
by: fishboy | last post by:
Howdy, Sorry if this is a double post. First try seemed to go into hyperspace. I'm working on a personal project. It's going to be a multipart binary attachment downloader that will search...
0
by: Matt Oefinger | last post by:
Hello gurus, I'm trying to do a search through an encrypted database (to which I have the key). I want to use the LIKE operator in MySQL rather than dumping out all entries and sorting in Perl,...
2
by: Ricky | last post by:
I want to use encode and decode in a varchar field size 100. This would just hold last and first names. Would this give me any porblems? thanks for any help! Ricky
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
8
by: Lad | last post by:
To be able to decode a string successfully, I need to know what coding it is in. The string can be coded in utf8 or in windows-1250 or in another coding. Is there a method how to find out the...
3
by: Geethu03 | last post by:
In MySql which query equals the Oracle Decode query. Thanks in Advance Geethu
20
by: _mario.lat | last post by:
hallo, I use PHP and I'd like to not write in hardcoded way password and login to access to mysql. how to not write password in code for access to mysql? How can I do? I'd like that who see my...
3
by: blurryhaddad | last post by:
hi all.. i dont understand this sql statement(decode and least) please help me.. sum(decode(f.code_category,'3',...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.