Forum Replies Created

Viewing 15 posts - 511 through 525 (of 594 total)

  • RE: Dynamic WHERE clause problems

    I think the invalid object name error would be generated because either a) you have to properly qualify the temp table's name, or b) the temp table is not created...

  • RE: Date Selection

    This should get you started:

    DECLARE @Year INT

    DECLARE @Month TINYINT

    SET @Year = 2003

    SET @Month = 1

    SELECT * FROM TransTable

    WHERE DatePart(yy, TransDate) = @Year

    AND DatePart(mm, TransDate) = @Month

    SELECT * FROM TransTable

    WHERE DatePart(yy,...

  • RE: Dynamic WHERE clause problems

    In my second post, I got col IN (SELECT) to work fine. You just have to ensure that the variable is of the same basic type as the column...

  • RE: select columns by mask...

    Just list the columns you do want to display in the SELECT clause.

  • RE: Dynamic WHERE clause problems

    OK, understood. I know this is probably the last thing you want to hear, but, is there any way to possibly break the process into smaller chunks that can...

  • RE: Dynamic WHERE clause problems

    Is there a reason you can't use an IF BEGIN END block of code? Why not put this into a stored procedure:

    CREATE PROCEDURE DoSomething

    @list VARCHAR(1000) = NULL

    AS

    IF...

  • RE: Dynamic WHERE clause problems

    Supposing a table, Module, with a smallint field: ModuleCode, the following code works fine when var is set = NULL or to a smallint number:

    DECLARE @var smallint

    SET @var = 15

    SELECT...

  • RE: Data Types

    quote:


    It appears the VARCHAR field table takes up less space but will this equal better performance?


  • RE: Logic

    quote:


    How do I bring the join in if I am not including a column in the select?


  • RE: How to...

    If the client exposes an FTP server, use FTP to transfer the file from the client. Execute a batch script using a scheduled job in NT/2000. Also, you...

  • RE: Slow on query

    My best advice is to look at the execution plans for each query and try to identify if indexes are being used properly on each of the join columns. ...

  • RE: Number Formatting

    From Books On Line, you can find that the CONVERT function has a style argument. When converting from a money or smallmoney to a character datatype, pass in the...

  • RE: Slow on query

    One query, or all queries? Can you post some code?

  • RE: Unique Identifier..

    I don't believe so, because I believe the UID is partly generated from the NIC on each server, so since they all should have different NIC addresses, they should never...

  • RE: Table/Column Naming Conventions (Opinions Wanted)

    Good points you make, but I think you missed my point.

    If you make the field name "ID", then referencing TableName.ID makes perfect sense, even in joins, where it would be...

Viewing 15 posts - 511 through 525 (of 594 total)