Forum Replies Created

Viewing 15 posts - 1,111 through 1,125 (of 1,346 total)

  • RE: Finding a zipcode

    Distance is a derived column, and you cannot use it in the where clause, It is okay in the order by though.

    Your code has some parsing error, but the example...

  • RE: Group by, Sum and condition

    Okay,

    So you want to aggregate by the stock id.

    but how do you want to calculate by the minimum amount which is a subscriber level attribute.

    the previous query returned

    1 34000

    1...

  • RE: How do I update top 10 in sql 2000?

    I don't know your table definition.

    But do you have a primary key on the table?

    if so

    UPDATE table_info

    SET q_active = '1'

    WHERE table_info.pkfield in (select top 10 pkField from table_info...

  • RE: Group by, Sum and condition

    In your example, how do you figure the result should b

    1 5400 ?

    in your query you should modify it to be

    SELECT     #tblTempRetros.Stock, #tblTempSubscriber.MinimumValue, sum(#tblTempRetros.Amount) AS iMin

    FROM         #tblTempRetros INNER JOIN

                         ...

  • RE: Updating and Cascade Delete Implementation Question

    I would implement some method of invalidating the question so it is not used on future tests, and is still visible when viewing older tests. and questions are only added...

  • RE: Decimals and formatting

    Another poster supplied the following script.

    Sorry cant find the thread to give credit.

     

     

    CREATE FUNCTION RemoveDecimalsWithoutRounding

    ( @InputValue Float

    , @Decimals Int

    )

    -- Get the rounded value

    DECLARE @ReturnValue Float;

    SET @ReturnValue = Round(@InputValue, @Decimals);

    -- If the value...

  • RE: Trouble getting values into a view

    You need to join once for each column using the same table.

    SELECT table1.ID, table1.Master_ID, table1.Firm_ID, table1.Message_Headline, table1.Message_Body,

           table1.Template, table1.Article1_ID, table1.Article2_ID, table1.Article3_ID,

           table1.Article4_ID, table1.Article5_ID, table1.Article6_ID,

           art1.title, art2.title, art3.title,...

  • RE: Tough Consolidation of Rows

    Nice.

     

  • RE: Removing Unused Space

    DBCC SHRINKFILE

        ( { file_name | file_id }

            { [ , target_size ]

                | [ , { EMPTYFILE | NOTRUNCATE | TRUNCATEONLY } ]

            }

        )

    Arguments

    file_name

    Is the logical name of...

  • RE: SQL server Script

    There are plenty of pieces and parts in the scripts section of this site, but what you are looking for is not there in a single script.

    http://www.sqlservercentral.com/Scripts/listscripts.asp?categorynm=Maintenance%20and%20Management%20&categoryid=1

     

  • RE: Passing a resultset from one SP to another

    Sure you could do it this way, but if xml doc does exceed 8000 characters, then you are in trouble, because you cannot declare @variable text within a stored procedure.

    Server:...

  • RE: Passing a resultset from one SP to another

    Declare @t Table is a temporary object, and if declared within the Calling procedure, it cannot be passed to a nested procedure.

     

    create procedure  TestpasstableParamChild @TitleType varchar(50), @TTable table (pk int...

  • RE: Simple verses Full Recovery Model Performance on updates

    I do not believe it will effect the performance where a user would see it.

    Recovery model will only pertain to how much information the t-Log holds, and helps you with...

  • RE: Correct install procedures

    What problems are you having exactly?

    How are you trying to connect to sql server?

    Do you have the proper credentials created in sql server?

    In sql server you need to grant a...

  • RE: Attaching Excel file and Selecting from it

    Not sure, perhaps your having compatibility issues with the version of excel, and version of the oledb you declared in the opendata source call.

    Post your code.

    What version of sql server,...

Viewing 15 posts - 1,111 through 1,125 (of 1,346 total)