Forum Replies Created

Viewing 15 posts - 13,486 through 13,500 (of 14,953 total)

  • RE: Is there any way to use a field value as part of a SELECT statement?

    You can do something like this:

    select *

    from Table1

    where

    (MyModifier = 'or' -- OR statement

    and

    MyColor1 = 'Blue'

    or

    MyColor2 = 'Blue')

    or

    (MyModifier = 'and' -- AND statement

    and

    MyColor1 = 'Blue'

    and

    MyColor2 = 'Blue')

    But it's not going...

  • RE: Comma delimitted list for In clause

    Yes, the coalesce function, used that way, will give you the list you want, but you can't use the list the way you mentioned in the original post.

    create table #t...

  • RE: Changing all records of a user, but the first one

    Here's a test I did. It should do what you need, once you modify it with your actual table and column names.

    create table #T (

    ID int identity primary key,

    FName...

  • RE: The Software Comparison - Part 4

    I do think programming is an engineering discipline. So is database administration. (Backups = changing the oil, that kind of thing.)

    I also don't think software development is mature...

  • RE: BETWEEN

    I thought the question was clear enough. Good test of how Between works, which is all it seemed to me to be about.

    I think some may have overthought it....

  • RE: Query

    RedGate has a test data generator. Check their site for it (link at top right of this site).

  • RE: Stored proc Execution Plan questions

    Saving the view probably caused the proc to recompile its execution plan.

    I generally try to avoid using views in most procs.

  • RE: Performance help

    Try this:

    ;WITH

    ProdCat (ProdID, CategoryID) as

    (SELECT productID, min(categoryID)

    FROM dbo.CSK_Store_Category

    GROUP BY productID),

    ChildCats (CatID, ParentID) as

    (SELECT categoryID, null

    FROM CSK_Store_Category WITH (NOLOCK)

    WHERE categoryID = 42

    UNION ALL

    SELECT t2.categoryID, t2.parentID

    FROM CSK_Store_Category t2

    INNER JOIN...

  • RE: Strange Clustered Index Update

    I've tried to duplicate this behavior from the description given, but can't. So I guess I'm not sure what would cause it.

  • RE: Running Stored Procedure from Access

    There are several ways to run a proc from Access to a different database. One is to create a VBA script that will run the proc. Another is...

  • RE: SQL Query / Data export applications

    That sounds a lot like something that could be done quite easily with Reporting Services. That comes with SQL Server.

  • RE: Performance help

    Can you post the code for that function?

  • RE: Derived table Help

    That helps.

    Are you looking for the number of visits per year per person, or total visits per year divided by total people, or total visits per year divided by people...

  • RE: How to view a variable in run mode

    Ah, that's different!

    In the "Execute SQL" object, it has a parameters tab. Set up a variable to store the output, assign it to the output parameter, and make sure...

  • RE: Installation of Workstation tools, etc

    Probably not a problem with the download. Usually, if those are corrupted, you get an error message when it's downloading. (I have install disks, with fancy packaging and...

Viewing 15 posts - 13,486 through 13,500 (of 14,953 total)