Viewing 15 posts - 646 through 660 (of 2,894 total)
declare @t table (dt datetime)
insert @t values ('2013-03-02 13:40:00'),
('2013-03-02 14:00:00'),
('2013-03-02 14:20:00'),
('2013-03-02 14:30:00'),
('2013-03-02 14:50:00'),
('2013-03-02 15:00:00'),
('2013-03-02 17:00:00')
;with t as (select dt, ROW_NUMBER() OVER (ORDER BY dt) rn from @t)
select t1.dt, DATEDIFF(minute,t2.dt, t1.dt)...
March 7, 2013 at 10:13 am
If you don't use any ORM in our application, then you better place all your SQL code into stored procedures.
There are no standard rules which specify where to use...
March 7, 2013 at 8:53 am
As you provided very limited details of your requirements I can suggest you reading this:
http://www.sqlservercentral.com/articles/T-SQL/68467/
This method may work for you.
March 7, 2013 at 8:46 am
schon0008 (3/6/2013)
I wanna ask if I can put just one table for both prices an cities.
In the beginning I created just table Product, but I have two different...
March 7, 2013 at 4:51 am
monilps (3/5/2013)
I have two tables (one is main table and another one is staging table)
Ex: tableA (contains 1.2 billion rows, trigger for arrival timestamp for insert and update and non...
March 5, 2013 at 10:47 am
prakashr.r7 (3/5/2013)
For example, if we have 150 rows to be updated with two character values, first we have to update PnxCodeValue feild with 99,98,97,...10...
March 5, 2013 at 6:28 am
prakashr.r7 (3/5/2013)
March 5, 2013 at 6:25 am
and a variation with single update...
;WITH newCodes
AS
(
SELECT v, ROW_NUMBER() OVER(ORDER BY (SELECT NEWID())) vp
FROM (VALUES ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9')
...
March 5, 2013 at 4:45 am
prakashr.r7 (3/5/2013)
Sorry, but I don't.
I have asked what should happen with rows which cannot have unique on-character code set as all unique values already were used. Should such rows...
March 5, 2013 at 4:35 am
Jeff Moden (3/4/2013)
Charmer (3/15/2012)
SQLKnowItAll (3/15/2012)
March 5, 2013 at 4:13 am
prakashr.r7 (3/4/2013)
Eugene Elutin (3/4/2013)
....and remaining rows with random unique values...
and if you have more than 36 (or, as per your sample which already contains two of one-char codes, 34) ...
March 5, 2013 at 4:06 am
....and remaining rows with random unique values...
and if you have more than 36 (or, as per your sample which already contains two of one-char codes, 34) rows remaining,...
March 4, 2013 at 10:35 am
prakashr.r7 (3/4/2013)
yes..Eugene....generating 36 and skipping the the next incoming rows...since we can not generate more than...
March 4, 2013 at 9:25 am
prakashr.r7 (3/4/2013)
I can generate unique values....what i am asking is " How do you generate unique values for 40 rows ? " We can generate upto 36 right? How...
March 4, 2013 at 8:55 am
...But in order to do replication the subscriber should be able to connect to the publisher??? I am confused. Can I set up replication between two disconnected servers.???
I am also...
March 4, 2013 at 8:50 am
Viewing 15 posts - 646 through 660 (of 2,894 total)