hi,
i have 2 columns in my hash file aa1 aa2, i want count of rows on cloumn aa1 in hash file
on column aa1,
i tried wc -w hashfile
it dont gave me count,
plz advice.
Thanks
Bobby
count on hash file
Moderators: chulett, rschirm, roy
Dynamic hash files are binary data structures, you cannot simply do text file commands against them.
If you want to run SQL against a hash file, then search the forum for the ways to do that. If your hash file exists within a project (not fully qualified path), then use the DS Admin client and you can run SQL statements against the hash file. If the hash file is externally pathed, then you must use SETFILE to register the hash file for SQL commands first.
It's all been covered on the forum...
If you want to run SQL against a hash file, then search the forum for the ways to do that. If your hash file exists within a project (not fully qualified path), then use the DS Admin client and you can run SQL statements against the hash file. If the hash file is externally pathed, then you must use SETFILE to register the hash file for SQL commands first.
It's all been covered on the forum...
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
-
- Participant
- Posts: 25
- Joined: Wed Oct 13, 2004 1:11 am
Try this
U have to execute it on the command line interface in Admin else u can telnet into the server and in the uv shell execute this commands.
[/code]
Code: Select all
SETFILE HashFilePath HashFileName OVERWRITING
Code: Select all
Count HashFileName
[/code]
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Use your Administrator client Command window.
The SETFILE command, if entered correctly, will work from there. It reports that a pointer has been established or that an error has occurred. If the latter you must not proceed until your SETFILE has been successful.
A hashed file is a database table, so you can use regular SQL queries on it. Beware, however, that it is case sensitive. That is, table names and column names must be entered with correct casing.
The number of rows should be the same for each column; I am not sure what you mean by "i want count of rows on cloumn aa1". You can count them with the COUNT command as shown by an earlier poster, or using SQL, for example
The SETFILE command, if entered correctly, will work from there. It reports that a pointer has been established or that an error has occurred. If the latter you must not proceed until your SETFILE has been successful.
A hashed file is a database table, so you can use regular SQL queries on it. Beware, however, that it is case sensitive. That is, table names and column names must be entered with correct casing.
The number of rows should be the same for each column; I am not sure what you mean by "i want count of rows on cloumn aa1". You can count them with the COUNT command as shown by an earlier poster, or using SQL, for example
Code: Select all
SELECT COUNT(*) FROM updatecdatecoded;
SELECT aa1, COUNT(*) FROM updatecdatecoded GROUP BY aa1;
SELECT EVAL "If IsNull(aa1) Then 'NULL' Else aa1", COUNT(*) FROM updatecdatecoded GROUP BY aa1;
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.