Forum Replies Created

Viewing 15 posts - 316 through 330 (of 346 total)

  • RE: Table Lock

    I think this can be done by using locking hints for the update/insert statements...

    To use the table hints the insert/update statements within the stored procedure can be written as :

    Insert...

  • RE: Selecting data within data

    I think the charindex function can be used to compute varying lengths...something like this :

    Select Substring(@X,charindex('-',@X),Charindex('-',@X,Charindex('-',@X)+1)-charindex('-',@X))

    a little messy - I think there should be a better way to do this...

    basically...

  • RE: xp_sendmail rearranges Print and Select

    would storing the results of the select in a temp variable and printing that temp variable result in any changes...??

    i.e something like :

    Declare @Ctr Int

    SELECT @Ctr = Count(*) from customers

    Print...

  • RE: Handling The Text Data Type

    I found the following in SQL 2000 BOL :

    "SQL Server 2000 supports a new text in row table option that specifies that small text, ntext, and image values be placed...

  • RE: Use Results from a Cross Join for dynamic SQL

    and no prizes for guessing....

    *couldn't resist that*

  • RE: Use Results from a Cross Join for dynamic SQL

    I assumed it would be something like "find all respondents for a particular product combination" or "find total value for a particular product combination" and similar things...

    unfortunately not the first...

  • RE: Use Results from a Cross Join for dynamic SQL

    now based on my understanding of the problem you have a view that is something of the type

    col1 col2 col3

    a      b      c

    a      c      b      i.e the product combinations...

    and then you have the responses table with...

  • RE: adding new columns in run time

    I think you need to use dynamic SQL to get this done at runtime...

    something like this :

    Declare @Sql NVarchar(500)

    Declare @v Char(1)

    SET @v = 's'

    SET @Sql =...

  • RE: Help need

    I think this query should work out...

    and you should check out this excellent script by Antares on pivot tables http://qa.sqlservercentral.com/scripts/contributions/204.asp

    SELECT

    FundSourceName,

    SUM(CASE [Quarter] WHEN '1' THEN Amount ELSE 0...

  • RE: Handling The Text Data Type

    Excellent article on the TEXT datatype...since I have a few Text fields in my database I was badly in need of an article like this for quick reference...

    I especially liked...

  • RE: Expressions and aggregate function in SELECT list

    I think you might be able to get by with a derived table...i.e put in the aggregate function in the derived table and join it up with the original query....

    this...

  • RE: import_failure

    Hi,

    How about setting the colum type for this column as something like varchar(20) during import and then using the convert(datetime) function to convert this varchar value into a datetime value...

    --...

  • RE: An automatic incremental number for sub-division

    Hi mgutzait,

    The way I see it - you need to have a increment value that starts from 1 for each division value...

    When the table is created just give the default...

  • RE: For the love of...

    I think some testing should (hopefully) help in figuring out what is happening...

    a)create another table with the same structure as the table in which the double inserts are occuring and...

  • RE: Late in the day query help requested

    Hi Greg,

    the 3 stars are the plus sign - for some reason the plus sign doesnt appear in my machine here...

    and Antares' query is faster...why am I not surprised...

Viewing 15 posts - 316 through 330 (of 346 total)