[SQL] need help in building a query

2008-11-04 Thread Devilâ„¢ Dhuvader
hi, I need some help in creating a sql. the problem is as below. assume that: I am a store keeper and I have the list of customer(user_id) transactions in my order table. schema: Orders(order_id, user_id, amount_paid, create_timestamp) I want to give discount of 10% for the customer who made orde

[SQL] RE: [SQL] Display message to use r

2008-11-04 Thread Bart van Houdt
Hello Fernando, Thank you for the quick response. When setting the parameter, the output changed to: psql:d:/tmp/pg/migrate.sql:4: NOTICE: Joeho! write_line (1 row) Which looks a lot better already! And you have given me new hope and a new angle to look at :)

Re: [SQL] Display message to user

2008-11-04 Thread Fernando Hevia
Hi Bart, If you are using psql then you can get rid of those messages by entering on the psql prompt: \set verbose TERSE If you are using pgAdmin, sadly there is currently no way for this application to filter context messages. Regards, Fernando _ De: [EMAIL PROTECTED] [mailto:[E

[SQL] Display message to user

2008-11-04 Thread Bart van Houdt
Hi all, I am a Postgres-newbie and working on porting our code from Oracle to Postgres. Oracle has a nice package procedure (dbms_output.put_line) to display a message in SQL*Plus, which can display a message to the user. I use this a lot, to notify users of the progress being made during the