Forum Replies Created

Viewing 15 posts - 2,986 through 3,000 (of 13,460 total)

  • RE: Any Catalog view to find objects referred in other database in dynamic query

    this query specifically gives me the server/database/table/column that was used int eh output list of the query.

    maybe this gets you what you were looking for?

    i had to create a linked...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: update records based on condition

    UPDATE SomeTable

    SET Column =

    CASE

    WHEN condition = 'HF'

    THEN SomeCalculationOrValueOrColumn

    WHEN condition2 = 'AST'

    THEN ADifferentCalculationOrValueOrColumn

    END

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Any Catalog view to find objects referred in other database in dynamic query

    AFAIK there's no view that would capture references in dynamic queries DIRECTLY;

    you could look at cached execution plans, and parse the xml of the plan for server/database/schema/table; but that's only...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Capture stored procedure/queries from SQL Profiler

    huum (8/2/2013)


    Sorry i mean date and time it Ran?

    i don't think you can find that, AFAIK all you can find is the last execution time; you cannot see , for...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Easy (I hope) join question

    I just noticed every one of us skipped over a basic group by as an alternative, and went straight to row_number.

    this is probably the simplest:

    SELECT

    name,

    ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Linked server restirction

    no, there are no events for triggers to capture that affect linked server access.

    sundar329 (8/2/2013)


    is it possible with some triggers

    in the screenshot above, if they are not mapped, they have...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Linked server restirction

    sundar329 (8/2/2013)


    hi friends,

    Is there a way to restrict linked server access for a particular login in sql server 2008r2.

    Thanks in advance.

    yes.

    on this screen of the linked server properties, simply make...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Linked server restirction

    moved to original post.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How is free space in a database re-used after deleting data?

    azenon (8/2/2013)


    Hi All,

    I have 80gb of free space in a database after unused tables/index and old table data was deleted. I am hoping the data file size does not...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Capture stored procedure/queries from SQL Profiler

    i have this saved in my snippets as the top 20 slowest performaning queries;

    this might get you started:

    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

    SELECT TOP 20

    CAST((qs.total_elapsed_time / 1000000.0) AS DECIMAL(28,2)) as...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: What is the easiest way to alter fields' default

    ok, you have a requirement that is a little scary for me (ALL bit flas no matter what/all varchars no matter what)

    *note this is changing ALL CURRENT DEFAULT VARCHAR FIELDS...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: What is the easiest way to alter fields' default

    halifaxdal (8/2/2013)


    Thanks.

    Then how do I loop each field and find if there is a constraint on it? and get the constraint's name if I have to put the name there...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: What is the easiest way to alter fields' default

    basic example:

    CREATE TABLE [dbo].[SALESDATES] (

    [ID] INT IDENTITY(1,1) ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: What is the easiest way to alter fields' default

    halifaxdal (8/2/2013)


    I have a database with tables to be updated so that all varchar fields will be given a default '' value and all bit fields will be given 1

    I...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Table Level Mask

    i'm not sure what you are after here, might need a little clarification.

    Are you talking about Data Masking like this article? Where you obfuscate/replace sensitive data on a copy of...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 2,986 through 3,000 (of 13,460 total)