Forum Replies Created

Viewing 15 posts - 10,006 through 10,020 (of 14,953 total)

  • RE: store proc

    Tara (4/9/2009)


    GSquared

    Your proc looks good but i get some errors as

    Not all users can use select from sys.databases and so i want to exec proc as an id...

  • RE: need help about a tabel tweak: maybe it is about pivot

    ";WITH" sets up a "CTE" (Common Table Expression). I used that to put a Row value into the data, so I could query that in my Where and Join...

  • RE: Searching (_) underscore in a Column

    Did you forget the "escape" part in the actual query, or just in the forum?

  • RE: count rows of a query result

    Couple ways to do it. First, you could just add an "alias" to the query you already have. Do that by typing a name for it after the...

  • RE: Searching for (_) in a column data.

    Please don't double-post.

  • RE: Searching (_) underscore in a Column

    Put square-brackets around the underscore in the Like statement.

  • RE: Subtraction in Case Statement

    There is a MUCH easier way to calculate business days between two dates. Create a calendar table, and pre-populate the data into it, then just select the rowcount between...

  • RE: store proc

    Something that might make all of this a little simpler to manage would be to modify the model database so that it has the necessary roles already created in it,...

  • RE: store proc

    Here's my take on it. Has some injection-proofing (might not be enough).

    CREATE DATABASE DBA ;

    go

    USE DBA ;

    go

    CREATE PROC DBCreate (@DBName_in SYSNAME)

    AS

    SET nocount ON ;

    ...

  • RE: Use case and join in a stament

    You can't do precisely that, but you can have a join with conditional logic, or you could have an inline sub-query in a case statement if you just want one...

  • RE: Under what Login do TRIGGERS run?

    UB (4/9/2009)


    GSquared,

    Okay may be the code gives an incorrect view of the problem I am trying to convey. I want the INSERT transactions to be audited from any user.

    My...

  • RE: Under what Login do TRIGGERS run?

    UB (4/9/2009)


    Gail,

    But the problem is .... the record gets inserted into Patient table and z_audit_Patient table.

    thats the puzzling point for me?

    As mentioned in my first post on this thread,...

  • RE: SQL Server agent job failing

    Whatever user name you have it running under isn't mapped to a security account in SQL. You need to do that. Go to the properties of the user...

  • RE: Under what Login do TRIGGERS run?

    Judging by what you set up and what you expected to happen, it looks like what you want to do is NOT audit when certain users add data to the...

  • RE: Ruthless

    Bob Hovious (4/9/2009)


    G: Do you prioritize what needs to be done first, or just take things on a FIFO basis?

    Prioritize where that's clear, FIFO if priority isn't clear.

    For...

Viewing 15 posts - 10,006 through 10,020 (of 14,953 total)