Forum Replies Created

Viewing 15 posts - 9,121 through 9,135 (of 13,460 total)

  • RE: Is it possible to change the default trace settings

    Here's a script that will create a procedure to help you script out any existing trace on the server; with that, you can tweak the script to make a NEW...

    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: Export SQL Server 2005 Table to Excel 2007 using T-SQL

    just hazarding a guess here, but could it be your SQL instance is 64 bit and the drivers are only 32 bit?

    anthony.ventura (7/6/2010)


    Hi, new to the forum, and have a...

    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: xp_cmdshell

    don't put the drive in it, only the path:

    'c:\OutputConsistencia_'+@DB+'.txt'

    gets turned into :'c:\c:\OutputConsistencia_SandBox.txt'

    use '\data\OutputConsistencia_'+@DB+'.txt' to put it in a sub folder off of the root od the drive, for example, or...

    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: xp_cmdshell

    river i am sorry; you are correct...if there is an error, NO_INFOMSGS returns them;

    here's the results you asked for...4 lines referencing jsut the single table that has the issue...the other...

    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: xp_cmdshell

    river, the way i read the NO_INFOMSG parameter is no results at all...seems ideal for an unattended job, but if you want results, i think you need to...

    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: Jobs Script

    i did an sp_helptext sp_MSget_jobstate, which targets a single job....

    inside there seems to be this command, which reveals a bit about any jobs, i think:

    EXECUTE master.dbo.xp_sqlagent_enum_jobs 1, 'dbo'

    hope that helps.

    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: xp_cmdshell

    steve your example would just return the results from the cmd prompt; I think the original poster wanted to capture the results of his dbcc command in both a table...

    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: Enforce constraint?

    Jules you can do it with a check constraint and function, but that would force a logical requirement: the first fk_id in the series

    must have it's bit_1 with the value...

    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: Multiple questions about Database Mail

    you are pretty much on target as far as profiles being a container; they are also a handy reference for which email account to use;

    on my server, i have 4...

    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 to use a function in a query?

    well...this does what you wanted, but look at the results based on your sample data....it's appending a bunch of CASE WHEN statements and stuff....is that what you wanted?

    this statemnts uses...

    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 to use a function in a query?

    i think your function is not compiling because it is refering to a misspelled schema:

    db0.ts_exp_def_detail

    instead of

    dbo.ts_exp_def_detail

    ..extra pair of eyes....forest thru the trees and all that stuff

    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 to use a function in a query?

    Gabor there are two kinds of functions...scalar functions and table valued functions.

    if you call a table-value-function as if it were a scalar, you'd get the error you received.

    a TVF is...

    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: Trigger help

    there may be more to it, but based on what you posted, it looks to me like the table TEAM.DBO.HEADER_LOGS could be replaced by a view which gets the rollup...

    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: query each table in list of table names

    try this proc...it will generate some SELECT statements to help you find the data, which you can easily change to DELETE statements after review, or help you to decide to...

    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: Trigger help

    here's my best guess, but i'd really need the actual table definitions and sample data, along with expected output/example to really give a decent answer.

    ALTER TRIGGER

    ...

    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 - 9,121 through 9,135 (of 13,460 total)