[SQL] SUSPENDED ACCOUNT

2005-05-31 Thread admin
Account Information Are Attached! ** ** WARNING: Panda Antivirus GateDefender has detected a virus in file attached to this e-mail message! The attachment has been automatically remo

[SQL] error: cast the timestam expression

2005-01-28 Thread friendVU admin
When I execute this: "insert into comments ( date_posted ) (select date_published from xyz )" I get : "ERROR: column "date_posted" is of type timestamp without time zone but expression is of type text HINT: You will need to rewrite or cast the expression." Both dates a

[SQL] ERROR: unterminated quoted string... help

2005-05-17 Thread Postgres Admin
Hi I'm trying to insert encrypted data into the database and I'm noticing error dealing with quotes. Below is the error print out... suggestions and/or at least point me in the direction to find a solution, Thanks, J INSERT INTO sample.users (user_name, first_name) VALUES ('jokers', '=ïµiF!¶6

Re: [SQL] ERROR: unterminated quoted string... help

2005-05-17 Thread Postgres Admin
Scott Marlowe wrote: Use a bytea field and use pg_escape_bytea() to prepare the data for insertion. Thanks Scott, I will try it now. J ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-noma

[SQL] PostgreSQL and Delphi 6

2005-06-15 Thread Postgres Admin
I have a client who wants to use Delphi as a front end to a Database, I would like to use PostgreSQL over MSSQL and have been looking at the psqlodbc project. Will psqlodbc connect with Delphi 6? Basically, I'm wondering if anyone has experience with it? Any help will be appreciated. Thanks, J

Re: [SQL] PostgreSQL and Delphi 6

2005-06-16 Thread Postgres Admin
So you installed psqlodbc 8 on the client machine with Delphi installed, correct? What problems did you have with cursors? Any other suggestions? Thanks a lot for the help! J Din Adrian wrote: > we are using postgresql8 +psqlodbc8+ delphi7 ... the only problem is > the server side cursor = doe

[SQL] Data insert

2005-08-20 Thread Postgres Admin
Sorry for the attachment, but copying and pasting this data does not work. I don't have any idea how to insert the type of data into PostgreSQL. Basically, it's encrypted data in which I would like that keep raw format. Thanks for any help, J sample_data.pdf Description: Adobe PDF document --

[SQL] plpgsql question

2005-08-30 Thread Postgres Admin
Can I do something like this: CREATE TABLE sample (id SERIAL, node INTEGER, parent INTEGER); INSERT INTO sample(node,parent) VALUES(1,0); INSERT INTO sample(node,parent) VALUES(2,0); INSERT INTO sample(node,parent) VALUES(3,1); INSERT INTO sample(node,parent) VALUES(4,3) CREATE OR REPLACE FUNCTIO

Re: [SQL] [ADMIN] plpgsql question

2005-08-30 Thread Postgres Admin
I have data in one table called articles and I would like to make a function in which takes certain data from it and display the results. Example: CREATE TABLE articles ( article_id serial, title varchar(200), posted timestamp, article_subject varchar(200), article_body text, allow_comments boole

[SQL] PL/pgSQL and PHP 5

2006-08-09 Thread PostgreSQL Admin
I'm having this problem inserting data from my form using PL/pgSQL. Here is the simplified version of my table and function (this example does not work, also ): CREATE TABLE theirry.sample ( staff_id serial PRIMARY KEY NOT NULL, firstname varchar(100), lastname varchar(150), usern

Re: [SQL] [PHP] PL/pgSQL and PHP 5

2006-08-09 Thread PostgreSQL Admin
Thanks for the catch. I've tried: $connection->execute("SELECT insert_staff_b('$staff[insert_firstname]'::varchar)"); $connection->execute("SELECT insert_staff_b('".$staff['insert_firstname']."'::varchar)"); None work... I'm scratching my head on this one. Thanks, J

Re: [SQL] PL/pgSQL and PHP 5

2006-08-09 Thread PostgreSQL Admin
Tom Lane wrote: PostgreSQL Admin <[EMAIL PROTECTED]> writes: CREATE OR REPLACE FUNCTION insert_staff_b (insert_firstname varchar) RETURNS VOID AS ... Still I get this error: Warning: pg_query(): Query failed: ERROR: function insert_staff_b(character varying) does not exist

Re: [SQL] PL/pgSQL and PHP 5 - thanks

2006-08-09 Thread PostgreSQL Admin
Thanks, The search path was the problem. Sometimes it's the simple things. Big thanks, J ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[SQL] Replace string

2007-04-11 Thread PostgreSQL Admin
Hi, I want to replace a title with dashes and also remove punctuation. e.g, The blue fox's fur. -> The-blue-fox-fur Thanks for any input, J ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate su

Re: [SQL] Replace string

2007-04-12 Thread PostgreSQL Admin
test=*# select regexp_replace(regexp_replace('The blue fox\'s fur.', ' ', '-', 'g'), '\\.', ''); regexp_replace The-blue-fox's-fur (1 row) Andreas Thanks for the input. I came up with this: REPLACE(regexp_replace('The blue fox\'s fur', '[[:punct:]]', ''), ' ',

[SQL] Add constraint for number of chars

2007-04-25 Thread PostgreSQL Admin
Hi, This is seemly simple, but I'm @ a loss this early in the morning. It's best explained this way SAMPLE --- id | serial| username | varchar(100)| constraint username >=8 and username <=100 The problem is that it's characters not

[SQL] pgmemcache

2007-07-18 Thread PostgreSQL Admin
As anyone used pgmemcache? I would like to look more into a but I'm having problems installing the sql. I'm on OS X 10.4 and the sql there are lines causing errors: (e.g. AS '$libdir/pgmemcache', 'memcache_server_add' LANGUAGE 'C' STRICT;) thanks for any input and also will version 1.2 come

[SQL] Constraints for grouping

2007-09-03 Thread PostgreSQL Admin
I have a question that I've thought in my head about using triggers, but I figure to ask people that do SQL more than I. So, I have a table that I want two columns. (1) A featured column which is for only 1 row, once it switched to another row than all other rows must be false title

Re: [SQL] Constraints for grouping

2007-09-03 Thread PostgreSQL Admin
> --- Richard Broersma Jr <[EMAIL PROTECTED]> wrote: > >> CREATE UNIQUE INDEX Only_one_row_true >> ON Your_table ( featured ) >>WHERE featured = true; >> >> Or if you want to only allow 1 featured article per catagory then: >> >> CREATE UNIQUE INDEX Only_one_row_true_per_catag

[SQL] Trigger to change different row in same table

2007-09-04 Thread PostgreSQL Admin
I want to write a trigger that updates a different row on the same table. It's pretty basic: before the any row in his table updated I want to set a only row that has the value true to false. I keep getting this error: SQL statement "update theirry.articles set master_featured = false where mast

Re: [SQL] Trigger to change different row in same table

2007-09-04 Thread PostgreSQL Admin
chester c young wrote: > how are you preventing recursion? > > That could be the problem, suggestions? ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

[SQL] Foreign Key for multi PK or design question

2007-12-11 Thread PostgreSQL Admin
I have a table in which people will have a number of questions to answer. I want those pk to be placed in my user table. So if a user answers three question I want those 3 pk's in the user table (fk). What should I be doing? Thanks in advance, J ---(end of broadcast)

Re: [SQL] Foreign Key for multi PK or design question

2007-12-11 Thread PostgreSQL Admin
This is my layout so far: CREATE TABLE users ( id serial NOT NULL, --question REFERENCES questions(id) ON DELETE CASCADE ## ON REMOVED## ); CREATE TABLE questions ( id serial NOT NULL, questions varchar(450) NOT NULL ); CREATE TABLE answers ( id serial NOT NULL, question_id int REFERENCES questi

Re: [SQL] Foreign Key for multi PK or design question

2007-12-11 Thread PostgreSQL Admin
No problems with the design - I was not thinking with the DB hat on at first. I have been working on clustering for a while... just adjusting. Thanks everyone. :) ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[SQL] Unclosed connections

2008-01-25 Thread PostgreSQL Admin
We are using this bad piece of the software that does not close connections to the postgres server. Is there some setting for closing dead connections? And not TCP/IP keep alive does not work. ---(end of broadcast)--- TIP 4: Have you searched our

[SQL] Double query

2008-02-06 Thread PostgreSQL Admin
Simple question - but my brain is not working: This is my table Column | Type | Modifiers ---++- id| integer

[SQL] DB Design

2008-03-14 Thread PostgreSQL Admin
I have a inventory system design in which I would like some help with to see if it's efficient. The products are broken into: Product tables Property tables Configurable Products - this would include colors (i.e. - black, blue and green) tied to products I'm thinking of breaking inventory in

[SQL] Different type of query

2008-06-11 Thread PostgreSQL Admin
I have a table like this: usda=# \d nutrient_data Table "public.nutrient_data" Column | Type | Modifiers -+---+--- ndb_no | integer | not null nutrient_no | integer | not null

Re: [SQL] Different type of query

2008-06-11 Thread PostgreSQL Admin
Steve Crawford wrote: PostgreSQL Admin wrote: I have a table ... when I run this query: select ndb_no, nutrient_no, nutrient_value from nutrient_data where ndb_no = 13473; it produces: ndb_no | nutrient_no | nutrient_value +-+ 13473 | 203

Re: [SQL] Different type of query

2008-06-11 Thread PostgreSQL Admin
Mark Roberts wrote: On Wed, 2008-06-11 at 14:41 -0400, PostgreSQL Admin wrote: I would like to have multiple values nutrient_no: ndb_no | nutrient_no | nutrient_value +-+ 13473 | 203 | 24.18 13473 | 204 | 15.93 13473

[SQL] Tsearch

2008-06-12 Thread PostgreSQL Admin
this is a small sample of the data: short_desc | long_desc --+---

[SQL] Design and Question

2008-07-10 Thread PostgreSQL Admin
Hi, I have BOTH a sql AND db design question. I'm creating a cookbook DB with have broken the table into this: RECIPE TABLE Column | Type | Modifiers ---+--+-- id | integer | not null default nextval('r