[SQL] Re: Adding an INTERVAL to a variable
Thanks for the inspiration Vivek! Didn't quite work, but when I made it... dSalesHdrDateDue + (iAcctPayDaysAv || 'Days')::INTERVAL BINGO! it works. Happiness is :-) Graham Coates "Vivek Khera" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > "GC" == Graham Coates <[EMAIL PROTECTED]> writes: > > GC> SELECT Invoices.InvoiceDate + INTERVAL '41 Days' > GC> works fine > GC> but when trying to substitute the number of days with a value form a field > GC> e.g. > > GC> SELECT Invoices.InvoiceDate + INTERVAL Acct.AverageDaysToPay 'Days' > > try > > SELECT Invoices.InvoiceDate + Acct.AverageDaysToPay::interval > > > > -- > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > Vivek Khera, Ph.D.Khera Communications, Inc. > Internet: [EMAIL PROTECTED] Rockville, MD +1-240-453-8497 > AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/ ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl
Re: [SQL] what does this error mean?
Carolyn Lu Wong <[EMAIL PROTECTED]> writes: > When trying to delete data from a table, get the following error: > ExecutePlan: (junk) `ctid' is NULL!=ODBC.QueryDef May we see the query and table schema? regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[SQL] ODBC 7.1
Greetings All, Is this the correct forum to discuss ODBC driver issues? I have a Linux/PostgreSQL server which has been upgraded to run 7.1 - the main reason was to be able to use the TOAST extensions. We have some documentation attached to fields which is up to 64kb. After upgrading the server I installed the current (7.1) ODBC driver for Win32. It now seems that concurrent table writes are limited? My write times are fairly slow. (significantly slower than 6.4/7.0) Some tables which are updated simultaneously - like sales and general ledger are not staying in synch. Any suggestions would be welcomed (including upgrades) -- Keith Gray Technical Development Manager Heart Consulting Services P/L mailto:[EMAIL PROTECTED] ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl
Re: [SQL] ODBC 7.1
Keith Gray wrote: > > Greetings All, > > Is this the correct forum to discuss ODBC driver issues? > No, pgsql-odbc is the right forum. > I have a Linux/PostgreSQL server which has been upgraded > to run 7.1 - the main reason was to be able to use the > TOAST extensions. We have some documentation attached > to fields which is up to 64kb. > > After upgrading the server I installed the current (7.1) > ODBC driver for Win32. > Is the version 7.01.0006 ? > It now seems that concurrent table writes are limited? > > My write times are fairly slow. (significantly slower > than 6.4/7.0) > Is the comparison for the < 8k data ? Is it as fast as 6.4/7.0 except concurrent write ? regards, Hiroshi Inoue ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
[SQL] INSERT FOLLOW WITH OTHER INSERT
hi all
i have a table like this
CREATE SEQUENCE seq_student_id INCREMENT 1 START 1;
CREATE TABLE students (
student_id INT4 NOT NULL DEFAULT
NEXTVAL('seq_student_id'),
student_name text,
student_address text,
primary key(student_id)
)
CREATE TABLE student_club (
student_id INT4 NOT NULL;
club_id INT4,
CONSTRAINT student_id_update FOREIGN KEY(student_id)
REFERENCES students(student_id) ON UPDATE CASCADE
)
my question is how i can make auto insert student_id
on table student_club when i insert into table
students
example:
INSERT INTO students(student_name) VALUES('Willy');
table STUDENT
student_id | name | address
-
1 | Willy |
and on TABLE student_club
student_id | club_id
1 |
i have trying with create rule and with
check_foreign_key, but i haven't found solution.
anyone can help me?
Thanks in advance
__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
