Forum Replies Created

Viewing 13 posts - 136 through 149 (of 149 total)

  • RE: Get all fields names for all tables in SQL

    For SQL 2005+, use the built in information schema views.

    SELECT TABLE_CATALOG

    , TABLE_SCHEMA

    , TABLE_NAME

    ...

    Wes
    (A solid design is always preferable to a creative workaround)

  • RE: Trying to join 3 tables from different servers

    Assuming your indexes are appropriate for your query;

    Create a view to pre-filter your data on the remote server. Ideally, create a single view that has all of the joins...

    Wes
    (A solid design is always preferable to a creative workaround)

  • RE: Trying to join 3 tables from different servers

    You need to use the same collation for both sides of your comparison.

    In your situation, one server ignores accent marks when comparing, the other includes accent marks in the comparison.

    If...

    Wes
    (A solid design is always preferable to a creative workaround)

  • RE: Usage of CTE - Trick with Dates

    One other thing:

    Please note that I have used TOP 100 PERCENT in the SELECT statement in this function because I want to retain the ORDER BY clause, which is otherwise...

    Wes
    (A solid design is always preferable to a creative workaround)

  • RE: Usage of CTE - Trick with Dates

    If "Show Actual Execution Plan" is set prior to executing the code and then both the queries (the CURSOR based one and the recursive CTE based one) are executed, you...

    Wes
    (A solid design is always preferable to a creative workaround)

  • RE: Rename Foreign Key Constraints

    Be aware the Print command will only display approximately 8000 characters of text.

    Use the following script if you are scripting foreign keys for the entire database and need...

    Wes
    (A solid design is always preferable to a creative workaround)

  • RE: Search for String in all columns

    --*********************************

    --Show progress on the message tab

    --*********************************

    PRINT @sql

    PRINT 'Column ' + CAST(@LoopNo AS NVARCHAR(5)) + ': ' +@Schema + '.' + @Table...

    Wes
    (A solid design is always preferable to a creative workaround)

  • RE: Search for String in all columns

    Glad to hear it.

    I've already made a few minor revisions to it that I'll try to post a bit later when I have some time.

    Wes

    Wes
    (A solid design is always preferable to a creative workaround)

  • RE: Determine unique combinations of permissions assigned to users

    @dwain.c

    Excellent, that is just what I needed.

    After working with it for a bit this morning, I've determined I need to assign the groups string in a checksum rather...

    Wes
    (A solid design is always preferable to a creative workaround)

  • RE: Dynamic Grouping in SSRS Reports

    I've used a slightly different approach for dynamic grouping. Instead of setting the grouping expression to a parameter, I define calculated fields in the dataset named simply Group#.

    I have...

    Wes
    (A solid design is always preferable to a creative workaround)

  • RE: VARCHAR TO DATE

    DECLARE @ImportDate VARCHAR(8) = '10122012'

    SELECT CAST(

    RIGHT(@ImportDate , 4) + --Year

    SUBSTRING(@ImportDate , 3 , 2) + --Month

    LEFT(@ImportDate , 2) --Day

    AS DATE)

    Wes
    (A solid design is always preferable to a creative workaround)

  • RE: MDX query help IF/IIF statement

    @status is a report variable that determines if I need to filter by open date or resolved/closed date. @status is not contained in the cube.

    Wes
    (A solid design is always preferable to a creative workaround)

  • RE: NoLock performance question

    Thanks for the reply. I'd prefer to remove them also, but I have to justify changing script that has been working in production without a problem.

    How does NoLock affect...

    Wes
    (A solid design is always preferable to a creative workaround)

Viewing 13 posts - 136 through 149 (of 149 total)