September 11, 2012 at 3:51 am
i wan to fetch newly added record in table .how to write query for that .
September 11, 2012 at 4:01 am
how do you identify the latest record, do you have a timestamp or identity column on the table?
September 11, 2012 at 4:02 am
are you saying that every time a row gets inserted into a specific table then insert the value into another table? if so then look up triggers
***The first step is always the hardest *******
September 11, 2012 at 8:39 am
snadsul (9/11/2012)
i wan to fetch newly added record in table .how to write query for that .
This is entirely too vague to provide an answer. There are a number of ways this can be accomplished but they all depend on the context and what you really want. One thing you need to keep in mind is that there can be multiple rows inserted at the same time.
Give us some details and we give you some answers.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply