[SQL] 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-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 between 2 dates..if difference is 2 years then I will fix the pay with increments...if difference is less than 2 years then I will fix the pay with out increments... Take an example of above 2 dates..there is no 2 years difference between two dates... 01-07-2007 I will fix the pay...after 3 days current date = antedate...so again I have to fix the pay with out my intervention... Is there any jobs or schedules or triggers to call that function when current date and antedate is equal... Thanks Regards Penchal Reddy Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records.
Re: [SQL] hi
John Summerfield wrote: Penchalaiah P. wrote: Information transmitted by this e-mail is proprietary to Infinite Computer Solutions It may be proprietary, but it shore ain't confidential! Placing confidential on every document without regard for its content, especially when some of it's publicly disseminated, can remove the protection of confidentiality at law from all such marked documents in many jurisdictions, including the U.S. There must be discrimination applied in the marking of information as confidential. Quite aside from the foolishness you pointed out of marking something confidential then placing it into the public eye in an archived forum where it will be visible by everybody forever. Now we can publish everything ever written at or by Infinite Computer Solutions without fear of liability. -- Lew ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [SQL] hi
Penchalaiah P. wrote: Information transmitted by this e-mail is proprietary to Infinite Computer Solutions It may be proprietary, but it shore ain't confidential! ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
[SQL] hi
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 7 875.00 Now, I want display the result like this... SQL Select sno, value, get_sum(value) as sum from temp; SNO Value SUM 1 650.00 650.00 2 850.00 1500.00 --650+850 3 640.00 2140.00 --1500+640 3 985.00 3125.00 -- 2140+985 5 987.00 4112.00 9 9864.00 13976.00 7 875.00 14851.00 Any one can tell me query for this .. I don't want any procedure or function... Thanks Regards Penchal Reddy Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records.
Re: [SQL] hi
Select sno AS SNO, SELECT value AS VALUE, get_sum(value) as SUM from temp; From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Penchalaiah P. Sent: April 24, 2007 8:09 AM To: pgsql-sql@postgresql.org Subject: [SQL] hi 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 7 875.00 Now, I want display the result like this... SQL Select sno, value, get_sum(value) as sum from temp; SNO Value SUM 1 650.00 650.00 2 850.00 1500.00 --650+850 3 640.00 2140.00 --1500+640 3 985.00 3125.00 -- 2140+985 5 987.00 4112.00 9 9864.00 13976.00 7 875.00 14851.00 Any one can tell me query for this .. I don't want any procedure or function... Thanks Regards Penchal Reddy Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records.
Re: [SQL] hi
Hi, try this. It's working... SELECT t1.sno, sum(t2.value) FROM temp as t1, temp as t2 WHERE t1.sno = t2.sno GROUP BY t1.sno; but not completely. The problem is the this suppose your sno is uniqu. But as I see 3 is not. Anyway it may help you. 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 7 875.00 Now, I want display the result like this... SQL Select sno, value, get_sum(value) as sum from temp; SNO Value SUM 1 650.00 650.00 2 850.00 1500.00 --650+850 3 640.00 2140.00 --1500+640 3 985.00 3125.00 -- 2140+985 5 987.00 4112.00 9 9864.00 13976.00 7 875.00 14851.00 Any one can tell me query for this .. I don't want any procedure or function... Thanks Regards Penchal Reddy Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records. ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [SQL] hi
On þri, 2007-04-24 at 17:39 +0530, Penchalaiah P. wrote: Hi I have the data like this in temp table SQL Select sno, value from temp; you seem to be assuming a specific order for this. gnari ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [SQL] hi
On Tue, 24 Apr 2007, Penchalaiah P. wrote: 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 7 875.00 Tables are not ordered. You'll need something like an ordering column that represents the ordering and is unique. Then you can probably do something like (untested): select sno, value, (select sum(value) as sum from temp t where t.ordering = temp.ordering) from temp order by ordering; or select t1.sno, t1.value, sum(t2.value) from temp as t1, temp as t2 where t1.ordering = t2.ordering group by t1.ordering, t1.sno, t1.value order by t1.ordering; ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [SQL] hi
Hi, Can i get GUI tool for PostgreSQLin LINUX.Pls let me know from wher i candownload the same. Regards SAJI VERGHESE +919941140433 - Original Message From: Wilkinson, Jim [EMAIL PROTECTED] To: Penchalaiah P. [EMAIL PROTECTED]; pgsql-sql@postgresql.org Sent: Tuesday, 24 April, 2007 6:15:13 PM Subject: Re: [SQL] hi Select sno AS “SNO”, SELECT value AS “VALUE”, get_sum(value) as SUM from temp; From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Penchalaiah P. Sent: April 24, 2007 8:09 AM To: pgsql-sql@postgresql.org Subject: [SQL] hi 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 7 875.00 Now, I want display the result like this… SQL Select sno, value, get_sum(value) as sum from temp; SNO Value SUM 1 650.00 650.00 2 850.00 1500.00 --650+850 3 640.00 2140.00 --1500+640 3 985.00 3125.00 -- 2140+985 5 987.00 4112.00 9 9864.00 13976.00 7 875.00 14851.00 Any one can tell me query for this .. I don’t want any procedure or function… Thanks Regards Penchal Reddy Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records. Add online presence to your web pages, find out how here - http://messenger.yahoo.com/addpresence.php
Re: [SQL] hi
Try pgAdmin - Google will find it for you. ~p On Wed, 2007-04-25 at 10:10 +0530, saji varghese wrote: Hi, Can i get GUI tool for PostgreSQLin LINUX.Pls let me know from wher i candownload the same. ***Confidentiality and Privilege Notice*** The material contained in this message is privileged and confidential to the addressee. If you are not the addressee indicated in this message or responsible for delivery of the message to such person, you may not copy or deliver this message to anyone, and you should destroy it and kindly notify the sender by reply email. Information in this message that does not relate to the official business of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta. Weatherbeeta, its employees, contractors or associates shall not be liable for direct, indirect or consequential loss arising from transmission of this message or any attachments
Re: [SQL] hi any one can help me
You will need to manually remove the postgresql folder under Program files because uninstalling does not remove that folder for you. - Original Message From: Penchalaiah P. [EMAIL PROTECTED] To: pgsql-sql@postgresql.org Sent: Sunday, December 3, 2006 5:33:41 AM Subject: [SQL] hi any one can help me 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… Any one can help to reinstall my postgresql in my machine… ThanksRegards Penchal reddy | Software Engineer Infinite Computer Solutions | Exciting Times…Infinite Possibilities... SEI-CMMI level 5 | ISO 9001:2000 IT SERVICES | BPO Telecom | Finance | Healthcare | Manufacturing | Energy Utilities | Retail Distribution | Government Tel +91-80-5193-(Ext:503)| Fax +91-80-51930009 | Cell No +91-9980012376|www.infics.com Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this mail from your records. Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records. Cheap talk? Check out Yahoo! Messenger's low PC-to-Phone call rates. http://voice.yahoo.com
Re: [SQL] hi any one can help me
On 12/3/06, Penchalaiah P. [EMAIL PROTECTED] wrote: 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… *Any one can help to reinstall my postgresql in my machine…* Have you tried deleting the postgres user on your system? See if this helps. -- == Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com http://codeelixir.com ==
[SQL] hi may i know y am i getting this error
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 varchar; credit_amount numeric; debit_amount numeric; l_vr_no varchar; l_count integer; begin select irla_code into l_p from npo_project_irla_code where npo_proj_code=$1 and pt_code=$2; create table dummy_table without oids as select side,irla_code,substr(type_charge,1,1)||substr(type_charge,2,1) || substr(type_charge,4,1) ||substr(type_charge,5,1) as type_charge,npo_code from irla_npo_pm_codes_master where type_charge=''(+-)CR'' or type_charge=''(+-)RC'' union all select side,irla_code,substr(type_charge,1,1)||substr(type_charge,3,1)||substr( type_charge,4,1) || substr(type_charge,6,1) as type_charge,npo_code from irla_npo_pm_codes_master where type_charge=''(+-)CR'' or type_charge=''(+-)RC'' union all select side,irla_code,type_charge,npo_code from irla_npo_pm_codes_master where type_charge=''(+)C'' or type_charge=''(+)R'' ; update dummy_table set irla_code=l_p where irla_code=''P''; create table amount_table without oids as select dt.side,dt.irla_code,sum(npoaa.amount) as amount,dt.type_charge from npo_abs_amount npoaa,dummy_table dt where dt.side=npoaa.side and dt.npo_code=npoaa.npo_code and extract(month from to_date(npoaa.mon_abs,''-mm-dd''))||''/''|| extract(year from to_date(npoaa.mon_abs,''-mm-dd'')) =extract(month from to_date($1,''-mm-dd''))||''/''|| extract(year from to_date($1,''-mm-dd'')) and npoaa.proj_code=$1 and npoaa.pt_code= $2 group by dt.irla_code ,dt.type_charge,dt.side ; drop table dummy_table; select cast(substr(max(vr_no),1,2) || cast(substr(max(vr_no),3,1) as integer)+1 as varchar) into l_vr_no from irla_punchingmedium_top_amt ; select sum(amount) into credit_amount from amount_table where side=''C''; select sum(amount) into debit_amount from amount_table where side=''D''; insert into irla_punchingmedium_top_amt (vr_no,credit_tot_amt,class_of_vr,mon_abs,proj_code,pt_code,debit_tot_am t)values (l_vr_no,credit_amount,1,$3,$1,$2,debit_amount); insert into irla_punchingmedium_amt (amount,codehead,type_of_charge,vr_no) select amount,irla_code,type_charge,(select l_vr_no) from amount_table; raise notice''%'', l_vr_no; drop table amount_table; raise notice ''%2'', l_count; return ''inserted''; end; 'language'plpgsql'; ERROR: relation with OID 75275 does not exist CONTEXT: SQL statement update dummy_table set irla_code= $1 where irla_code='P' PL/pgSQL function irla_punching_medium_insert1 line 19 at SQL statement ThanksRegards Penchal reddy | Software Engineer Infinite Computer Solutions | Exciting Times...Infinite Possibilities... SEI-CMMI level 5 | ISO 9001:2000 IT SERVICES | BPO Telecom | Finance | Healthcare | Manufacturing | Energy Utilities | Retail Distribution | Government Tel +91-80-5193-(Ext:503)| Fax +91-80-51930009 | Cell No +91-9980012376|www.infics.com Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this mail from your records. Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records.
Re: [SQL] hi may i know y am i getting this error
Penchalaiah P. wrote: 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 table dummy_table without oids as ... update dummy_table set irla_code=l_p where irla_code=''P''; ... ERROR: relation with OID 75275 does not exist CONTEXT: SQL statement update dummy_table set irla_code= $1 where irla_code='P' The queries in plpgsql have their query-plans compiled the first time they are executed. This means that the first time you ran the function you created dummy_table with an OID of 75275. The second time, it was re-created with a different OID, but the update query doesn't know this. Its plan tries to access a table with OID=75275 and fails. Solution: read up on the EXECUTE string statement that allows you to build dynamic queries. Also, you might want to read up on creating temporary tables. HTH -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [SQL] hi may i know y am i getting this error
am Fri, dem 17.11.2006, um 15:15:25 +0530 mailte Penchalaiah P. folgendes: 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' ... create table dummy_table without oids as ... drop table dummy_table; end; 'language'plpgsql'; PG caches the plan for this function and runs in an error, because it believes the second time, that this table has the oid from the first run. You can rewrite your function and use EXECUTE for such statements (create and drop table). This might be helpful, but i'm not sure. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: - Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
[SQL] hi i am getting error...can u solve this
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 111 2004-02-02 234575E 4000 300 333 111 2004-09-02 This is the table it contains some sample data.. but I want to see difference between Thanks Regards Penchal reddy | Software Engineer Infinite Computer Solutions | Exciting TimesInfinite Possibilities... SEI-CMMI level 5 | ISO 9001:2000 IT SERVICES | BPO Telecom | Finance | Healthcare | Manufacturing | Energy Utilities | Retail Distribution | Government Tel +91-80-5193-(Ext:503)| Fax +91-80-51930009 | Cell No +91-9980012376|www.infics.com Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this mail from your records. Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records.
Re: [SQL] hi i am getting error...can u solve this
On Thu, Nov 02, 2006 at 06:19:45PM +0530, Penchalaiah P. wrote: This is the table it contains some sample data.. but I want to see difference between Between what? A -- Andrew Sullivan | [EMAIL PROTECTED] The year's penultimate month is not in truth a good way of saying November. --H.W. Fowler ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [SQL] hi i am getting error...can u solve this
What difference do you want to see? . Looks like your email got truncated. Please resend. There is not enough information to determine what is wanted. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Penchalaiah P. Sent: Thursday, November 02, 2006 4:50 AM To: pgsql-sql@postgresql.org Subject: [SQL] hi i am getting error...can u solve this 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 111 2004-02-02 234575E 4000 300 333 111 2004-09-02 This is the table it contains some sample data.. but I want to see difference between Thanks Regards Penchal reddy | Software Engineer Infinite Computer Solutions | Exciting TimesInfinite Possibilities... SEI-CMMI level 5 | ISO 9001:2000 IT SERVICES | BPO Telecom | Finance | Healthcare | Manufacturing | Energy Utilities | Retail Distribution | Government Tel +91-80-5193-(Ext:503)| Fax +91-80-51930009 | Cell No +91-9980012376|www.infics.com Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this mail from your records. Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records.
Re: [SQL] hi i want help on levels
Search the archives for hierarchical query. -- Jim Nasby[EMAIL PROTECTED] EnterpriseDB http://enterprisedb.com 512.569.9461 (cell) ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
[SQL] hi i want help on levels
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 Activity Role 2 5 Allowance 1 6 Bank 1 7 Code Head 1 8 Corps 1 9 DSOP 1 10 Entitlements 1 These r the values to that table I want like this tell me the query for this Administration - Manage Actvities - Create Activity Update Activity Delete Activity Admin 1 Activity_id activity_name parent_id _ 1 Admin null 2 ` Manage activities 1 3 Create Activity 2 4 Update Activity 2 5 Admin1 null 6 Delete Activity 2 Thanks Regards Penchal reddy | Software Engineer Infinite Computer Solutions | Exciting TimesInfinite Possibilities... SEI-CMMI level 5 | ISO 9001:2000 IT SERVICES | BPO Telecom | Finance | Healthcare | Manufacturing | Energy Utilities | Retail Distribution | Government Tel +91-80-5193-(Ext:503)| Fax +91-80-51930009 | Cell No +91-9980012376|www.infics.com Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this mail from your records. Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records.
Re: [SQL] hi i am gettin error when i am deleting a function from my pgadmin
On 9/11/06, Penchalaiah P. [EMAIL PROTECTED] wrote: 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 not exist… May I know the reason y its not deleting….What schema is the function in? Perhaps you need to specify the schema name in your drop statement. It helps if you supply the exact command you are typing in.== Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com http://codeelixir.com==
[SQL] hi i am gettin error when i am deleting a function from my pgadmin
Hi good morning to all. I created some functions in my pgadmin when I am deleting those functions from that pgadmin its giving errori.e An ERROR has occurred ERROR:function function_name1(character varying, character varying, character varying, date, character varying) does not exist May I know the reason y its not deleting. Thanks Regards Penchal reddy | Software Engineer Infinite Computer Solutions | Exciting TimesInfinite Possibilities... SEI-CMMI level 5 | ISO 9001:2000 IT SERVICES | BPO Telecom | Finance | Healthcare | Manufacturing | Energy Utilities | Retail Distribution | Government Tel +91-80-5193-(Ext:503)| Fax +91-80-51930009 | Cell No +91-9980012376|www.infics.com Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this mail from your records. Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records.
Fwd: [SQL] hi i am gettin error when i am deleting a function from my pgadmin
On 9/11/06, Penchalaiah P. [EMAIL PROTECTED] wrote: 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 not exist… May I know the reason y its not deleting….What schema is the function in? Perhaps you need to specify the schema name in your drop statement. It helps if you supply the exact command you are typing in.== Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com http://codeelixir.com==
Re: [SQL] hi i am gettin error when i am deleting a function from
Can you give us the actual delete command you are issuing? You need to specify the types of the function arguments when deleting functions, for example: DELETE FUNCTION my_sum (int, int); etc. Cheers, Bob Edwards. Penchalaiah P. wrote: 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 not exist… May I know the reason y its not deleting…. *ThanksRegards* *Penchal reddy **|** Software Engineer * *Infinite Computer Solutions **|** Exciting Times…Infinite Possibilities... * *SEI-CMMI level 5 **| **ISO 9001:2000* *IT SERVICES **|** BPO * *Telecom **|** **Finance **|** **Healthcare **| **Manufacturing **|** **Energy Utilities **|** **Retail Distribution **|** **Government* *Tel +91-80-5193-(Ext:503)**|** Fax +91-80-51930009 **|** Cell No +91-9980012376**|**www.infics.com** * *Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at** [EMAIL PROTECTED] _**and delete this mail from your records.* Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records. ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [SQL] hi let me know the solution to this question
On 7/18/06, Michael Fuhr [EMAIL PROTECTED] wrote: On Tue, Jul 18, 2006 at 10:46:29AM +0530, Penchalaiah P. wrote: 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 theresult of execution if possible please send me the sample code...Depending on what you mean by successfully executed, see Obtaining the Result Status or Trapping Errors in the PL/pgSQL documentation(error trapping is available in 8.0 and later). http://www.postgresql.org/docs/8.1/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS http://www.postgresql.org/docs/8.1/interactive/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPINGOK, this question got me wondering: is there a way to determine, in a function/stored procedure, the number of rows that were inserted/updated/deleted? For example, the following does NOT work but shows what I am trying to achieve:CREATE OR REPLACE FUNCTION public.test_fn () RETURNS VOID AS'DECLARE mycount INTEGER; BEGIN -- This assignment will not work be I want something like it -- so I can count the number of records updated. mycount := EXECUTE ''update mytable '' || ''mycolumn = 1 '' || ''WHERE '' || '' mycolumn = 2 '' ; RAISE NOTICE ''count = %'', mycount; RETURN;END;'LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER; I could not find any documentation about getting the count of updates but when you run the update by itself, PostgreSQL reports the number of records updated so I have to believe the information is available somewhere. Thanks,Aaron== Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com ==
Re: [SQL] hi let me know the solution to this question
Aaron Bono wrote: On 7/18/06, *Michael Fuhr* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: snip http://www.postgresql.org/docs/8.1/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS snip OK, this question got me wondering: is there a way to determine, in a function/stored procedure, the number of rows that were inserted/updated/deleted? snip I could not find any documentation about getting the count of updates but when you run the update by itself, PostgreSQL reports the number of records updated so I have to believe the information is available somewhere. Thanks, Aaron Look for the section entitled 36.6.6. Obtaining the Result Status on the link that Michael Fuhr supplied (above). Is that what you are looking for? ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [SQL] hi let me know the solution to this question
On 7/18/06, Bricklen Anderson [EMAIL PROTECTED] wrote: Aaron Bono wrote: On 7/18/06, *Michael Fuhr* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:snip http://www.postgresql.org/docs/8.1/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICSsnip OK, this question got me wondering: is there a way to determine, in a function/stored procedure, the number of rows that were inserted/updated/deleted?snip I could not find any documentation about getting the count of updates but when you run the update by itself, PostgreSQL reports the number of records updated so I have to believe the information is available somewhere. Thanks, AaronLook for the section entitled 36.6.6. Obtaining the Result Status onthe link that Michael Fuhr supplied (above). Is that what you are looking for?Ah yes, I missed the part on ROW_COUNT . That should do it.== Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com==
[SQL] hi let me know the solution to this question
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 sample code Thanks Regards Penchal reddy | Software Engineer Infinite Computer Solutions | Exciting TimesInfinite Possibilities... SEI-CMMI level 5 | ISO 9001:2000 IT SERVICES | BPO Telecom | Finance | Healthcare | Manufacturing | Energy Utilities | Retail Distribution | Government Tel +91-80-5193-(Ext:503)| Fax +91-80-51930009 | Cell No +91-9980012376|www.infics.com Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this mail from your records. Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records.
Re: [SQL] hi let me know the solution to this question
On Tue, Jul 18, 2006 at 10:46:29AM +0530, Penchalaiah P. wrote: 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 sample code... Depending on what you mean by successfully executed, see Obtaining the Result Status or Trapping Errors in the PL/pgSQL documentation (error trapping is available in 8.0 and later). http://www.postgresql.org/docs/8.1/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS http://www.postgresql.org/docs/8.1/interactive/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING -- Michael Fuhr ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
[SQL] hi i need to connect database from my system to another system
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 description Thanks Regards Penchal reddy | Software Engineer Infinite Computer Solutions | Exciting TimesInfinite Possibilities... SEI-CMMI level 5 | ISO 9001:2000 IT SERVICES | BPO Telecom | Finance | Healthcare | Manufacturing | Energy Utilities | Retail Distribution | Government Tel +91-80-5193-(Ext:503)| Fax +91-80-51930009 | Cell No +91-9980012376|www.infics.com Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this mail from your records. Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records.
Re: [SQL] hi i need to connect database from my system to another system
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 description You need to start the postgresql server with the -i option to allow TCP/IP connections. Then you need to configure your pg_hba.conf file to set the permissions about which users can connect to which databases. Notice the pg_ctl section for starting postgresql. http://www.postgresql.org/docs/8.1/interactive/app-pg-ctl.html Notice the -o options section that can be set. (in this case you want -i) http://www.postgresql.org/docs/8.1/interactive/app-postmaster.html Finally notice, the section on the pg_hba.conf file. http://www.postgresql.org/docs/8.1/interactive/client-authentication.html#AUTH-PG-HBA-CONF Also, secure shell also works well when connecting from another system. Regards, Richard Broersma Jr. ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
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 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 description You need to start the postgresql server with the -i option to allow TCP/IP connections. Then you need to configure your pg_hba.conf file to set the permissions about which users can connect to which databases. Notice the pg_ctl section for starting postgresql. http://www.postgresql.org/docs/8.1/interactive/app-pg-ctl.html Notice the -o options section that can be set. (in this case you want -i) http://www.postgresql.org/docs/8.1/interactive/app-postmaster.html Finally notice, the section on the pg_hba.conf file. http://www.postgresql.org/docs/8.1/interactive/client-authentication.htm l#AUTH-PG-HBA-CONF Also, secure shell also works well when connecting from another system. Don't forget to include the pgsql-sql list in your reply's. :-) The individuals on this list have varying degree of experience and knowledge of postgresql. So if you only respond to me, you would be limiting yourself to my meager experience and knowledge. ;-) To start off with, it would be helpful to know which OS version of PostgreSQL you are using. The windows versions is pre-configured to start with the -i option for allowing TCP/IP connections. Secondly, how are you trying to connect to your postgresql server from another system? What error messages are you getting. Regards, Richard Broersma Jr. ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [SQL] hi i need to connect database from my system to another
Hi I am using windows xp operating system... I want to know how to connect remote postgresql from my system.. I need brief description from beginning.. Now I am using pg_HBF conf file to connect remote postgresql in that I am giving host name , ip-address,mask and trust... but it is showing error like Could not connect to server: connection refused(0x274d\10061) Is the server running on host 127.0.0.1 and accepting TCP\IP connection on port 5432 ? Regards penchal -Original Message- From: Richard Broersma Jr [mailto:[EMAIL PROTECTED] Sent: Monday, July 03, 2006 5:57 PM To: 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 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 description You need to start the postgresql server with the -i option to allow TCP/IP connections. Then you need to configure your pg_hba.conf file to set the permissions about which users can connect to which databases. Notice the pg_ctl section for starting postgresql. http://www.postgresql.org/docs/8.1/interactive/app-pg-ctl.html Notice the -o options section that can be set. (in this case you want -i) http://www.postgresql.org/docs/8.1/interactive/app-postmaster.html Finally notice, the section on the pg_hba.conf file. http://www.postgresql.org/docs/8.1/interactive/client-authentication.htm l#AUTH-PG-HBA-CONF Also, secure shell also works well when connecting from another system. Don't forget to include the pgsql-sql list in your reply's. :-) The individuals on this list have varying degree of experience and knowledge of postgresql. So if you only respond to me, you would be limiting yourself to my meager experience and knowledge. ;-) To start off with, it would be helpful to know which OS version of PostgreSQL you are using. The windows versions is pre-configured to start with the -i option for allowing TCP/IP connections. Secondly, how are you trying to connect to your postgresql server from another system? What error messages are you getting. Regards, Richard Broersma Jr. Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this email from your records. ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [SQL] hi i need to connect database from my system to another
I am using windows xp operating system... I want to know how to connect remote postgresql from my system.. I need brief description from beginning.. Now I am using pg_HBF conf file to connect remote postgresql in that I am giving host name , ip-address,mask and trust... but it is showing error like Could not connect to server: connection refused(0x274d\10061) Is the server running on host 127.0.0.1 and accepting TCP\IP connection on port 5432 ? Actually, your PostgreSQL server is running on the IP address that is assigned to that computer. The 127.0.0.1 in the pg_hba.conf file is the initial accepted client IP address that your postgresql server will accepted connections from. 127.0.0.1 is basically means localhost. So, your pg_hba.conf file is initial configured to only allow client connections from itself. So in this case, if you want to connect from an IP address from a different computer, you will need to specify that ip address in your pg_hba.conf file as well as the permissions. But just to get started, you could try editing a line in your pg_hba.conf to this: #hostall all 127.0.0.1/32md5 hostall allyour client ip address goes here/24 trust hostall all 127.0.0.1/32trust To understand all of this, you will need to read the introduction in your pg_hba.conf file. Also, keep in mind that the above change is basically an open door to everything in your DB server. So after you've had a change to get familiar with everything, you will want to tighten up on how,what, and how access is granted to you system. Last but not least, you will need to restart your postgresql service so these changes will take effect. This should get you connected. Regards, Richard Broersma Jr. ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
[SQL] hi i need to encrypt one field in a table
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 Computer Solutions | Exciting TimesInfinite Possibilities... SEI-CMMI level 5 | ISO 9001:2000 IT SERVICES | BPO Telecom | Finance | Healthcare | Manufacturing | Energy Utilities | Retail Distribution | Government Tel +91-80-5193-(Ext:503)| Fax +91-80-51930009 | Cell No +91-9980012376|www.infics.com Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this mail from your records.
Re: [SQL] hi i need to encrypt one field in a table
For SQL-passwords usually use hashes... 2006/5/30, Penchalaiah P. [EMAIL PROTECTED]: Hello, I want to create a table with an encrypted field for a password entry, so that you can see only . And can I encrypt fields which datatype is an integer or a timestamp? Hi pls let me know this……….. ThanksRegards Penchal reddy | Software Engineer Infinite Computer Solutions | Exciting Times…Infinite Possibilities... SEI-CMMI level 5 | ISO 9001:2000 IT SERVICES | BPO Telecom | Finance | Healthcare | Manufacturing | Energy Utilities | Retail Distribution | Government Tel +91-80-5193-(Ext:503)| Fax +91-80-51930009 | Cell No +91-9980012376|www.infics.com Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this mail from your records. ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [SQL] hi i need to encrypt one field in a table
On Tue, 2006-05-30 at 15:42 +0530, Penchalaiah P. wrote: Hello, I want to create a table with an encrypted field for a password entry, so that you can see only . And can I encrypt fields which datatype is an integer or a timestamp? No can do. I mean, you can't do something like that. You can either give (actually, revoke) that particular user/role permisions to read the table with the passwords, or you could store hashed values to the database. Later is prefered, I'd say. You could use md5() function to create hashes, store those in the database, and when checking for the credentials compare the hases. You'd compare user input flushed trough md5() function with the hash you have in the database. That way you don't know what user passwords are, and you could only set a new password if user forgets his/hers password. You don't need encrypted passwords. Mario -- Mario Splivalo Mob-Art [EMAIL PROTECTED] I can do it quick, I can do it cheap, I can do it well. Pick any two. ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[SQL] hi still i am unable to provide encryption to a particular table....
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.. Thanks Regards Penchal reddy | Software Engineer Infinite Computer Solutions | Exciting TimesInfinite Possibilities... SEI-CMMI level 5 | ISO 9001:2000 IT SERVICES | BPO Telecom | Finance | Healthcare | Manufacturing | Energy Utilities | Retail Distribution | Government Tel +91-80-5193-(Ext:503)| Fax +91-80-51930009 | Cell No +91-9980012376|www.infics.com Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this mail from your records.
Re: [SQL] hi still i am unable to provide encryption to a particular table....
On Mon, May 29, 2006 at 03:13:59PM +0530, Penchalaiah P. wrote: 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 Is this one-way encryption (i.e. you want a hash?) You can use built-in md5 for that. If you want something more, use the pgcrypto contrib/ items. A -- Andrew Sullivan | [EMAIL PROTECTED] The year's penultimate month is not in truth a good way of saying November. --H.W. Fowler ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
[SQL] hi can u give solution to this query
Hi sir If u dont 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, Sanction_No varchar(20) NOT NULL, Sanction_Date date NOT NULL, Station_From varchar(20) NOT NULL, Station_To varchar(20) NOT NULL, Amt_Claimed int4, Amt_Admitted int4, Dak_Id varchar(20) NOT NULL, Refund_Dak_Id int4 NOT NULL, T-Wing_Allowance_Id varchar(10) NOT NULL, CONSTRAINT ADV_pkey PRIMARY KEY (T-Section_Id) ) WITHOUT OIDS; ALTER TABLE ADV OWNER TO postgres; 2) this table doesnt contain primary key but I cant insert values from data edit CREATE TABLE ADV_LTC ( T-Section_Id varchar(20) NOT NULL, Ltc_Block_Year date NOT NULL, Ltc_Type varchar(10) NOT NULL, Leave_Period_From date NOT NULL, Leave_Period_To date NOT NULL, Date_Journey date NOT NULL, Travelling varchar(10) NOT NULL, No_Child int4, No_Adult int4, Child_Fare int4, Adult_Fare int4, Journey_Fare int4, Amt_Clm int4 NOT NULL, Amt_Adm int4, Remarks varchar(40) ) WITHOUT OIDS; ALTER TABLE ADV_LTC OWNER TO postgres; Can u check it y I am unable to insert values to 2nd table. Thanks Regards Penchal reddy | Software Engineer Infinite Computer Solutions | Exciting TimesInfinite Possibilities... SEI-CMMI level 5 | ISO 9001:2000 IT SERVICES | BPO Telecom | Finance | Healthcare | Manufacturing | Energy Utilities | Retail Distribution | Government Tel +91-80-5193-(Ext:503)| Fax +91-80-51930009 | Cell No +91-9980012376|www.infics.com Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this mail from your records.
Re: [SQL] hi can u give solution to this query
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Penchalaiah P.Sent: 23 May 2006 13:41To: pgsql-sql@postgresql.orgSubject: [SQL] hi can u give solution to this query Hi sir If u dont 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, "Sanction_No" varchar(20) NOT NULL, "Sanction_Date" date NOT NULL, "Station_From" varchar(20) NOT NULL, "Station_To" varchar(20) NOT NULL, "Amt_Claimed" int4, "Amt_Admitted" int4, "Dak_Id" varchar(20) NOT NULL, "Refund_Dak_Id" int4 NOT NULL, "T-Wing_Allowance_Id" varchar(10) NOT NULL, CONSTRAINT "ADV_pkey" PRIMARY KEY ("T-Section_Id") ) WITHOUT OIDS; ALTER TABLE "ADV" OWNER TO postgres; 2) this table doesnt contain primary key but I cant insert values from data edit CREATE TABLE "ADV_LTC" ( "T-Section_Id" varchar(20) NOT NULL, "Ltc_Block_Year" date NOT NULL, "Ltc_Type" varchar(10) NOT NULL, "Leave_Period_From" date NOT NULL, "Leave_Period_To" date NOT NULL, "Date_Journey" date NOT NULL, "Travelling" varchar(10) NOT NULL, "No_Child" int4, "No_Adult" int4, "Child_Fare" int4, "Adult_Fare" int4, "Journey_Fare" int4, "Amt_Clm" int4 NOT NULL, "Amt_Adm" int4, "Remarks" varchar(40) ) WITHOUT OIDS; ALTER TABLE "ADV_LTC" OWNER TO postgres; Can u check it y I am unable to insert values to 2nd table. You have answered your own question. pgAdmin won't allow you to edit a table without either OIDs or a Primary Key because it has no way to identify a row (which many would say is a broken design). Regards, Dave.
Re: [SQL] hi all......................!!
AKHILESH GUPTA wrote: hello everybody i am new to this mailing list. this is my first mail to this group. i jussst want to confirm that whether is it possible to update a view or not?? There is no automatic updating of views at present. You can write your own RULES though to do updates - see the manuals for details. -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [SQL] hi all......................!!
Hi, Akilesh, AKHILESH GUPTA wrote: i am new to this mailing list. this is my first mail to this group. i jussst want to confirm that whether is it possible to update a view or not?? i think you all help me in solving my queries in future...!! Do you think about issuing UPDATE commands on a view, or do you think about updating the view definition itsself? The former is possible if you add the appropriate 'ON UPDATE DO INSTEAD' Rules to the view, see http://www.postgresql.org/docs/8.1/static/rules.html and http://www.postgresql.org/docs/8.1/static/sql-createrule.html The latter is easily possible if the updated view definition has equal column definitions, just use CREATE OR UPDATE VIEW ... instead of CREATE VIEW ... to update the view. If your column definitions change, then you'll have to DROP the view before reCREATEing it, maybe it's best to encapsulate this inside a transaction or use a scheduled downtime. Btw, it seems that your '.'-key is broken and chatters. :-) HTH, Markus -- Markus Schaber | Logical TrackingTracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
[SQL] hi all......................!!
hello everybody i am new to this mailing list. this is my first mail to this group. i jussst want to confirm that whether is it possible to update a view or not?? i think you all help me in solving my queries in future...!! -- Thanks Regards, Akhilesh DAV Institute of Management Faridabad(Haryana) GSM:-(+919891606064) (+911744293789) FAILURES CAN BE FORGIVEN BUT AIMING LOW IS A CRIME
Re: [SQL] Hi
* vasundhar [EMAIL PROTECTED] [2004-11-06 22:45:36 -0800]: Hi I am using REL on which only 7.3.2 PG only available and I want to upgrade it to the latest and also integrate it with Perl but my system is also not supporting the DBI any suggestions please My suggestion would be to determine why your system won't support DBI and fix it. -- Steven Klassen - Lead Programmer Command Prompt, Inc. - http://www.commandprompt.com/ PostgreSQL Replication Support Services, (503) 667-4564 ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
[SQL] Hi
Hi I am using REL on which only 7.3.2 PG only available and I want to upgrade it to the latest and also integrate it with Perl but my system is also not supporting the DBI any suggestions please ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [SQL] hi sir urgent..required a Query
Rajeev, I am attaching a document with this file showing two table.. table_for_ you.doc It consist of two table VALUE AND VALUE_TYPE.. when i have value_type_id=1 i must get Value_varchar column value when i have value_type_id=2 i must get Value_int column value Please send a SQL query for this... Please re-post this with your table design in the body of your e-mail, and NO doc attachment. -- Josh Berkus Aglio Database Solutions San Francisco ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[SQL] hi sir urgent..required a Query
Hi Sir, I am attaching a document with this file showing two table.. table_for_ you.doc It consist of two table VALUE AND VALUE_TYPE.. when i have value_type_id=1 i must get Value_varchar column value when i have value_type_id=2 i must get Value_int column value Please send a SQL query for this... I want to retrive Thanks and Regards Rajeev Chaudhary HCL Technologies Ltd, A-11, Sector 16, Noida, (U.P.) India Email : [EMAIL PROTECTED] Phone: +91 (120) 2510701 extn :3321 Disclaimer: This message and any attachment(s) contained here are information that is confidential,proprietary to HCL Technologies and its customers, privileged or otherwise protected by law.The information is solely intended for the individual or the entity it is addressed to. If you are not the intended recipient of this message, you are not authorized to read, forward, print,retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer. table_for_ you.doc Description: MS-Word document ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
[SQL] hi
i'd like to tranfer sql schema from MS serverExample:***1*if exists (select * from sysobjects where id = object_id(N'[admin].[test]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table [admin].[test] go***2*CREATE TABLE [admin].[test] ([test_name] [char] (50) NOT NULL ,[test_value] [int] NOT NULL )i can only realize part 2 and must need the fuction that can check data table. create table test(test_name char (50) not null,test_value int not null)thanks for any advice!!Do You Yahoo!? ÑÅ»¢ÓéÀÖÐÂÏʵ½µ×,µç×ÓÖܱ¨¿ìÀÖµ½¼Ò!
[SQL] HI! Problems with cursors into triggers
HELLO! I'm making one trigger (plpgsql) and in the function i use CURSOR for to bring an elements and to take them to a variable but no me it does not work, WHY? The script is: DROP TRIGGER miTrig on otro; DROP FUNCTION miFunc(); DROP TABLE otro; DROP TABLE cual; CREATE TABLE otro ( cuentainteger; ); CREATE TABLE cual ( cuenta1 integer; cuenta2 integer; ); CREATE FUNCTION miFunc () RETURNS OPAQUE AS ' DECLARE Cuenta_t INT4; BEGIN begin work; declare c_Cuenta CURSOR FOR SELECT * FROM otro; FETCH forward 1 in c_Cuenta INTO :Cuenta_t; CLOSE c_Cuenta; commit; INSERT INTO cual VALUES (Cuenta_t,NEW.cuenta); RETURN NEW; END; ' LANGUAGE 'plpgsql'; CREATE TRIGGER miTrig AFTER INSERT ON otro FOR EACH ROW EXECUTE PROCEDURE miFunc(); Help me please!!! Thanks Mauricio Marín Colombia begin:vcard n:Marín Restrepo;Andrés Mauricio x-mozilla-html:FALSE org:ITEC TELECOM;Research Departament adr:;; version:2.1 email;internet:[EMAIL PROTECTED] title:System Enginner fn:Andrés Mauricio Marín Restrepo end:vcard
Re: [SQL] HI! Problems with cursors into triggers
On Wed, 28 Jun 2000, Andrés Mauricio Marín Restrepo wrote: HELLO! I'm making one trigger (plpgsql) and in the function i use CURSOR for to bring an elements and to take them to a variable but no me it does not work, WHY? The script is: DROP TRIGGER miTrig on otro; DROP FUNCTION miFunc(); DROP TABLE otro; DROP TABLE cual; CREATE TABLE otro ( cuentainteger; ); CREATE TABLE cual ( cuenta1 integer; cuenta2 integer; ); CREATE FUNCTION miFunc () RETURNS OPAQUE AS ' DECLARE Cuenta_t INT4; BEGIN begin work; Can't have nested transactions. Can't use BEGIN/COMMIT within a trigger. -- Robert B. Easter