Sponsored Content
Top Forums Programming Sybase ASE - AVG Function Error Post 302992219 by Perlbaby on Thursday 23rd of February 2017 03:30:54 AM
Old 02-23-2017
Thanks Corona688 for the reply .

The following query was tried to returns a result set that shows the employees whose salary is one standard deviation greater than the average salary of their department.

So the below OVER was used for partitioning based on department value. For some reason , its not working in sybase ASE and throwing error .
Code:
  CAST(AVG( Salary) OVER ( PARTITION BY Department ) AS DECIMAL ( 10, 2 ) )          AS Average,
     CAST(STDDEV_POP( Salary )   OVER ( PARTITION BY Department ) AS DECIMAL ( 10, 2 ) )     AS StandardDeviation

please guide if this can be tried in different way or am i missing anything in above query . Thanks in advance.
 

9 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Sybase help: Open client, bcp function

To begin: I use Linux The Problem: I need bcp functionality for scripts. Perl modules, such as Sybase:xfer, require ctlib which comes with Sybase Open Client. Talking with Sybase sales reps is an exercise in futility and hate. They know absolutely nothing about their own products and will... (0 Replies)
Discussion started by: Bubnoff
0 Replies

2. UNIX and Linux Applications

sybase ase installer

i'm looking for an installer of Sybase ASE 11.9.2.6 for HP-UX. tried buying from the local distributor but he can only give me the latest version. can anyone point me to where i could possibly get it? (0 Replies)
Discussion started by: sam_salazar
0 Replies

3. Shell Programming and Scripting

Need to capture error of sybase sql in unix

Hi Gurus, I am very new in Unix, I have 1 script, in which I am truncating the table , then BCP the data in Sybase table, and then loading the data from sybase table to sybase table. every thing is working fine, but the problem is with Error. I made some hanges in my insert statement so... (1 Reply)
Discussion started by: aksar
1 Replies

4. Shell Programming and Scripting

Need to capture error of sybase isql in unix

Hi Gurus, I am very new in Unix, I have 1 script, in which I am truncating the table , then BCP the data in Sybase table, and then loading the data from sybase table to sybase table. every thing is working fine, but the problem is with Error. I made some hanges in my insert statement so... (3 Replies)
Discussion started by: aksar
3 Replies

5. Shell Programming and Scripting

Error in Sybase connectivity via UNIX

Helo Experts, I have an issue in connecting to sybase from UNIX. PFB, my code : #!/bin/ksh ############################################################################### # # Filename: docflo_split.sh # # Description:docflo_split.sh WrapperScript splits the temporary file... (1 Reply)
Discussion started by: Nits
1 Replies

6. Programming

How to trim values in sybase ase?

HI Team I am using Sybase ASE15.7 version. Below is the sample column values . http://abc.lifeline.airs.com/support/ https://xyzbre.lifeline.airs.com/video/ Would like to know how to Trim http:// and https:// from above list of example Remove characters after first / Include only the... (3 Replies)
Discussion started by: Perlbaby
3 Replies

7. Programming

Sybase ASE: Query to find correct format issue.

Hi Team , I am new to Sybase Adaptive Server Enterprise/15.7 (ASE) and need some guidance to find the different values in serial format column. SELECT DISTINCT SERIAL_FORMAT FROM PRODUCTS It has values with below format which contains 12 digits hexadecimal characters with... (2 Replies)
Discussion started by: Perlbaby
2 Replies

8. Programming

Sybase ASE Soundex Function Issue -Need Suggestion

Dear Team I am using Sybase Adaptive Server Enterprise/15.7 (ASE). Trying my luck on SOUNDEX function to get unique records Though the command works for characters and provides unique code for similar outputs. But when i try with Starting numbers ( Followed with Street address ) , soundex... (1 Reply)
Discussion started by: Perlbaby
1 Replies

9. Programming

Sybase ASE - Query Tuning - Need Suggestion

Dear Team Please provide suggestion on below query which is used in Sybase Adaptive Server Enterprise/15.7 (ASE). Query takes more time > 30 Mins to 1 Hr All required indexes are built Can we have any efficient approach to get the data retrieval faster for below query.Any help... (0 Replies)
Discussion started by: Perlbaby
0 Replies
NUMFMT_FORMAT(3)							 1							  NUMFMT_FORMAT(3)

NumberFormatter::format - Format a number

	Object oriented style

SYNOPSIS
public string NumberFormatter::format (number $value, [int $type]) DESCRIPTION
Procedural style string numfmt_format (NumberFormatter $fmt, number $value, [int $type]) Format a numeric value according to the formatter rules. PARAMETERS
o $fmt -NumberFormatter object. o $value - The value to format. Can be integer or float, other values will be converted to a numeric value. o $type - The formatting type to use. RETURN VALUES
Returns the string containing formatted value, or FALSE on error. EXAMPLES
Example #1 numfmt_format(3) example <?php $fmt = numfmt_create( 'de_DE', NumberFormatter::DECIMAL ); $data = numfmt_format($fmt, 1234567.891234567890000); if(intl_is_failure(numfmt_format($fmt))) { report_error("Formatter error"); } ?> Example #2 OO example <?php $fmt = new NumberFormatter( 'de_DE', NumberFormatter::DECIMAL ); $fmt->format(1234567.891234567890000); if(intl_is_failure($fmt->getErrorCode())) { report_error("Formatter error"); } ?> The above example will output: 1.234.567,891 SEE ALSO
numfmt_get_error_code(3), numfmt_format_currency(3), numfmt_parse(3). PHP Documentation Group NUMFMT_FORMAT(3)
All times are GMT -4. The time now is 11:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy