[SQL] Cant execute the query

2010-07-08 Thread Srikanth Kata
When i am executing this query, i am facing the select s.*,a.actid,a.phone,d.domid,d.domname,d.domno,a.actno,a.actname,p.descr as svcdescr from vwsubsmin s inner join packages p on s.svcno=p.pkgno inner join account a on a.actno=s.actno inner join ssgdom d on a.domno=d.domno in

Re: [SQL] SQL to Check whether "AN HOUR PERIOD" is between start and end timestamps

2009-03-18 Thread Srikanth
estamps To: "Srikanth" Cc: pgsql-sql@postgresql.org Date: Tuesday, 17 March, 2009, 8:36 PM Srikanth wrote: > Dear all, > > I have a table that records User Login Sessions with two timestamp fields.. > Basically Start of Session and End of a Session (start_ts and end_ts). Eac

[SQL] SQL to Check whether "AN HOUR PERIOD" is between start and end timestamps

2009-03-17 Thread Srikanth
Dear all, I have a table that records User Login Sessions with two timestamp fields. Basically Start of Session and End of a Session (start_ts and end_ts). Each row in the table identifies a session which a customer has used.  Data from the table (session): -  custo

[SQL] how to write procedures

2002-07-04 Thread srikanth
Hi, I am using postgre sql server on linux server but for my database I am using storedprocedures which i need to create , but there are no commands to create procedures it says it does not support is there any way to work with stored procedures in postgre sql server. thanks, srikanth

[SQL] How to store a linked list in a RDBMS

2001-06-12 Thread Srikanth Rao
I have a linked list representing a tree. How do I store it in the database? Does PGSQL give us any special procedures to deal with such structures? __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://pers

[SQL] Restricting the number of decimal digits

2001-05-16 Thread Srikanth Rao
I have a query that calculates the average of difference between timestamps. I want the output to be upto 1 decimal point. How do I do it? __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ --

[SQL] Counting rows in a table

2001-05-14 Thread Srikanth Rao
MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii I have a query as follows: SELECT date(c.timestart) as ondate, c.userid, u.username, count(c.callinfoid) as numCalls, sum(b.broquant) as numBroc, sum(b.broquant)/count(c.callinfoid) as BrochuresaCall

[SQL] Memory exhaustion

2001-04-04 Thread Srikanth Rao
marketingbyoffice is a view. I start the postmaster, then issue the following query in psql console. It goes to sleep forever:-) Why? The log is as follows: --log - 010404.13:49:14.612 [1352] StartTransactionCommand 010404.13:49:14.612 [1352] query: SELECT * INTO TEMP TABLE marketi

[SQL] PIVOT of data

2001-03-14 Thread Srikanth Rao
Hi, I have a table like this: location| numbrochures | marketing ---+--+--- 101 Asheville, NC |4 | NEWS 101 Asheville, NC |1 | TV 101 Asheville, NC |3 | RADIO 101 Asheville, NC |