Hi All,
Is there any way to create a temporary table?
TIA.
Regards.
Sudip
How to use Temporary Table
Moderator: Rathinagiri
How to use Temporary Table
With best regards,
Sudip
Sudip
- Rathinagiri
- Posts: 5480
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: How to use Temporary Table
What do you mean by that Sudip?
A dbf file?
A dbf file?
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.
Re: How to use Temporary Table
Yes, Rathi.
I want to mean if there is any way to store data to a temporary dbf file, it will be very helpful.
Actually, I used this in another software tool (not related to Harbour/xHarbour). There it is called "cursor".
This software tool has some other problems. But, I like the concept of "cursor". With Harbour I have to use array (IMHO).
I heard something like Array RDD (if I am not wrong), but I haven't used it.
BTW, can it be created with MySql? (that will be very helpful also)
Regards.
Sudip
I want to mean if there is any way to store data to a temporary dbf file, it will be very helpful.
Actually, I used this in another software tool (not related to Harbour/xHarbour). There it is called "cursor".
This software tool has some other problems. But, I like the concept of "cursor". With Harbour I have to use array (IMHO).
I heard something like Array RDD (if I am not wrong), but I haven't used it.

BTW, can it be created with MySql? (that will be very helpful also)
Regards.
Sudip
With best regards,
Sudip
Sudip
- Rathinagiri
- Posts: 5480
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: How to use Temporary Table
In MySQL you can very well use temporary tables (connection wise). That would be created at the time of executing 'create' command, and would be cleared at the time of closure of the connection. I had used that in my system, particularly in user control and management.
Syntax is like this.
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
(create_definition,...)
[table_option ...]
[partition_options]
Or:
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
[(create_definition,...)]
[table_option ...]
[PARTITION BY partition_options]
select_statement
Or:
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
{ LIKE old_tbl_name | (LIKE old_tbl_name) }
Syntax is like this.
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
(create_definition,...)
[table_option ...]
[partition_options]
Or:
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
[(create_definition,...)]
[table_option ...]
[PARTITION BY partition_options]
select_statement
Or:
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
{ LIKE old_tbl_name | (LIKE old_tbl_name) }
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.
Re: How to use Temporary Table
Hello Rathi,

Regards.
Sudip
Thanks a lot! I want this! I am very lucky to have a friend-cum-teacher like yourathinagiri wrote:In MySQL you can very well use temporary tables (connection wise). That would be created at the time of executing 'create' command, and would be cleared at the time of closure of the connection. I had used that in my system, particularly in user control and management.

Regards.
Sudip
With best regards,
Sudip
Sudip
Re: How to use Temporary Table
Hi Sudip,sudip wrote:Yes, Rathi.
I want to mean if there is any way to store data to a temporary dbf file, it will be very helpful.
Take a look for the Harbour changelog:
...
+ added .prg function to create temporary files:
hb_dbCreateTemp( <cAlias>, <aStruct>, <cRDD>, ;
<cCodePage>, <nConnection> ) -> <lSuccess>
Not all RDDs have to support it. It's verified by support for
DBI_ISTEMPORARY dbInfo() action.
...
I hope that give you an idea

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
Re: How to use Temporary Table
Yes, thank you Guru!!!gfilatov wrote: Take a look for the Harbour changelog:
...
+ added .prg function to create temporary files:
hb_dbCreateTemp( <cAlias>, <aStruct>, <cRDD>, ;
<cCodePage>, <nConnection> ) -> <lSuccess>
Not all RDDs have to support it. It's verified by support for
DBI_ISTEMPORARY dbInfo() action.
...
I hope that give you an idea

I got following information from \MiniGui\Harbour\Doc\WhatsNew.txt
HB_DBCREATETEMP()/DBCREATETEMP() to create temporary tables.
Is there any example for this?
Can I use it with HMG? (As you know, I want to work with both versions

Thank you very much again.
With best regards.
Sudip
With best regards,
Sudip
Sudip