Re: [SQL] hi

2007-04-24 Thread Wilkinson, Jim
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

[SQL] Function to return a multiple colmn table or view

2007-04-20 Thread Wilkinson, Jim
I am new to psql , so please be patient ! Can someone please provide a small quick example of a a function that take 1 paramater and based on that parameter, returns a table or view ? Etc Note this is just a abstract of the functon, not a working function call !!! Create function viewtest(

[SQL] EXECUTE in a funtion to return a VIEW object ID

2007-04-10 Thread Wilkinson, Jim
Hi there, I have tried many ideas to get this working but no luck. Can some show me or explain what is happening EXAMPLE == I am trying to read to 2 text fields to combine them togther to form the name of a VIEW. example SELECT * FROM ( 'april'||'may') ; I have tried the EXECUTE i

Re: [SQL] Using a variable as a view name in a select

2007-04-03 Thread Wilkinson, Jim
PROTECTED] Sent: April 3, 2007 12:45 PM To: Wilkinson, Jim Cc: pgsql-sql@postgresql.org Subject: RE: [SQL] Using a variable as a view name in a select Jim So let's suppose you have a "master" table of incidents incident_no (serial) incident_date (timestamp) other fields My unders

[SQL] Using a variable as a view name in a select

2007-04-03 Thread Wilkinson, Jim
I have created a view, called april_may. I need to select this view by combineing to fields in the database to create the view name etc ... Create view as select * from table_X; I need to do something like this ... Select * from (select table.start_month||_||table.end_month); ==

[SQL] How too select different views using a IF/THEN/ELSE procedure ?

2007-03-28 Thread Wilkinson, Jim
Below is a select statement that select incidents by month. I need a function or a method to select differents views that will show the Month columns is a different order. Say Apr - Mar for a fiscal year. I need to do something like an if/then/else statement that selects the correct view to us

[SQL] Selecting different views from a Boolean expression

2007-03-26 Thread Wilkinson, Jim
Hi there, I have a web based reporting system that I am coding. I need to be able to view statistics by the calendar year or the fiscal year depending on what the user selects. My issue is how do I change y select statements to change the column output? Example IncidentJan

[SQL] unsubscribe

2007-02-08 Thread Wilkinson, Jim
unsubscribe