Nope this only works (that I know of in MySQL 4+).
There are a couple work arounds in MS SQL tho.
select top * from ( select top * from table order by column ) order by column
and
select * from
(
select top * from
(
select top (+) from table order by column ASC
) T1 order by column DESC
)...
My Comment:
Would be nice to have a variable in PSQL that returns the current row number or a function such as mysql's 'limit' function that selects a range of rows. ie select * from table limit 10, 20 ... basically that would select 20 records AFTER the first 10 OR select * from table where...
I would rather not if i can avoid it... Think there are any plans to change PSQLs limit function into one more similar to MySQLs in newer versions of Pervasive?
http://php.about.com/od/mysqlcommands/g/Limit_sql.htm
Personally I think that would be awesome...
For now I guess my best option is...
After putting this into play I'm still going to run into issues.
Basically now I will need to run 3 queries instead of 1
One to find the top number
One to find the 20 records in the page data
One to find the total values in the table
Also when I am running the first query to find the top...
Here is one way IT COULD be done:
select * from table where ROWNUMBER < $page*20 AND ROWNUMBER > $page-1*20
That is of course ROWNUMBER was a variable :)
Not really. Heres an example of the data and what I am trying to do.
http://quicksilverbbs.com/itemlist.php?t=1
Basically it lists all of the weapons in the dat file. It displays 20 items per page.
This gives a pretty big load time for my larger dat files and instead of selecting ALL items i...
From my understanding ROWCOUNT is almost the same as TOP.
ROWCOUNT returns the first # of values.. and so does TOP.
I need something that makes the query START at a certain row # and then use TOP to pick the next set of numbers.
I was curious if you might know how I would do a range of rows in PSQL starting at row 10 with a limit of 20 rows.
In MYSQL it would just be select * from table limit 10, 20
Thanks in advance.
CORRECTION
CREATE UNIQUE NOT MODIFIABLE INDEX "key0" IN DICTIONARY ON "CHARACTERS"("userid");
CREATE INDEX "key1" IN DICTIONARY ON "CHARACTERS"("username");
CREATE INDEX "key2" IN DICTIONARY ON "CHARACTERS"("unsignedbinary");
Same results.
Can someone please tell me what I am doing wrong here??
EXECUTED IN PERVASIVE 9.5
CREATE TABLE "CHARACTERS" using 'wccuser2.dat'(
"userid" VARCHAR(30),
"username" VARCHAR(30),
"unsignedbinary" UINTEGER
);
CREATE UNIQUE NOT MODIFIABLE INDEX "key0" ON "CHARACTERS"("userid");
CREATE INDEX...
Thanks guys I got it to work! When I was using pervasive's builder and i tried to set the record offset to 24 with a length of 2000 the whole bar turned red, so I originally figured this was bad and it would error out. Well turns out I did it and it worked, then it was just a matter of decoding...
http://66.75.141.116/files/
Here is a link to 2 screenshots and the dat file itself.
The screenshots show a view of the data itself. As you can see there are 3 integer fields and a forth one with text. The forth one doesnt come up at all. The only other files in the viewer are w32mkde.exe and...
here you go
File Version = 6.00
Page Size = 2048
Page Preallocation = No
Key Only = No
Extended = No
Total Number of Records = 2549
Record Length = 24
Record Compression = No
Page Compression = No
Variable Records = Yes
Variable-Tail Allocation Tables = No
Blank Truncation = No
Free...
The problem is all I have on these dat files are the dat files. I have no info on them what so ever and I am very new with btrieve. Here is the butil stat
This is all I get from the file stats
File Version ?.?
Page Size 2048
Page Preallocation...
I'm having an issue when trying to build ddf files for one of about 9 dat files. All the others came over with no problem, but for some reason this ones not working correctly. The file itself is about 5MB big. It is for an old WG game called MajorMUD. It actually contains things called...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.