Forum Replies Created

Viewing 15 posts - 781 through 795 (of 1,156 total)

  • RE: Query to find data over range of years

    How about?

    select distinct CustNumber

    from dbo.InvoicesView

    where Year(InvoiceDate) >= 2003

  • RE: Variables & Linked Server Querying

    Gotcha, I misunderstood the problem.

    I am glad everything worked out and thanks for the feedback.:)

  • RE: Subquery syntax?

    The problem with this syntax is you can return a name id without Specialty = 'X1' because the outerquery is only looking for NameIDs. If a NameID has two...

  • RE: Combine 2 Text Fields??

    You'll need to use the WRITETEXT function to do that. It's a little complex, with pointers and such, but it can be done. Books Online gives the details. Look...

  • RE: Combine 2 Text Fields??

    Sorry, I assumed that you were using SQL 2005 because this is posted in the SQL 2005 forum. In SQL Server 2005 a varchar(max) can hold up to 2GB...

  • RE: Combine 2 Text Fields??

    Use varchar(Max)

    convert(varchar(max), dt) + ' ' + convert(varchar(max), dt1)

  • RE: Using WAITFOR DELAY

    To addon to Lowell post you could also check for the existance of the flag and then start the job; otherwise, just finish up

    IF EXISTS(SELECT STATUS FROM SOMETABLE WHERE STATUS='READY')...

  • RE: Using WAITFOR DELAY

    I would agree with the process running table. You should segregate the process into separate jobs like Steve and Lowell said. This way the second process will never...

  • RE: Audit on Select statement

    Thanks for that, yes I'd seen that the 'Audit Schema Object Access Event' trace option might pick it up so I could use that. I'll test it. Could you let...

  • RE: Audit on Select statement

    Your only other option is to turn on the logging option, but keep in mind that it is not 100% accurate because it can miss events.

  • RE: Audit on Select statement

    Unfortunately, you will not be able to track this information with triggers. Therea re two types of triggers DDL and DML. DDL triggers only fire for schema changes...

  • RE: Reclaim Transaction Log Space

    NP 🙂

    I knew what you meant. I just wanted to correct it for other posters.

  • RE: Reclaim Transaction Log Space

    Ankit,

    The only thing you need to be careful of when having a database in Simple Recovery is that you are restricted to restoring to your latest database backup whether it...

  • RE: Simple Query I Need.....

    Sandy,

    Why do you need this particular code? It seems like homework.

    Here is a hint.

    You should use the sum of log(sid) and natural logarithm 2.71828182845905 (sql has built in function for...

  • RE: Running DB script on another server and no able to log on

    The problem is the SID do not match in the restored database. You have to make the SID match in the master database or drop/create the database user logins.

Viewing 15 posts - 781 through 795 (of 1,156 total)