Forum Replies Created

Viewing 15 posts - 691 through 705 (of 2,894 total)

  • RE: Using the While loop to create temp tables based on a list table

    [

    ...

    Im guessing Im going to have to go for adding them into a permanent table rather than a temp if IDENTITY go this way?

    That is exactly what I've been talking...

    _____________________________________________
    "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: Using the While loop to create temp tables based on a list table

    Abu Dina (2/25/2013)


    Quick and dirty method 😛

    create table #SSC(ID INT IDENTITY (1, 1), Code CHAR(1))

    insert into #SSC

    select 'A' union ALL select 'B' union all select 'P' union all select 'V'...

    _____________________________________________
    "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: Using the While loop to create temp tables based on a list table

    question: do you want to generate just a code, so you can use it somewhere else or you want it to be a part of some procedure, so temp tables...

    _____________________________________________
    "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: Using the While loop to create temp tables based on a list table

    To create the number of tables dynamically you will need to use dynamic sql (using sp_executesql or EXEC ()). However, it will not work for you, as temp tables created...

    _____________________________________________
    "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: Rows being dropped in query

    We have no idea what data you have in your tables, so only the guess:

    You join on dates, so it may be that some dates in your expected data are...

    _____________________________________________
    "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: Slow Recursive CTE

    I still could not run your CTE due to type mismatch error. (I guess when you do CHAR concatenation in the recursive CTE you should cast to NVARCHAR). However,...

    _____________________________________________
    "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: Slow Recursive CTE

    One of the reason you don't have much of answers is that your posted code cannot be executed without error...

    INSERT INTO FreightContents VALUES('FJ#1000210','104001-00-3')

    ...

    results with error:

    Msg 213, Level 16,...

    _____________________________________________
    "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: int column gets value of 0 by default

    Are you sure that there is no default on the column?

    sp_help [yourtablename] to see ones.

    How your application is talking to DB, are you using N-Hibernate by any chance?

    _____________________________________________
    "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: Please help my carrer Path?

    gopilqs (2/13/2013)


    Hi Guys,

    Any one Help my career Path?

    Corently am Working with capgemini india Pvt Ltd. on Mainframe technology, I have 4 years of Exp in mainframe Technology.I Would like to...

    _____________________________________________
    "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: Need Help in Converting Rows to Columns

    If it's really URGENT, then you better to present your issue in a way it could be quickly addressed. Please have a read tips from the link at the bottom...

    _____________________________________________
    "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 can we Group at particular set of records which come in a Sequence , If the sequence changes it would add the records to a new group.

    just small change to get record with MAX(Forecast), more sample data added:

    DECLARE @t TABLE(L1 INT,L2 CHAR(1), L3 CHAR(1), dt Date, Forecast NUMERIC(10,5))

    INSERT INTO @t(L1,L2,L3,dt,Forecast)

    VALUES

    (1, 'a', 'x', '01-dec-2012', 7.2),

    (1, 'a', 'x',...

    _____________________________________________
    "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 can we Group at particular set of records which come in a Sequence , If the sequence changes it would add the records to a new group.

    First of all I can suggest you to read article from the link found in the bottom of my signature. It will help your question to be answered by other...

    _____________________________________________
    "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: Cumulative SUM by HOUR for specific DATE range

    Could you please provide DDL and insert sample data script? Tips how to do so are in the link at the bottom of my signature.

    _____________________________________________
    "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: UNION vs OR --> NP-Complete Problem

    ScottPletcher (2/7/2013)


    Eugene Elutin (2/7/2013)


    ScottPletcher (2/6/2013)


    No, I wouldn't use OR just because that makes a view updateable -- UPDATEs aren't typically done using views like that anyway.

    What is the problem with...

    _____________________________________________
    "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: SQL update problem

    Welcome to the forum.

    I would strongly suggest you to read the tips from the link at the bottom of my signature.

    Following the above, will help you to post...

    _____________________________________________
    "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 - 691 through 705 (of 2,894 total)