Re: [SQL] to_char with time

2006-06-13 Thread Phillip Smith
Try using current_timestamp instead of current_time. This works for me in a SELECT: to_char(current_timestamp + '1 MONTH AGO', 'YYMM') as ‘reference’   Cheers, -p   -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of chester c young Sent: Wednesda

Re: [SQL] to_char with time

2006-06-13 Thread Aaron Bono
Try select to_char(now(),'HH24:MI'); -Aaron On 6/13/06, chester c young <[EMAIL PROTECTED]> wrote: this does not work: select to_char(current_time,'HH24:MI') what am I missing? is it possible to format a time column in a select? thanks, stumped, aka, chester ---(end

[SQL] to_char with time

2006-06-13 Thread chester c young
this does not work: select to_char(current_time,'HH24:MI')what am I missing?  is it possible to format a time column in a select?thanks,stumped, aka, chester __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.y

Re: [SQL] Good examples of calling slony stored procedures

2006-06-13 Thread Tom Lane
"Mark Adan" <[EMAIL PROTECTED]> writes: > I was wondering if where can I find some examples of calling the slony > stored procedures instead of using slonik? I want to be able to for > example add a table into slony. Thanks This is likely the wrong bunch to ask --- there's a slony project mailin

Re: [SQL] Error with "limit" clause

2006-06-13 Thread Rommel the iCeMAn
> Could VB be rewriting the query behind your back? Turn on log_statement logging, and look in the postmaster log to see what's really being sent to the > backend ... Exactly! This was an oversight on my part tho. I had used the following command: MyDataReader = MyCommand.ExecuteReader(CommandB

[SQL] Good examples of calling slony stored procedures

2006-06-13 Thread Mark Adan
Hi I was wondering if where can I find some examples of calling the slony stored procedures instead of using slonik? I want to be able to for example add a table into slony. Thanks Mark Adan ---(end of broadcast)--- TIP 1: if posting/reading thro

Re: [SQL] Error with "limit" clause

2006-06-13 Thread Tom Lane
"Rommel the iCeMAn" <[EMAIL PROTECTED]> writes: > I've been trying the following query from VB.NET: select * from my_table > order by column1 limit 1. This query works flawlessly when I use the > pgAdminIII query tool, but when I run this query from VB.NET, I get the > following error: syntax error

Re: [SQL] COPY to table with array columns (Longish)

2006-06-13 Thread Phillip Smith
No, it was me that didn't understand!! But I do now - quite simple really! Cheers, -p -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aaron Bono Sent: Wednesday, 14 June 2006 10:41 AM To: [EMAIL PROTECTED] Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] C

Re: [SQL] COPY to table with array columns (Longish)

2006-06-13 Thread Aaron Bono
I guess I still don't understand... If you take the approach operationsengineer1 and I suggested, you should only need 3 or 4 tables regardless of the number of SYS file records. Good luck with your implementation. -Aaron On 6/13/06, Phillip Smith <[EMAIL PROTECTED]> wrote: Thanks Aaron - The

Re: [SQL] COPY to table with array columns (Longish)

2006-06-13 Thread Phillip Smith
Thanks Aaron - There are currently 8175 records in my SYS file - I might need to go with this approach but be selective about which items I export so I don't end up with 8000 tables related to SYS! There's probably a lot of in there that doesn't actually need to be exported. Thanks again, -p

[SQL] Error with "limit" clause

2006-06-13 Thread Rommel the iCeMAn
Hi List, I've been trying the following query from VB.NET: select * from my_table order by column1 limit 1. This query works flawlessly when I use the pgAdminIII query tool, but when I run this query from VB.NET, I get the following error: syntax error at or near "limit". Any ideas as to the caus

Re: [SQL] Efficient Searching of Large Text Fields

2006-06-13 Thread Aaron Bono
I will look that tsearch (at . It appears their 8.1.x version is still in development and I use PostgreSQL 8.1.3 but it is worth trying - I'm not in a hurry for that feature anyway. I also looked at PHPBB a little - it appears their database stores words but the code is so difficult to dig throu

Re: [SQL] Efficient Searching of Large Text Fields

2006-06-13 Thread PFC
2. What functions or libraries are available to make such searching easy to implement well? the tsearch2 module does that, and has a substantial advantage over a solution you might reimplement : it's already done (and it works). Try it... ---(end of broadcast)-

Re: [SQL] Efficient Searching of Large Text Fields

2006-06-13 Thread Rod Taylor
On Tue, 2006-06-13 at 15:30 -0500, Aaron Bono wrote: > In another post on a different topic, Rod Taylor said the following: > > "A\tcat in the\nhat" might be stored as ARRAY['A', 'cat', 'in', 'the', > 'hat']. > > This got me thinking. I have a discussion forum for gamers and want > to provide

[SQL] Efficient Searching of Large Text Fields

2006-06-13 Thread Aaron Bono
In another post on a different topic, Rod Taylor said the following: "A\tcat in the\nhat" might be stored as ARRAY['A', 'cat', 'in', 'the', 'hat']. This got me thinking. I have a discussion forum for gamers and want to provide searching capabilities so the user can type in a phrase like "magi

Re: [SQL] COPY to table with array columns (Longish)

2006-06-13 Thread operationsengineer1
> > Not quite... ZKCOST and ZPRECMPL are two > completely > > different things. They > > have no relation except they're both stored in the > > SYS table in D3. > > > > If we put it in a tree: > > SYS > > | > > +- ZKCOST > > | \- > > | > > +- ZPRECMPL > > |

Re: [SQL] COPY to table with array columns (Longish)

2006-06-13 Thread operationsengineer1
> Not quite... ZKCOST and ZPRECMPL are two completely > different things. They > have no relation except they're both stored in the > SYS table in D3. > > If we put it in a tree: > SYS >| >+- ZKCOST >| \- >| >+- ZPRECMPL >| +- >

Re: [SQL] COPY to table with array columns (Longish)

2006-06-13 Thread Aaron Bono
So how about creating a sys table too: SYS sys_id ZKCOST sys_id, zkcost_id, zkcost_value and ZPRECMPL sys_id, zprecmpl_id, zprecmpl_value This gives you the flexibility to expand to as many "columns" for ZPRECMPL as you want. The bottom line is, I think it would be much more ef

Re: [SQL] Finding multiple events of the same kind

2006-06-13 Thread Leif B. Kristensen
My question and your answer have now become part of a blog entry at my site: . Thank you again. -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.org/ | Cruising with Gentoo/KDE ---(end of broadcast)--