Viewing 15 posts - 151 through 165 (of 375 total)
One correction to your pseudo code
update tbl set seq = tbl.seq + 1 where seq > 2
Should be
update tbl set seq = tbl.seq + 1 where seq >= 2
because you...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
March 18, 2009 at 12:26 pm
I would keep it simple. Deal with one record at a time. If your Stored Procedure is designed to work fine with one record you can call it sequentially with...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
March 18, 2009 at 12:21 pm
The Identity field is not going to be created out of sequence. But two records next to each other could have the same creation time. You have to realise one...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
March 18, 2009 at 11:22 am
Just
UPDATE
sequence = sequence + 1
WHERE sequence >= @Sequence
and then insert your new record.
You do not need a loop for this
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
March 18, 2009 at 11:05 am
What is the front end to this? A web application? What I do not understand is if the calls are made sequentially or not. If the calls are made sequentially...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
March 18, 2009 at 10:58 am
Lynn Pettis (3/18/2009)
foxjazz (3/18/2009)
{} is much better than BEGIN BEGIN BEGIN BEGIN END END END END
For you, perhaps. I find BEGIN END just fine. Remember I did come...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
March 18, 2009 at 10:43 am
I think the editor should automatically translate the less then and more then into HTML escape sequences. I do not use HTML that frequently to remember all the escape sequences....
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
March 18, 2009 at 8:51 am
salesMonth lessorequal @month and YTD = 0 OR salesMonth = @month and YTD notequal 0
S....:angry:
I am having problems with posting the correct code so I used words lessorequal and notequal...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
March 18, 2009 at 7:48 am
salesMonth 0
The bolded code should be like this. For whatever reason the forum's editor messed up the code when it got posted.
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
March 18, 2009 at 7:45 am
select x.salesYr, x.Group from (select salesYr,
CommericalSales = ISNULL((Select (SUM(Sales) from tblsSales where group = 'Commercial' and salesYear = y.SalesYear
and ( salesMonth 0 )
and Pending = @PendingDeals)),0),
ResSales...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
March 18, 2009 at 7:41 am
Yep, I do not see the logic behind this as well so it is hard to give a valueable answer. I noticed that most issues people have with the SQL...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
March 18, 2009 at 7:36 am
Are you dealing with INTs or it was just an example.
I am assuming it was just an example and that you are going to be using DECIMAL or something of...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
March 18, 2009 at 7:33 am
I do not know if Jack's suggestion is going to work for you because it does not look from the presented sample data like the pairs are tied up by...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
March 18, 2009 at 7:20 am
I think it is better to have VS2003 to do the formatting. You have at least the following options: You can use the ToShortDateString method (which will use the Windows...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
March 17, 2009 at 12:26 pm
foxjazz,
You are like this guy who learnt how to use a hammer. For him the only way to join two pieces is by using a nail. He does not grasp...
---------------------------------------------
[font="Verdana"]Nothing is impossible.
It is just a matter of time and money.[/font]
March 17, 2009 at 11:15 am
Viewing 15 posts - 151 through 165 (of 375 total)