Re: [Gambas-user] Question on editing database tables
On 2015-12-19 02:15, zainudin ahmad wrote: > This trick(0=0) worked for sqlite > > "0=0 ORDER BY Code, Date, Amount" > > May be any better idea ? > Thanks, I'll give it a try after the holidays (in 2 weeks) when I am back at work. gbWilly -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Question on editing database tables
This trick(0=0) worked for sqlite "0=0 ORDER BY Code, Date, Amount" May be any better idea ? On Wed, Dec 16, 2015 at 10:24 PM,wrote: > Hi all, > > > I have used editing on tables multiple times like this for example: > > rResultEdit = $hConn.Edit("KasAanvullingen", "KassaCode = &1 AND Time = > &2 AND Date = &3", sKasAanvulCode, rResultAanvul!Time, > rResultAanvul!Date) > > Now I'm facing a harder one: > I have this table and it needs to be edited, but for that records need > to be ordered based on code, date and amount > I tried this: > > rResultFact = $hConn.Edit("ICDagResFactNee", "ORDER BY Code, Date, > Amount") > > but that results in an empty result. Guess the second argument only > replaces a WHERE > > Now, this order is very important in this case as the proper records > need to be edited and the default order of the table is not the desired > one and will lead to data integrity problems when editing as is. > Can one use DB.Edit so the result is ordered in a certain desired > manner? > > > Thanks, > > gbWilly > > > -- > ___ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Question on editing database tables
Hi all, I have used editing on tables multiple times like this for example: rResultEdit = $hConn.Edit("KasAanvullingen", "KassaCode = &1 AND Time = &2 AND Date = &3", sKasAanvulCode, rResultAanvul!Time, rResultAanvul!Date) Now I'm facing a harder one: I have this table and it needs to be edited, but for that records need to be ordered based on code, date and amount I tried this: rResultFact = $hConn.Edit("ICDagResFactNee", "ORDER BY Code, Date, Amount") but that results in an empty result. Guess the second argument only replaces a WHERE Now, this order is very important in this case as the proper records need to be edited and the default order of the table is not the desired one and will lead to data integrity problems when editing as is. Can one use DB.Edit so the result is ordered in a certain desired manner? Thanks, gbWilly -- ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user