That article is interesting, thank you.
I am trying to select the last 20 records of my table, but each of them has to be selected separately. How can i do this ?
I am using SQL Server 2000. My table consists of a primary key and the rest are normal columns. The primary key is numeric and the table is sorted on that column.
I am not sure what to add else, if there is anything you need to know, please ask.
User Profile
Collapse
-
SQL Select Question
Hello,
Another question, which probably would be very simple.
How can I Select the record which is one before the last record ? -
-
hmmm. I am not sure how I got it, but the Insert string seems to work now. It can insert all values at once now. But this was a Python problem and Lol! it was no PHP code. Anyway, the insert string is fine now.
But I still need a code which can update the last record of the database. My python function will submit the data and Inserts it into the database, but later more data has to be submitted and updated in the same record.
...Leave a comment:
-
Hi Irina,
Thanks for the reply. I have a primary key. My database is ordered by this numeric primary key.
I don't really need any help on Insert, but i suppose i could show the string anyway. Python or SQL doesn't allow me to insert more than 8 values at once.
Code:sqlStr = """INSERT INTO Pforte (EIN_GEW, KARTEN_NR, AUFLIEGER, SPEDITION, LIEF_NR, LIEFS_GEW, PROD_NR, rezept) VALUES ('%s', '%s', '%s', '%s',
Leave a comment:
-
I forgot to say. There is an error with python which does not let me use INSERT INTO since there can only be updated 8 values at once...Leave a comment:
-
Update Last Record
Hi,
I am creating a Python function which contains a SQL string. When the function is loaded, the SQL table must be updated with the values from my program.
This is all done.
Though I'm stuck at the SQL string. How can i say that I want to update the last record ?
I heard about the LAST command, but it doesnt work with my MS SQL Enterprise manager.
Example:
UPDATE Table SET...
No activity results to display
Show More
Leave a comment: