Forum Replies Created

Viewing 15 posts - 646 through 660 (of 2,894 total)

  • RE: Time Problem

    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)...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: sqlcode vs sp

    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...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Counter inside SELECT

    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.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Asking If I can Create a table for prices

    schon0008 (3/6/2013)


    Hi,

    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...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: best way to transfer data

    monilps (3/5/2013)


    Hi,

    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...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: How to uncommit the transaction and execute the next statement in the cursor?

    prakashr.r7 (3/5/2013)


    Eugene, I forgot to tell this functionality.....

    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...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: How to uncommit the transaction and execute the next statement in the cursor?

    prakashr.r7 (3/5/2013)


    Yes, Eugene, I did a mistake by using cursor....This one is very simple.. but how can i modify this set based operation to generate 2 character, 3, 4 and...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: How to uncommit the transaction and execute the next statement in the cursor?

    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')

    ...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: How to uncommit the transaction and execute the next statement in the cursor?

    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...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: How to maintain two digit values in sp?

    Jeff Moden (3/4/2013)


    Charmer (3/15/2012)


    SQLKnowItAll (3/15/2012)


    The first problem is that @DecNumber is a BIGINT. You cannot store characters in BIGINT. First you need to change this to CHAR(2) or...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: How to uncommit the transaction and execute the next statement in the cursor?

    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) ...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: How to uncommit the transaction and execute the next statement in the cursor?

    ....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,...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: How to uncommit the transaction and execute the next statement in the cursor?

    prakashr.r7 (3/4/2013)


    First of all, Sorry Eugene...i am not a native speaker of english...so bare with me

    yes..Eugene....generating 36 and skipping the the next incoming rows...since we can not generate more than...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: How to uncommit the transaction and execute the next statement in the cursor?

    prakashr.r7 (3/4/2013)


    Eugene,

    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...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Question on Replication..

    ...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...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

Viewing 15 posts - 646 through 660 (of 2,894 total)