Forum Replies Created

Viewing 15 posts - 31 through 45 (of 272 total)

  • RE: use with dynamic sql

    It works for me.

    How are you calling it?

  • RE: Multiple Select statements for insert into table

    It would help to have your DDL and sample data in consumable form. I only put in the ItemID and Lcount for my sample. Here's a simple attempt:

    CREATE...

  • RE: Being Responsible for Code

    I would hope that similar metrics are tracked of code/peer reviewers and QA/UAT as well.

    Also, I would hope that success is tracked and rewarded as well as failure. X-number...

  • RE: How to create dynamic function

    A simple example of dynamic sql in a procedure :

    CREATE PROCEDURE DynamicSelectExample

    DECLARE

    @Database SYSNAME = 'snafu',

    @Tablename SYSNAME = 'foobar',

    @Condition...

  • RE: If proc1 calls procB, can proc1 complete without waiting for procB?

    Another possibility is to use batch processing, such as SQL Agent or Control-M. Jobs can execute stored procedures asynchronously if needed.

  • RE: SP

    There are a number of features in T-SQL that are not ideally utilized within, but would be better if implemented in a CLR. We can add "recursion" to the...

  • RE: Sql Query to find invalid SSN Numbers

    WHERE ssn NOT LIKE '[0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]'

    will check that all data is numeric with the dashes in the right place. Beyond that, you need to specify any other validation rules.

  • RE: Altering a Column

    Great question. I love these kinds of questions because I always learn something.

    BOL is not always correct, so I've come to not trust it and always test when the...

  • RE: sp to create date table

    Is there a reason why you create the calendar table daily?

    Calendar tables are usually fairly static, with occasional added columns for various indicators. My calendar table was created almost...

  • RE: How to create dynamic function

    opc.three (4/24/2012)


    Steve Cullen (4/24/2012)


    If the only thing that changes is the database name, you could create a synonym. I wouldn't do that in a function, but you could do...

  • RE: How to create dynamic function

    If the only thing that changes is the database name, you could create a synonym. I wouldn't do that in a function, but you could do that in a...

  • RE: Bad Performance Of a Query Using View

    Just guessing without the query, but the optimiser cannot accurately estimate the number rows returned because of some logic in a where clause or join condition.

  • RE: Social Media and Interviews

    Employers are concerned with several issues related to social networking. One issues is that some employees tend to write their grievances on social networking sites in what feels like...

  • RE: Need help with query to find out which sprocs that reference another db

    You can search the definition column in the sys.all_sql_modules view with something similar to this:

    SELECT OBJECT_NAME(object_id) FROM sys.all_sql_modules

    WHERE definition LIKE '%Database_A%'

    This won't limit the results to database references (or procedures...

  • RE: Filtering rows from one table.

    I can't give you specifics because your question doesn't include any concrete examples that match your question.

    However, the general approach is to outer join the two tables on some condition...

Viewing 15 posts - 31 through 45 (of 272 total)