Re: [ADMIN] [SQL] Question on pgpsql function

2007-04-08 Thread Adrian Klaver
On Sunday 08 April 2007 12:47 pm, Karthikeyan Sundaram wrote: > Hi Everybody, > >I am using Postgres 8.1.0 and I have a requirement. > > I have a table > > create table weekly_tbl (id int, week_flag bit(7) not null default > '111'); > > I want to create a function like this > > create fu

Re: [ADMIN] [SQL] question on passing parameter in sql query

2007-02-07 Thread Chad Wagner
On 2/7/07, Karthikeyan Sundaram <[EMAIL PROTECTED]> wrote: I don't want to compare with Oracle and postgres. But I have a situation. I am using psql command line tool supplied by postgres. In Oracle I can say select * from emp where emp_id = &1 Oracle will ask: Enter a value

Re: [ADMIN] [SQL] Question regarding multibyte.

2007-02-04 Thread Ivo Rossacher
Am Sonntag, 4. Februar 2007 22.34 schrieb Karthikeyan Sundaram: > Hi, > >I am new to postgres. I asked a question regarding multibyte display. > I got only one response. Which was correct and about complet when taking the amount of information given into account. So nobody else did see a ne

Re: [ADMIN] [SQL] Question regarding multibyte.

2007-02-04 Thread Karthikeyan Sundaram
Hi, I am new to postgres. I asked a question regarding multibyte display. I got only one response. Hence, I am re-iterating the question again to a larger audience. We are using 8.2 release of postgres. Recently we converted our database to multibyte on our dev machine. we want to test t

Re: [ADMIN] [SQL Question] Selecting distinct rows having field value pairs on semantics

2006-10-03 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Allan Kamau <[EMAIL PROTECTED]> writes: > Hi all, > I am looking for a way of selecting records from a > table comprising of pairing fields having unique > semantics, where the pair of values of lets say 'left' > and 'right' and another pair having values of 'right'

[ADMIN] [SQL Question] Selecting distinct rows having field value pairs on semantics

2006-10-03 Thread Allan Kamau
Hi all, I am looking for a way of selecting records from a table comprising of pairing fields having unique semantics, where the pair of values of lets say 'left' and 'right' and another pair having values of 'right' and 'left' is considered as duplicates as they have the same meaning. Below is m

Re: [ADMIN] SQL question

2003-03-21 Thread er
http://gborg.postgresql.org/project/psqlodbc/genpage.php?howto-vblo Mario Alberto Soto Cordones wrote: Hi, i need inser a picture in a table but i can´t. i work with visual basic 6.0 and postgres 7.3 but i can´t Thanks Mario ---(end of broadcast)--

Re: [ADMIN] sql question

2003-03-18 Thread Joe Conway
Jodi Kanter wrote: Can someone tell me how to create a query that will list values in a field across columns instead of listing them in row form. Can this be done in one sql query? Thanks Jodi Are you referring to a crosstab, i.e.: select * from cth; id | rowid |rowdt| attribut

Re: [ADMIN] SQL question

2002-02-01 Thread Tom Lane
"Brett W. McCoy" <[EMAIL PROTECTED]> writes: >> select field, length(field) from table where length(field) < 10; >> >> How many times is the length() function called for each row? Once or >> twice? > I would expect it to run both times. More specifically, the one in the select list will be eva

Re: [ADMIN] SQL question

2002-02-01 Thread Brett W. McCoy
On Fri, 25 Jan 2002, Bolt Thrower wrote: > In the query: > > select field, length(field) from table where length(field) < 10; > > How many times is the length() function called for each row? Once or > twice? I would expect it to run both times. I did a similar query with an explain: ex

Re: [ADMIN] SQL question

2002-02-01 Thread Stephan Szabo
On Fri, 25 Jan 2002, Bolt Thrower wrote: > In the query: > > select field, length(field) from table where length(field) < 10; > > How many times is the length() function called for each row? Once or > twice? Pretty sure it'll be twice. ---(end of broadcast)-

[ADMIN] SQL question

2002-02-01 Thread Bolt Thrower
In the query: select field, length(field) from table where length(field) < 10; How many times is the length() function called for each row? Once or twice? Thanks, -- Steve Chadsey <[EMAIL PROTECTED]> ---(end of broadcast)--- TIP 2: you

[ADMIN] SQL question

2002-01-28 Thread Bolt Thrower
In the query: select field, length(field) from table where length(field) < 10; How many times is the length() function called for each row? Once or twice? Thanks, -- Steve Chadsey <[EMAIL PROTECTED]> ---(end of broadcast)--- TIP 5: Have