[Gambas-user] RE: sql query year problem

R. Stormo rohnny at ...1248...
Mon Mar 6 16:55:13 CET 2006


admin-27 wrote:
> 
> Hi Rohnny
> 
> Every (or most) SQL Server uses another Syntax for Date.  
> If you want SQL Cross-Syntax forget Server-specific statments and go back
> to
> basics supportet by all (or most), like substring, left, right, charindex.
> But! not shure if there is any statement supportet by all SQL servers, and
> then an other difficulty is how dates are stored in the DB. 
> The other way is to create the SQL string programaticaly in Gambas, select
> case dbType case "mysql" whereDate="year(xxxx)" case "sqllight"
> whereDate="dontknow()" end select query="Select * From Table where " &
> whereDate
> Or the easy-way, you can store the year from the date in a separate field
> and ask for this "where fieldYear='2006'"
> You see there are some workarounds.
> 
> Regards, Staudi
> 
> 
> 
Thanks for clearing things for me. Looks like I need to go to square 1 and
put things in eatch field. For best compatibility


 --
 Regards
 	Rohnny Stormo
 
 
 -----------------------------------------
 Gambas brings Basic to Linux.
 My Gambas Community http://forum.stormweb.no
 
--
View this message in context: http://www.nabble.com/sql-query-year-problem-t1227953.html#a3264122
Sent from the gambas-user forum at Nabble.com.





More information about the User mailing list