Forum Replies Created

Viewing 15 posts - 4,411 through 4,425 (of 13,469 total)

  • RE: Search All Tables

    create a temp table,and change the query to insert something into the table instead of a simple select...maybe the table name and the column name or something...or a PK...

    you can...

  • RE: Query to find anywhere in database where there are sets of 16 or 17 numbers

    the next part, the find and replace gets ugly very quickly.

    is it possible that more than one number appears int eh memo field? ie two or three 1/17 digit numbers?

    is...

  • RE: Query to find anywhere in database where there are sets of 16 or 17 numbers

    if you know it's a single table, it's going to look something like this:

    you can use the pattern matching , regular expression style of the LIKE statement:

    SELECT *

    FROM YOURTABLE

    WHERE...

  • RE: Dropping Constraints from multiple tables

    instead of dropping and recreating, it would be a lot easier to simply rename the existing constraints instead. sp_rename takes any object name that exists in sys.objects , not just...

  • RE: Stored Procedure

    edward_hall76 (11/13/2012)


    ok. where I work not all people know how to write tsql code and if they mess up the tsql they do not know how to fix it is...

  • RE: Stored Procedure

    the issue here is GUI dependancy;

    you've got to get used to using the TSQL window for your commands, instead of using the GUI tools.

    if you right click on a...

  • RE: MSDB database not responding

    duplicate post.

    no need to cross post to multiple forums; it fractures the answers you get and makes posters duplicate others work.

    the "Recent Posts" link shows us everything.

    continue the thread here:

    SQL...

  • RE: Concatenate IN TRIGGER two fields into one in this line of the TRIGGER T-SQL?:

    Tava (11/12/2012)


    briancampbellmcad (11/12/2012)


    Both the PO_Number and HeatTicketNumber are already Varchar as the table datatype... so (?) no need for conversion (?)...

    I ran the code above and now have a SQL...

  • RE: automate t-sql

    ok, let me twist the question around on you...

    why can't you update all the rows at the same time, where WIN is null, and ts_started is less than an hour,...

  • RE: Concatenate IN TRIGGER two fields into one in this line of the TRIGGER T-SQL?:

    looked a little deeper, this is a syntactically correct version that only inserts the rows that have INSERTED.Transaction_Type = 'From Bulk Assignment'

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    ALTER TRIGGER [dbo].[trPopulateJournalEntries]

    ON [dbo].[tblTransactions]

    AFTER INSERT

    AS

    BEGIN

    ...

  • RE: Concatenate IN TRIGGER two fields into one in this line of the TRIGGER T-SQL?:

    it would be simple concatenation;

    if the types happen to be integers, you might need to convert them to varchars:

    INSERT INTO tblSWJournal

    (tblSWJournal.Ledger,

    tblBulkPurchases.Amt)

    SELECT

    CONVERT(varchar(30),INSERTED.HeatTicketNumber)

    + ':'

    + CONVERT(VARCHAR(30),INSERTED.PO_Number),

    INSERTED.Unit_Price

    FROM INSERTED

  • RE: SQL Login Trigger

    well i cannot get a prototype to work;

    this is the code i used for testing; i don't get any errors in the trigger, and a rollback command works fine, but...

  • RE: SQL Login Trigger

    Steve Jones - SSC Editor (11/12/2012)


    A login trigger may help you here, but in conjunction with an application role. You might be able to trigger an application role as part...

  • RE: SQL Login Trigger

    zulmanclock (11/12/2012)


    The problem i am faced with is my company uses a thrid party application. This application needs to have all the users assigned to a role which has...

  • RE: SQL Login Trigger

    I don't believe you can redirect the connection to another database... essentially the connection asks for login info/permissions only

    yes maybe with an initial database gets passed in with the credentials,...

Viewing 15 posts - 4,411 through 4,425 (of 13,469 total)