Forum Replies Created

Viewing 15 posts - 4,051 through 4,065 (of 13,460 total)

  • RE: Trigger to insert into a new table from a deleted row.

    search for "Audit Triggers" on this site...there's a lot of articles and examples:

    here's the first article i found, and i reviewed it to confirm it has a decent example:

    http://www.sqlservercentral.com/articles/Triggers/auditingtriggers/579/

    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 list all tables with their schemas in a database?

    it's all in sys.tables, but i prefer to use built in functions instead of joining sys.schemas:

    SELECT

    SCHEMA_NAME(schema_id) As SchemaName ,

    name As TableName

    from sys.tables

    ORDER BY...

    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: Database Mail Stopped Working

    the error "The specified string is not in the form required for an e-mail address.)" sounds like someone sent "Lowell" to the exchange server, and not lowell@somedomain.com.

    For not sending at...

    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: Run select statement across all databases

    oops sorry; the first quesiton mark should be in quotes:

    sp_msForEachDb

    'If EXISTS(SELECT 1 FROM [?].sys.tables WHERE name = ''t_payers'')

    select ''[?]'' As DbName,* from [?].dbo.t_payers where pay_name = ''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: Run select statement across all databases

    sp_msForEachDb

    'If EXISTS(SELECT 1 FROM [?].sys.tables WHERE name = ''t_payers'')

    select [?] As DbName,* from [?].dbo.t_payers where pay_name = ''Name of Payer''; '

    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: using int variable with like

    just missing your concatenation:

    where CAST(o.OrderID AS varchar(15)) like '%' + @WildOrderID '%'

    --should be

    where ...

    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: Scroll bars missing in some data tables

    never heard of MP2 either, but I know most applications are data-size aware...if the content isn't too big, scroll bars are not needed, so they are not displayed;

    is it possible...

    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: An oddball survey, seeing as I'm looking at a new car...

    in my youth, i owned plenty of GM, Fords, even a Dodge or two...back then all i could afford was used cars, which are usually someone elses problem they got...

    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 have Trigger's example after insert send to mail on outlook?.

    Craig I think that was true with SQL2000, and the old SQL Mail, but the 2005 and above database mail via msdb.dbo.sp_send_dbmail is already an asynchronous service broker item,...

    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: Encryption noob with a table design general question

    ahh sorry i misunderstood.

    for me, encrypted or not, it just goes to whatever normalization is proper for the data;

    Basic normalization considerations for me would be:

    data is 1:1 and...

    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: Encryption noob with a table design general question

    the purpose of encryption is to not store the data unencrypted at all, storing it both ways makes sense during the testing/development phase, but not after you've proved the encryption...

    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: create table script generation

    if you've gotta do it via TSQL, instead of stepping out via SMO to get it , i've spent a lot of time refining a few stored procedures to do...

    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: Fastest way to count total number of rows...

    i thought you had to get the actual counts from sys.indexes; since the index must have a heap/PK index for every table, teh row counts are materialized exactly correct there:

    SELECT...

    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/import error

    lg123 (1/31/2013)


    One of the columns was nvarchar2(255). How do I successfully transport such kind of tables from SQL Server to Oracle? Please suggest.

    well there's only two solutions:

    1. modify the Oracle...

    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: Using database mail - risky

    relaying is sending emails to addresses that the SMTP server doesn't actually administrate itself.(ie gmail.com forwarding to yahoo.com)

    Also remember there are two kinds of relaying:

    anonymous relaying and relaying for an...

    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 - 4,051 through 4,065 (of 13,460 total)