Re: [SQL] Cumulative result with increment

2011-02-08 Thread Shawn Tayler
Thanks Steve, That did the trick! I appreciate the help Shawn On Mon, 2011-02-07 at 14:13 -0800, Steve Crawford wrote: > On 02/07/2011 01:11 PM, Shawn Tayler wrote: > > Hello, > > > > I am struggling with what is probably a simple problem but I am coming > > up

[SQL] Cumulative result with increment

2011-02-07 Thread Shawn Tayler
. Its the rest that has me stumped. Any suggestions or direction? As always, your help is greatly appreciated. -- Sincerely, Shawn Tayler -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

[SQL] varchar value comparisons not working?

2009-04-24 Thread Shawn Tayler
match, at least 2 (there are more than shown). But instead I get this: count --- 0 (1 row) What am I doing wrong? -- Sincerely, Shawn Tayler Radio Network Administrator Washoe County Regional Communications System Telecommunications Division Technology Services Department

Re: Fwd: Re: [SQL] Creating a function with single quotes

2009-02-20 Thread Shawn Tayler
Ah.. Missed that one. Thank you Adrian! Shawn On Fri, 2009-02-20 at 06:27 -0800, Adrian Klaver wrote: > Actually you need both semicolons. One after the RETURN statement and > one after > the END statement > See below for full details: > http://www.postgresql.org/docs/

Re: [SQL] Creating a function with single quotes

2009-02-20 Thread Shawn Tayler
Hi Leif! Thank you to you and the group. Worked like a charm. The SQL language was the key Shawn On Fri, 2009-02-20 at 15:12 +0100, Leif B. Kristensen wrote: > You should place a semicolon at the end of the RETURN line, and > remove > the one after END, > > BTW, simp

Re: [SQL] Creating a function with single quotes

2009-02-20 Thread Shawn Tayler
# The error at or near END is curious. There must be something wrong in the line before it but I can't see it. Suggestions? In case it matters, the server is v8.2.11 compiled from source on Slackware 11.0 and the terminal is v8.3.6 running on Ubuntu v8.10. On Fri, 2009-02-20 at 08:1

[SQL] Creating a function with single quotes

2009-02-19 Thread Shawn Tayler
representation of an interval. create function csd_interval(integer) returns interval as 'BEGIN RETURN $1 * interval '1 msec' END;' LANGUAGE 'plpgsql'; it always fails at the '1 msec' point. Suggestions? -- Sincerely, Shawn Tayler Radio Network Administrat

Re: [SQL] Dropping Functions

2008-03-26 Thread Shawn
On Thursday 27 March 2008 00:13:26 Adrian Klaver wrote: > On Wednesday 26 March 2008 5:05 pm, Shawn wrote: > > Hi Guys, > > > > Just a quick question. Is there a known problem with dropping function > > in 8.2.6? I can make them but they can't be deleted. > &g

[SQL] Dropping Functions

2008-03-26 Thread Shawn
Hi Guys, Just a quick question. Is there a known problem with dropping function in 8.2.6? I can make them but they can't be deleted. Shawn -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: FW: Re: [SQL] Part 1 of several - Converting a varchar to an interval

2008-03-26 Thread Shawn
l on null input; Perfect! Great! Thank you! There are so many things about SQL I don't know Shawn -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: FW: Re: [SQL] Part 1 of several - Converting a varchar to an interval

2008-03-26 Thread Shawn
nput; ERROR: syntax error at or near "1" LINE 2: as 'select ($1 * interval '1 msec');' ^ obviously it doesn't like the extra single quotes around the 1 msec. Any suggestions for a work around? Shawn -- Sent v

Re: [SQL] Question 2 Interval and timestamptz

2008-03-26 Thread Shawn
Awesome Adrian! Thanks! Just what I needed. On Wednesday 26 March 2008 16:24:34 you wrote: > -- Original message -- > From: Shawn <[EMAIL PROTECTED]> > > > Hello! > > > > The second part of my question is: > > > &g

Re: [SQL] Part 1 of several - Converting a varchar to an interval

2008-03-26 Thread Shawn
On Wednesday 26 March 2008 16:16:57 you wrote: > select ('134987'::int/1000.00) * interval ' 1 second' ; >    ?column? > -- >  00:02:14.987 > (1 row) Thanks Adrian! Wow! Shawn -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) T

Re: [SQL] Export Access 97 to PostgreSQL

2008-03-26 Thread Shawn
o add the UTC to the field " sed 's/\t/ UTC\t/1'". Shawn -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

[SQL] Question 2 Interval and timestamptz

2008-03-26 Thread Shawn
, see previous post, in addition to the duration varchar field, also have a field called event_at_utc which is a timestamptz type. I need to calculate the end time of the event given the interval calculated from the duration (varchar) field. Any all all help is greatly appreciated. Shawn

[SQL] Part 1 of several - Converting a varchar to an interval

2008-03-26 Thread Shawn
as 134987 stored in a varchar into an interval? This will dovetail with my next question. Thanks for all the help both now and previous. Shawn -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql