Sponsored Content
Full Discussion: Analytic functions in Pro*c
Top Forums Programming Analytic functions in Pro*c Post 302201891 by quintet on Tuesday 3rd of June 2008 10:51:48 AM
Old 06-03-2008
Analytic functions in Pro*c

Hi All,

when I use the following analytic function in sql prompt, i am getting the result

count(emp_no) over (partition by emp_no )

/* select count(emp_no) over (partition by emp_no ) from temp */

but when i use the same analytic function in Pro*c i get the following error


Error at line 160, column 36 in file test.pc
count(emp_no) over (partition by emp_no)
...................................1
PCC-S-02201, Encountered the symbol "(" when expecting one of the following:

, into, from,

Error at line 0, column 0 in file test.pc
PCC-F-02102, Fatal error while doing C preprocessing
rm: sef_msel.c: No such file or directory
make: The error code from the last command is 2.


Can you advice me how to use analytic function in Pro*c?

Thanks...
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

domain logon problem - FreeBSD PDC w/ win2k pro and winxp pro

this is the seventh problem i'm having with samba. for some reason, i cannot logon to the domain. i've created user accounts... and i was able to establish a connection between the samba server (my PDC) and my workstations by logging in as "root." however now when i try to logon it gives... (5 Replies)
Discussion started by: xyyz
5 Replies

2. Shell Programming and Scripting

Regarding functions

Hi, I have a function or script like this. show() { echo "Hi" } | tee -a log show This creates a logfile and prints Hi in it. Now when I try to do the same for sql like this: show() { sqlplus -s scott/tiger<<! select * from details; ! } | tee -a log show Then it gives me a... (2 Replies)
Discussion started by: sendhilmani
2 Replies

3. Shell Programming and Scripting

Use of functions

Hi my shell is tcsh can I have functions in my shell scripting? Is the below shell script correct. Can I have two functions and call one of them as required. ---------- echo "functions" f1 f1 () { echo "hello" } f2 () (1 Reply)
Discussion started by: amitrajvarma
1 Replies

4. UNIX for Dummies Questions & Answers

Help with functions

Hi, I am exploring with defining functions in my BASH shell scripts. However, I am bit confused about how to pass parameters to my functions. I was under the impression that you must do something like the following: Define a function called "sample_function": function sample_function {... (3 Replies)
Discussion started by: msb65
3 Replies

5. Shell Programming and Scripting

i think i need functions ?

Hi, im making a little script but need some help Code i have so far is read -p 'Bot Nickname:' ecnick read -p 'Bot Username:' ecusername read -p 'Bot Realname:' ecrealname read -p 'Your Email:' ecemail echo '' echo Your bots nickname is set to $ecnick echo Your bots username is set to... (2 Replies)
Discussion started by: Gemster
2 Replies

6. Programming

Functions

Hi All, Can any one help me. I am calling in a function2 with string as parameter from function1, the function1 gives 3 values. how i get the 3 values from funciton2 to function1. i have to give a return or something. thanks in advance. (2 Replies)
Discussion started by: uday.sena.m
2 Replies

7. Shell Programming and Scripting

How to execute functions or initiate functions as command line parameters for below requirement?

I have 7 functions those need to be executed as command line inputs, I tried with below code it’s not executing function. If I run the ./script 2 then fun2 should execute , how to initiate that function I tried case and if else also, how to initiate function from command line if then... (8 Replies)
Discussion started by: saku
8 Replies

8. UNIX for Beginners Questions & Answers

Deleting unused kdb+ analytic files in RedHat

Hello guys :) I am new to using Unix and was hoping somebody could help me. Essentially, I am trying to clean out my database. For example, I have a directory filled with 100s of analytics and I want to know if they are used by any other analytics or if they are used by the front end user... (17 Replies)
Discussion started by: Michael37
17 Replies
MYSQLINDEXCHECK(1)						  MySQL Utilities						MYSQLINDEXCHECK(1)

NAME
mysqlindexcheck - Check for redundant or duplicate indexes on a list tables or databases SYNOPSIS
mysqlindexcheck [options] db[:table] ... DESCRIPTION
This utility reads the indexes for one or more tables and identifies duplicate and potentially redundant indexes. To check all tables in a database, specify only the database name. To check a specific table, name the table in db.table format. It is pos- sible to mix database and table names. You can scan tables in any database except the internal databases mysql, INFORMATION_SCHEMA, and performance_schema. Depending on the index type, the utility applies the following rules to compare indexes (designated as idx_a and idx_b): BTREE idx_b is redundant to idx_a if and only if the first n columns in idx_b also appear in idx_a. Order and uniqueness count. HASH idx_a and idx_b are duplicates if and only if they contain the same columns in the same order. Uniqueness counts. SPATIAL idx_a and idx_b are duplicates if and only if they contain the same column (only one column is permitted). FULLTEXT idx_b is redundant to idx_a if and only if all columns in idx_b are included in idx_a. Order counts. To see DROP statements to drop redundant indexes, specify the --show-drops option. To examine the existing indexes, use the --verbose option, which prints the equivalent CREATE INDEX (or ALTER TABLE for primary keys. To display the best or worst nonprimary key indexes for each table, use the --best or --worst option. This causes the output to show the best or worst indexes from tables with 10 or more rows. By default, each option shows five indexes. To override that, provide an integer value for the option. To change the format of the index lists displayed for the --show-indexes, --best, and --worst options, use one of the following values with the --format option: grid (default) Display output in grid or table format like that of the mysql monitor. csv Display output in comma-separated values format. tab Display output in tab-separated format. sql print SQL statements rather than a list. vertical Display output in single-column format like that of the G command for the mysql monitor. Note: The --best and --worst lists cannot be printed as SQL statements. OPTIONS
mysqlindexcheck accepts the following command-line options: --help Display a help message and exit. --best[=<N>] If --stats is given, limit index statistics to the best N indexes. The default value of N is 5 if omitted. --format=<index_format>, -f<index_format> Specify the index list display format for output produced by --stats. Permitted format values are grid, csv, tab, sql, and vertical. The default is grid. --server=<source> Connection information for the server in <user>[:<passwd>]@<host>[:<port>][:<socket>] format. --show-drops, -d Display DROP statements for dropping indexes. --show-indexes, -i Display indexes for each table. --skip, -s Skip tables that do not exist. --stats Show index performance statistics. --verbose, -v Specify how much information to display. Use this option multiple times to increase the amount of information. For example, -v = verbose, -vv = more verbose, -vvv = debug. --version Display version information and exit. --worst[=<N>] If --stats is given, limit index statistics to the worst N indexes. The default value of N is 5 if omitted. NOTES
You must provide connection parameters (user, host, password, and so forth) for an account that has the appropriate privileges to read all objects accessed during the operation. For the --format option, the permitted values are not case sensitive. In addition, values may be specified as any unambiguous prefix of a valid value. For example, --format=g specifies the grid format. An error occurs if a prefix matches more than one valid value. EXAMPLES
To check all tables in the employees database on the local server to see the possible redundant and duplicate indexes, use this command: $ mysqlindexcheck --server=root@localhost employees # Source on localhost: ... connected. # The following indexes are duplicates or redundant for table employees.dept_emp: # CREATE INDEX emp_no ON employees.dept_emp (emp_no) USING BTREE # may be redundant or duplicate of: ALTER TABLE employees.dept_emp ADD PRIMARY KEY (emp_no, dept_no) # The following indexes are duplicates or redundant for table employees.dept_manager: # CREATE INDEX emp_no ON employees.dept_manager (emp_no) USING BTREE # may be redundant or duplicate of: ALTER TABLE employees.dept_manager ADD PRIMARY KEY (emp_no, dept_no) # The following indexes are duplicates or redundant for table employees.salaries: # CREATE INDEX emp_no ON employees.salaries (emp_no) USING BTREE # may be redundant or duplicate of: ALTER TABLE employees.salaries ADD PRIMARY KEY (emp_no, from_date) # The following indexes are duplicates or redundant for table employees.titles: # CREATE INDEX emp_no ON employees.titles (emp_no) USING BTREE # may be redundant or duplicate of: ALTER TABLE employees.titles ADD PRIMARY KEY (emp_no, title, from_date) COPYRIGHT
Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA AUTHOR
MySQL Utilities Team COPYRIGHT
2010, Oracle and/or its affiliates. All rights reserved. 1.0.3 May 09, 2012 MYSQLINDEXCHECK(1)
All times are GMT -4. The time now is 02:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy