954,517 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

sql database

hi,

how do i get latest transaction from sql database. All the records is saved in sql database and i use different application to grab the data from sql base on transaction. I use SELECT statement but i don't know how to make it unique variable/ID. 1st user might have 5 records and 2nd user 10 records and 3rd user 5 records and so on. How can i use SELECT statement to grab this record based on the transaction.
how do i create unique variable to define different transaction in sql select statement.

Please guide me !!!

swathys
Junior Poster
183 posts since Sep 2010
Reputation Points: -7
Solved Threads: 0
 

If I understand this correctly, the following -

"SELECT * FROM MyTableName WHERE UserId =" & "'" & MyUserIdNumber & "'"

'Now move the returned recordset to the last record in the table set.
AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
 

HI,

Do this variable differentiate base on transaction and user. Because i need something to make it its a different transaction from different user. And if each time there is a transaction (contain max 10 records)i want to select it using select statement. But the problem is i don't know how to create or how to differentiate the transaction.

Please help

swathys
Junior Poster
183 posts since Sep 2010
Reputation Points: -7
Solved Threads: 0
 

hi,

anyone knows how to solve my problem.

swathys
Junior Poster
183 posts since Sep 2010
Reputation Points: -7
Solved Threads: 0
 

Sorry, I was stuck in some projects. Send me your table structure. I'm not sure what exactly it is you are trying to achieve here. Different users getting there data from one table? or many? Each user has his own table? Is the user id saved in the table. What kind of data is added? etc.

AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
 

Are you trying to get the ID of the last transaction? The Unique ID?

- Jordan

JJCollins
Junior Poster in Training
67 posts since Sep 2010
Reputation Points: 14
Solved Threads: 10
 

hi,

yes exactly that the one i searching for but i dont know how to make it as a unique. my scenario is each and every time there is transaction i want to grab the file (SELECT statement) and update to different location of sql table. How do i do that because currently if the sql table(CUSTOMERTRANSACTION) already have 5 records (previous record from different transaction) and if let say a new user enter 4 records in the current transaction and this transaction will be stored in (CUSTOMERTRANSACTION) and i'll make current record stored in (CUSTOMERTRANSACTION)= 9 record (plus with previous record) but i want the current record which enter by current user to be stored in another table which mean each and every time if there is a transaction and that transaction will be updated in another sql table.

swathys
Junior Poster
183 posts since Sep 2010
Reputation Points: -7
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You