SQL Questions
Moderator: Rathinagiri
- dragancesu
- Posts: 921
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Re: SQL Questions
In MySQL see https://www.w3schools.com/sql/sql_alter.asp
for DBF I use program DBX (dos version) or dbfCommander (windows, http://elphsoft.com/download.html)
for DBF I use program DBX (dos version) or dbfCommander (windows, http://elphsoft.com/download.html)
Re: SQL Questions
I meant from inside program.
I thought I seen something like
I thought I seen something like
Code: Select all
use file
if ! field('try')
append blank
replace name with 'try', type with 'character' width with 30, decimals with 0
endif
use
All The Best,
Franco
Canada
Franco
Canada
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: SQL Questions
IMHO, if you want to use SQL trying to use proper 'SQL Queries' will help us a lot. From HMG you can run these queries to either insert data or extract data using 'INSERT' or 'SELECT' commands of SQL.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- serge_girard
- Posts: 3166
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: SQL Questions
Rathi,
Is it possible to have something like this:
http://compgroups.net/comp.lang.xharbou ... ta/3100125
This would be the solution for Franco, I suppose.
Reagrds, Serge
Is it possible to have something like this:
http://compgroups.net/comp.lang.xharbou ... ta/3100125
This would be the solution for Franco, I suppose.
Reagrds, Serge
There's nothing you can do that can't be done...
Re: SQL Questions
Hi Serge,serge_girard wrote: ↑Thu Oct 04, 2018 8:15 am Is it possible to have something like this:
http://compgroups.net/comp.lang.xharbou ... ta/3100125
This would be the solution for Franco, I suppose.
There is a freeware library SELECTOR for a such need in the MiniGUI Ex distribution.
The console sample is below:
Code: Select all
/*
* demo.prg
*/
#include "Selector.ch"
PROCEDURE Main()
LOCAL nStart
LOCAL n
LOCAL aData
IF File("temp.dbf")
FErase("temp.dbf")
ENDIF
USE test EXCLUSIVE
@ SELECT first,last,age GROUP,state GROUP FROM test FOR age>60
nStart := Seconds()
aData := {}
? ""
temp->(DbGoTop())
FOR n:=1 TO 20
AAdd( adata, {Alltrim(temp->first),temp->age,temp->state} )
? Alltrim(temp->first),temp->age,temp->state
temp->(DbSkip())
NEXT
? "=============================================================="
? "Added " + Str(Len(aData)) + " Selector records into array in ", Seconds() - nStart
?? " seconds"
? "=============================================================="
inkey(0)
temp->(DbCloseArea())
DbDrop('temp')
RETURN
Hope that usefulWayne 61 IN
Dickson 61 WI
Tom 62 AZ
Lance 62 FL
Terry 62 IA
Gregory 62 MD
Frederik 62 OR
Heinz 62 PA
Corey 62 SD
Vosgo 63 CA
Michael 63 HI
Luc 63 HI
Laura 63 IA
Francisco 63 MT
Matthew 63 NH
Albert 63 NM
Ralf 63 SC
Kandasamy 63 SC
Gilles 63 VT
Gerard 64 CA
==============================================================
Added 20 Selector records into array in 0.55 seconds
==============================================================
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
- serge_girard
- Posts: 3166
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: SQL Questions
Thanks Grigory, I think Franco will be glad!
Serge
Serge
There's nothing you can do that can't be done...
Re: SQL Questions
I can not find the "selector.ch" file. Can you help.
Thanks Franco
Thanks Franco
All The Best,
Franco
Canada
Franco
Canada
Re: SQL Questions
Downloaded minigui and found selector.ch inside. Copied it to hmg3.2 include folder and hfcl include folder . Can not make it work ? does it work in hmg3.2 .
Franco
Franco
All The Best,
Franco
Canada
Franco
Canada
Re: SQL Questions
Dear Franco,
It is a BCC-compiled library due to it will work in MiniGUi Ex only
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein