[SQL] to restore database in schema

2007-09-28 Thread Penchalaiah P.
Hi ... Under one database who's name is postgres ,its contains 2 schema's 1)cdao1 2)cdao2. I want to restore one database into schema 2.(cdao2)...here there is no option to restore... I can restore into one database,but I cant restore into schema...may I know y its happening... Any one can

Re: [SQL] Returnd Refcurser ( not fetchable

2007-08-09 Thread Penchalaiah P.
create table foo(sirname text, name text); insert into foo values ('Mueller', 'Marcus'); create function getfoo(char(1)) returns refcursor as ' declare ref refcursor; begin open ref for select * from foo where sirname like ''%'' || $1 || ''%''; return next ref; return end; ' LANGUAGE

[SQL] hi

2007-07-30 Thread Penchalaiah P.
I want to fix the pay based on joining date and antedate...antedate is the last date... Joining date is 01-07-2007 Antedate is 04-07-2005.. On joining date I will fix the pay but before fixing the pay I will check whether antedate is there or not, if its there then I will see difference be

[SQL] calculation of pay based on dates

2007-07-13 Thread Penchalaiah P.
Hi ... I want to fix the pay based on joining date and antedate...antedate is the last date... Joining date is 01-07-2007 Antedate is 04-07-2007.. On joining date I will fix the pay but before fixing the pay I will check whether antedate is there or not, if its there then I will see diffe

[SQL] need help

2007-05-13 Thread Penchalaiah P.
Hi ... Create table cdano_nya(cdano int4,nyano int4) ... I created this table and then I inserted some values to this( 234576,86)... Now when I am updating this table .. its not updating ..query is continuously running... When I am stopping query its

[SQL] Needs Query

2007-05-08 Thread Penchalaiah P.
In a table, a column contains Suneelll Sudhakarr Vivekk Ramana But my output is Suneel Sudhakar Vivek Ramana I want a query to get my output like above Please solve my problem ASAP Regards penchal

[SQL] Needs Function

2007-05-02 Thread Penchalaiah P.
I need a user defined function for the following purpose If I pass a string with comma ( , ) separated chars/values It should be appear in next line... Ex: select get_sep_str ('SK, rp, h, j, 6, 9, kl') from dual; Output : SK rp h j 6 9 kl (Or) I have one table like thi

[SQL] Needs Function

2007-05-02 Thread Penchalaiah P.
PLEASE GO TO FOLLOWING QUERY AND REVERT TO ME IF ANY QUERIES SELECT * FROM TEMP; DEPTNO EMPNO -- -- 10 B3091,B3092,B3093,B3085 11 3651,6521 12 H3062 1 SELECT DEPTNO,SUBSTR(EMPNO,

[SQL] hi

2007-04-24 Thread Penchalaiah P.
Hi I have the data like this in temp table SQL> Select sno, value from temp; SNO Value 1 650.00 2 850.00 3 640.00 3 985.00 5 987.00 9 9864.00

Re: [SQL] sql

2007-02-06 Thread Penchalaiah P.
Hi... I tried this its working.. can u please check this. select count(*) as all, sum(decode(entry_user_id,'VC',1)) as entry_user_id,sum(decode(entry_user_id,'VE',1)) as VE ,sum(decode(entry_user_id,CV,1))as CV,sum(decode(entry_user_id,'SC',1))as SC from vigilance_master; regards penchal -

[SQL] hi any one can help me

2006-12-03 Thread Penchalaiah P.
Hi ... I installed postgresql 8.1 .. then I uninstalled postgresql.. Now again I am re installing the same postgresql 8.1 .. but its not installing .its giving error like already user exists its showing... I removed those files from registry also.. but I am getting same error...

[SQL] hi may i know y am i getting this error

2006-11-17 Thread Penchalaiah P.
Hi When I am executing my function its giving error.. first time its running properly.. but when I am executing second time I am getting error create or replace function irla_punching_medium_insert1(in_proj_code numeric,in_pt_code varchar,in_mon_abs date) returns varchar as' declare l_p va

[SQL] hi i am getting error...can u solve this

2006-11-02 Thread Penchalaiah P.
Hi can u tell me about this problem..   cda_no  bp npa   rp dp pay_change_date   234597D   7900 400   1000 1000 2006-09-05 234597D   8250 400   1000 1000 2005-09-05 234575E   4000 200   333

[SQL] hi i want help on levels

2006-10-16 Thread Penchalaiah P.
CREATE TABLE admin_activity (   activity_id int4 NOT NULL,   Activity_name varchar NOT NULL,   URL varchar,   parent_activity_id int4);   1  Administration   0 2  Activities   1 3  Manage Activity 2 4  Map

[SQL] i have table

2006-10-03 Thread Penchalaiah P.
Hi … I have one table with 12 fields..   CREATE TABLE addition_alteration_memo (   addition_alteration_memo int8 NOT NULL DEFAULT nextval('addition_alteration_memo_addition_alteration_memo_seq'::regclass),   cda_no varchar(7) NOT NULL,   week numeric,   sheet_no numeric,   serial_

[SQL] hi i am gettin error when i am deleting a function from my pgadmin

2006-09-11 Thread Penchalaiah P.
Hi good morning to all…. I created some functions in my pgadmin… when I am deleting those functions from that pgadmin its giving error…i.e   An ERROR  has occurred   ERROR:function function_name1(character varying, character varying, character varying, date, character varying) does

[SQL] to get DD-MM-YYYY format of data

2006-08-22 Thread Penchalaiah P.
Hi ..   I am using date is data type to one of the field in my table….but when ever I am passing values to that field it is taking yyy-mm-dd format.. But I don’t want like that .. I need like this DD-MM-.. for this wt I have to do…   Thanks  &  Regards Penchal reddy | Software En

[SQL] problem with sequence.....

2006-08-16 Thread Penchalaiah P.
Hi good evening every one………   I have a problem with sequence ..   I created one sequence with the name of famaseq.. I am using this sequence in my function.. This is the function   Create or replace function getFamanewcase1(in_cda_no varchar,in_dak_id varchar,in_name_of_beneficia

[SQL] i need informarion regarding functions and arrays...

2006-08-02 Thread Penchalaiah P.
Hi good evening to all……..   Rcid    value 1 yes 2 no 3 yes 4 yes 5 no 6 yes 7 no 8 yes 9 no 10

[SQL] How to cal function in one another

2006-08-02 Thread Penchalaiah P.
  hai, In mainfun,the query returns more than two rows,if execute query outside. I have to remove limit keyword in mainfun defination...even it returns 1st row values only..But i need the multful rows? so how can i do that...please help me...   select subfun1(22);    subfun1 ---

[SQL] How to use table from one database to another

2006-08-02 Thread Penchalaiah P.
Hai all,  I have 2 databases namee PAO and CAS.  PAO contains 3 schemas named Public,pao,sts CAS contains 4 schemas  named Public,cao,sts,reports    Now  i am in PAO database..now i want access table 'activity' in  schema 'cas' in CAS database.  How it is posible.    2nd thing is

[SQL] Problem while using lo_import and lo_export

2006-08-02 Thread Penchalaiah P.
Hi,   I have PostgresSQL database connection from server. Server ip is 172.16.5.179   Now I want use lo_import and  lo_export function for storing images into the database.   This images is located in my system itself.   When I am going using the following query…   Insert into ima

[SQL] hi let me know the solution to this question

2006-07-17 Thread Penchalaiah P.
Hi good morning all……..   Can u let me know if at all any system defined variable exists to check whether insert , update , and delete is successfully executed in a stored procedure……..   So that I can perform some steps based on the  result of execution if possible please send me the s

[SQL] above the date functionssssssss

2006-07-11 Thread Penchalaiah P.
Hi good evening to every one……… i want to get month and year in the current date..see this is date 2005-02-12... here date is 12 , month is 02 and year is 2005..but i want format like 02-2005... can u tell me how to do this   Thanks  &  Regards Penchal reddy | Software Engineer   

Re: [SQL] i have a problem of privilages

2006-07-04 Thread Penchalaiah P.
] Sent: Tuesday, July 04, 2006 5:47 PM To: Penchalaiah P. Cc: pgsql-sql@postgresql.org; Richard Broersma Jr Subject: Re: [SQL] i have a problem of privilages     create a user with limited permmission and give the same to the remote users. May be that will solve your problem. REVOKE INSERT

[SQL] i have a problem of privilages

2006-07-04 Thread Penchalaiah P.
Hi good afternoon to every one..   Now I am accessing remote database server in postgresql.. but I can see all tables and functions in remote database server but I can delete,update,alter and drop tables in remote database server from my local machine.. to avoid these things wt I have to

Re: [SQL] hi i need to connect database from my system to another

2006-07-03 Thread Penchalaiah P.
: Penchalaiah P. Cc: General Postgresql List Subject: RE: [SQL] hi i need to connect database from my system to another system > If u don't mind can u please tell me clearly.. where I have start -I or > how to start postgresql with -I > > I am using postgresql database server... in

[SQL] hi i need to connect database from my system to another system

2006-07-03 Thread Penchalaiah P.
Hi good afternoon to every one..   I am using postgresql database server… in my system.. if I want to connect to this database server from other system..Or how can I use this database server  in other machine .. How can I do this..if any one have idea about this please give me brief desc

[SQL] can any one solve this problem

2006-06-28 Thread Penchalaiah P.
emp_table( Cdacno varchar (7) (primary key), Personal_No varchar (10)(foreign key), Name varchar (40));   personal_table ( Personal_No varchar (10) (primary key), Cdacno varchar (7), Date_Of_Birth date);   unit_master ( Unit id varchar (10) (primary key), Unit_Name varchar(25),

[SQL] i need solution to this problem

2006-06-27 Thread Penchalaiah P.
Hi good morning to all……..   I have tables like 1) emp_table (personal_no integer (foreign key), cdacno varchar (primary key),name varchar);     2) Rank_table (rank_id varchar (primary key), rank_name varchar);   3) Rank_date_table (rank_id (foreign key), rank_dat

[SQL] hi i need to encrypt one field in a table

2006-05-30 Thread Penchalaiah P.
Hello,I want to create a table with an encrypted field for a password entry, sothat you can see only .And can I encrypt fields which datatype is an integer or a timestamp?  Hi pls let me know this………..   Thanks  &  Regards Penchal reddy | Software Engineer    Infinite Com

[SQL] hi still i am unable to provide encryption to a particular table....

2006-05-29 Thread Penchalaiah P.
Hi   I have gone thru encryption in postgresql help… but there I got some message like set some comments in pg_hba.conf file.. if I set host name and port number here wt I will get… my requirement is to do encryption to one of my table.. if any body knows about this please help me……..  

[SQL] hi how to use encryption for incomtax in postgresql

2006-05-26 Thread Penchalaiah P.
hi sir   how to use encryption to password in postgresql with examples   Thanks  &  Regards Penchal reddy | Software Engineer    Infinite Computer Solutions | Exciting Times…Infinite Possibilities... SEI-CMMI level 5 | ISO 9001:2000 IT SERVICES | BPO

[SQL] hi can u give solution to this query

2006-05-23 Thread Penchalaiah P.
Hi sir…    If u don’t mind can u reply for this  question   This is one table… it has one primary key…….so I can insert the values from  data edit…   1)…CREATE TABLE "ADV" (   "T-Section_Id" varchar(10) NOT NULL,   "CDA_No" varchar(7) NOT NULL,   "Imp_Schedule_Id" int4 NOT NULL,

[SQL] some error when executing query in pgAdmin tool

2006-05-23 Thread Penchalaiah P.
  I created one table in pgAdmin tool but when I am executing query it is giving error….   CREATE TABLE "ADV" (   "T-Section_Id" varchar(10) NOT NULL,   "CDA_No" varchar(7) NOT NULL,   "Imp_Schedule_Id" int4 NOT NULL,   "Sanction_No" varchar(20) NOT NULL,   "Sanction_Date" date NOT

[SQL] i need information regarding schema

2006-05-22 Thread Penchalaiah P.
Hi good morning to every one…..   I am using pgAdmin to gui for postgresql…I want to know how to create schema in pgAdmin and how to set roles …….   Thanks  &  Regards Penchal reddy | Software Engineer    Infinite Computer Solutions | Exciting Times…Infinite Possibilities...

[SQL] i am getting error when i am using copy command

2006-05-02 Thread Penchalaiah P.
Hi ..   1)   I created one table 2) Create table penchal(id integer, name varchar(12),age integer); 3)   Then I inserted some values into this table……… 4) Insert into penchal values(1,’reddy’,2); 5)   Select * from penchal ; I used this statement to display the val

[SQL] set return function is returning a single record, multiple times,how can i get all the records in the table( description inside )

2006-04-28 Thread Penchalaiah P.
Hi   Please spare some time to provide a solution for the described problem :   I am using set returning functions to return all the records from a table named  pss , But what I am getting is the first record is returned as many  times , the number of records present in the rank_mas

[SQL] any one can help me how to get multiple rows in postgresql using arrays in functions

2006-04-27 Thread Penchalaiah P.
any one can help me  how to get multiple rows in postgresql using arrays in functions   Thanks  &  Regards Penchal reddy | Software Engineer    Infinite Computer Solutions | Exciting Times…Infinite Possibilities... SEI-CMMI level 5 | ISO 9001:2000 IT SERVICES | BPO