Unix Technical Forum

Re: How to convert this mysql syntax

This is a discussion on Re: How to convert this mysql syntax within the pgsql Interfaces odbc forums, part of the PostgreSQL category; --> > I thought that SQL was nomalized but when I tried this wmysql code SQL is mostly normalized, but ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces odbc

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-16-2008, 02:03 AM
markw@mohawksoft.com
 
Posts: n/a
Default Re: How to convert this mysql syntax

> I thought that SQL was nomalized but when I tried this wmysql code

SQL is mostly normalized, but every database seems to bring in its own
incompatibilities.
>
> With PostGreSQL it doesn't work.


It is probably a MySQL extension.

>
>
>
>
>
> //Select database
>
>
>
> m_pDb.Execute( "USE dbBornes;" );


Try:
m_pDb.Execute( "connect dbBornes;" );

>
>
>
> // Create table
>
> csSql.Format( "CREATE TABLE %s(", m_DbTable );
>
> csSql += _T( "UserID INTEGER NOT NULL AUTO_INCREMENT," );
>
> csSql += _T( "Time DATETIME NOT NULL," );
>
> csSql += _T( "NumSerie INTEGER NOT NULL," );
>
> csTmp.Format( "%s VARCHAR(64),", im->first );
>
> csSql += _T( "PRIMARY KEY(UserID))" );
>
>



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-16-2008, 02:03 AM
Jeff Eckermann
 
Posts: n/a
Default Re: How to convert this mysql syntax

--- markw@mohawksoft.com wrote:

> > I thought that SQL was nomalized but when I tried

> this wmysql code
>
> SQL is mostly normalized, but every database seems
> to bring in its own
> incompatibilities.
> >
> > With PostGreSQL it doesn't work.

>
> It is probably a MySQL extension.
>
> >
> >
> >
> >
> >
> > //Select database
> >
> >
> >
> > m_pDb.Execute( "USE dbBornes;" );

>
> Try:
> m_pDb.Execute( "connect dbBornes;" );
>
> >
> >
> >
> > // Create table
> >
> > csSql.Format( "CREATE TABLE %s(", m_DbTable );
> >
> > csSql += _T( "UserID INTEGER NOT NULL
> > AUTO_INCREMENT," );


csSql += _T( "UserID SERIAL NOT NULL," );

> >
> > csSql += _T( "Time DATETIME NOT NULL," );


csSql += _T( "Time TIMESTAMP NOT NULL," );

> >
> > csSql += _T( "NumSerie INTEGER NOT NULL," );
> >
> > csTmp.Format( "%s VARCHAR(64),", im->first );
> >
> > csSql += _T( "PRIMARY KEY(UserID))" );


http://www.postgresql.org/docs/8.0/i.../datatype.html

> >
> >

>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the
> unregister command
> (send "unregister YourEmailAddressHere" to
> majordomo@postgresql.org)
>





__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:01 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com