[GENERAL] how to insert from sequence

1999-10-27 Thread soundar rajan

Hi all,

I need help in inserting a value from sequence.  My
code goes like this (from Java).  I do face a syntax
level problem.

statement.execute("insert into T_name (id) values (" +
nextval('s_name') + ")");

Thanks in advance for the help.


__
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com





[GENERAL] how to insert from sequence

1999-10-27 Thread soundar rajan

Hi all,

I need help in inserting a value from sequence.  My
code goes like this (from Java).  I do face a syntax
level problem.

statement.execute("insert into T_name (id) values (" +
nextval('s_name') + ")");

Thanks in advance for the help.


__
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com





[GENERAL] cidr and inet

1999-10-21 Thread soundar rajan

Hi all,

I created two tables with CIDR and inet data values
separately.  I was not able to insert values into it.
When I tries to do

insert into ip values (10.20.30.40);

the error I get time and again is 

'parser error at or near .30'

It always points to the third part of the IP (ie, 100
in case of 10.30.100.200)

Any help be appreciated.

Thanks


__
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com





[GENERAL] jdbc small example

1999-10-20 Thread soundar rajan

Hi all,

If someone can tell me how to start with, connecting
java to postgresql.  I suppose I'm right.  But, I get
some errors.

import java.sql.*;

public class jd{
public static void main(String[]a rgs){
Class.forName("postgresql.Driver");
String url = "jdbc:postgresql:xxx";
connection c = Dri..M.getConn( );
Statement stmt= conn.createStmt():
ResultSet rs = stmt.execQu();
}
}


The problem is ... I get a connection error, even
though the db is running at the backend.

Helps appreciated





__
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com





[GENERAL] jdbc small example

1999-10-20 Thread soundar rajan

Hi all,

If someone can tell me how to start with, connecting
java to postgresql.  I suppose I'm right.  But, I get
some errors.

import java.sql.*;

public class jd{
public static void main(String[]a rgs){
Class.forName("postgresql.Driver");
String url = "jdbc:postgresql:xxx";
connection c = Dri..M.getConn( );
Statement stmt= conn.createStmt():
ResultSet rs = stmt.execQu();
}
}


The problem is ... I get a connection error, even
though the db is running at the backend.

Helps appreciated





__
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com





[GENERAL] jdbc small example

1999-10-20 Thread soundar rajan

Hi all,

If someone can tell me how to start with, connecting
java to postgresql.  I suppose I'm right.  But, I get
some errors.

import java.sql.*;

public class jd{
public static void main(String[]a rgs){
Class.forName("postgresql.Driver");
String url = "jdbc:postgresql:xxx";
connection c = Dri..M.getConn( );
Statement stmt= conn.createStmt():
ResultSet rs = stmt.execQu();
}
}


The problem is ... I get a connection error, even
though the db is running at the backend.

Helps appreciated





__
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com





[GENERAL] jdbc problem

1999-10-15 Thread soundar rajan

Hi,

I am using postgresql under linux.  Now that I need to
build up the jdbc driver for postgresql, when I make
under the directory /src/interfaces/jdbc.. I get an
error stating '(u' unexpected syntax... 

The version returned by the make is 1.0b4.  The
makeVersion.java file returns jdbc0 as the output and
so, the postgresql.jar file is not been created.

How do I go about this?  Any help would be
appreciated.

Thanks.
Soundar.  

__
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com





Re: [GENERAL] how to insert a date

1999-10-15 Thread soundar rajan

Thanks.  
1. But, How to get use the general functions like
char_length( );  Like in Oracle, we've select
(5*6) from dual;  What is the substitute for the dual
in pg DB.

2. Is it true that 6.5.2 doesn't support foreign keys.
 

This is what my qn. really was.  Sorry, had I written
the last qn. so as  to be interpreted the way you
meant it.  

Thanks.
Soundar.



--- Kevin Heflin <[EMAIL PROTECTED]> wrote:
> On Fri, 15 Oct 1999, soundar rajan wrote:
> 
> > hi,
> > Can anyone help me -- how to insert a date value
> into
> > a postgresql db
> 
> 
> assuming the data type is of the 'date' type
> 
> 
> insert into tablename (datefield) values
> ('11/31/1999');
> 
> 
> or
> 
> insert into tablename (datefield) values
> ('current_date');
> 
> 
> 
> something like that.
> 
> 
> 
> 
> 
> > 
> > Thanks in advance.
> > 
> > __
> > Do You Yahoo!?
> > Bid and sell for free at http://auctions.yahoo.com
> > 
> > 
> > 
> 
>

> Kevin Heflin  | ShreveNet, Inc.  |
> Ph:318.222.2638 x103
> VP/Production | 333 Texas St #175|
> FAX:318.221.6612
> [EMAIL PROTECTED]| Shreveport, LA 71101 |
> http://www.shreve.net
>

> 
> 

__
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com





[GENERAL] how to insert a date

1999-10-15 Thread soundar rajan

hi,
Can anyone help me -- how to insert a date value into
a postgresql db

Thanks in advance.

__
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com