I have no problem setting a default value with mySQL but I am having trouble
getting the correct syntax with 4D's SQL implementation. I am just in test
and experiment phase of trying to see if I can replace mySQL with 4D (so far
so good except for this little hiccup which I am certain is my ignorance).

Normally this should work:
**************************************
SQL LOGIN(SQL_INTERNAL;"root";"")
txt_TABLE_NAME:="Test_4444_0353"
txt_QUESTION_TYPE:=" INT"
txt_QUESTION_NAME:="X0101"  
txtRequest:="Alter TABLE "+txt_TABLE_NAME+" add
"+txt_QUESTION_NAME+""+txt_QUESTION_TYPE+" DEFAULT -999999 ;"

Begin SQL
EXECUTE IMMEDIATE: txtRequest
End SQL

SQL LOGOUT
**************************************

I get syntax errors at this and other variations (I'm just guessing hoping I
hit on correct syntax!)

I checked and the DEFAULT reserved work exists in 4D's SQL (but maybe it is
only valid in a Select?).

Cheers and thanks

Jim Labos - infobase



-----
Jim Labos - infobase
--
View this message in context: 
http://4d.1045681.n5.nabble.com/Setting-DEFAULT-VALUE-with-SQL-tp5751741.html
Sent from the 4D Tech mailing list archive at Nabble.com.
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to