Found few ideas.
To those who are interested here are the links:
http://jdj.sys-con.com/read/36169.htm
http://www.theserverside.com/patterns/thread.tss?thread_id=220
By the way, what if I don't use SP but use it as a query from my code? The way I see it it doesn't matter since the SQL Server will synchronize the requests and the SCOPE_IDENTITY() will protect me from getting the wrong number. What do you think?
Thank you Borislav I couldn't ask for a clearer explanation.
So, if I understand correctly, the "safest" one to use would be SCOPE_IDENTITY. Am I right?
By the way, what is BOL? :)
Hello Borislav,
Thank you for your response. I need this table in order to manage keys in my application. At the moment I use dummyString as another column for the INSERT, I jest thought it is possible to drop it.
Anyway, regarding your code: suppose multiple users are using this query, Am I...
Hello,
I have a table with two columns: One is an identity and one is dummyString.
I would like to create a Stored Procedure which will make an INSERT to this table and than return the identity of the row that was just inserted. How do I do that?
And by the way, is it possible to make an INSERT...
Hello,
I need to manage a certain BigDecimal class member in a web application which will not be destroyed. This class member represents a key in a database which from few reasons I would like to manage on my own and I don't use EJBs.
In order to implement that, I have created a private static...
Hello,
Until today I had Windows XP + .NET framework I have installed for the use of few programs. Today I installed SP2. My question is if the SP2 includes the .NET framework inside it and I can remove the seperate installation I have at the PC?
I understand. Ans one more question please: It is working with LEFT JOIN as well, so why do I need the LEFT OUTER JOIN for and what is the difference between it and the LEFT JOIN?
I don't have WHERE clause but I did some more research regarding the data. Consider it looks like thias at the table:
tankNumber caseNumber
---------- ----------
1 1
1 3
2 1
2 2
2 3
Now, consider I would like...
Hello,
Consider this simple query:
SELECT number1, number2
FROM NUMBERS LEFT JOIN ITEMS
ON NUMBERS.number1 = ITEMS.number2
Now, suppose NUMBERS Contain numbers from 1 till 10 for each year it has and ITEMS contains numbers from 1 till 9 for each year it has. I would expect the result to...
Hello again George,
I have a problem with the query:
Select @Missing = @Missing + Convert(VarChar(20), Numbers.N) + ','
From Numbers
Left Join @Temp T
On Numbers.N = T.CaseNumber
Where T.CaseNumber Is NULL
And Numbers.N Between @Min And @Max
It's very wierd but it...
Hello George,
I think I am missing the Numbers table part.
Consider that this SP is being activated by another SP many times. Do you mean I need to create such Numbers tables for each invocation of these SP? What is the range of these numbers and how do I set it? I will be happy if you could...
Hello,
I have a certain Stored Procedure which process large amount of records. The SP is doing what it suppose to do OK but it is taking it long time to do it. Of course, part of the "blame" is the large amount of data but I think my SP implementation can be improved. Can someone here help me...
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.