Forum Replies Created

Viewing 15 posts - 10,036 through 10,050 (of 13,469 total)

  • RE: the double pipe

    oracle is double pipe; SQL Server uses the plus sign, and will only concat the char datatypse(char/varchar/nchar/nvarchar); so of you need to concat an integer to the string , you...

  • RE: T-SQL return record for every day of year

    Joel you are on the right track; you'll need to join against another table, but it doesn't necessarily need to be a real calendar table. you can use a Tally...

  • RE: Copy DB - different name - end of month

    change the backup command so instead of NOINIT it says INIT:

    NOINIT=append to existing

    INIT=replace if exists:

    USE MASTER

    BACKUP DATABASE [MSPHXX]

    TO DISK = N'K:\MSPHXX_ARC.bak'

    WITH NOFORMAT, INIT, NAME = N'MSPHXX_ARC',

    SKIP, NOREWIND,...

  • RE: how to get data for next 3 months

    itskumar2004 (2/1/2010)


    Hi,

    i know the syntax dateadd(month,3,datefield) which will add 3 months and you can only see one month..

    but i want a syntax to see all next 3 months of...

  • RE: Query Help

    ugg; i didn't even look at the question, just tried to create the data in a ready to consume format;

    help us help you! in the future, try to give everyone...

  • RE: Physically remove record

    Steve it sounds like you could prevent it to me.

    If you can detect data that does not belong AFTER the fact, you could add filters in the application or in...

  • RE: T-SQL Stored Proc calling T-SQL Function

    mark i believe you can also change the function to return a table value function, and use CROSS APPLY to apply it against your data for a big performance gain.

    Lynn...

  • RE: SQL Server Triggers - INSTEAD OF

    no the virtual tables are stiull there, but in an INSTEAD OF trigger, it's up to you to do something with the results; if you sent an did some buiz...

  • RE: SQL Server Triggers - INSTEAD OF

    carl you do not need the where clause at all inside a trigger;

    The trigger there are two virtual tables named INSERTED and DELETED;they have a mirror of the columns in...

  • RE: Copy DB - different name - end of month

    i think this is pretty close; renaming the new db and it's files:

    it gives me this for the print statement:

    RESTORE DATABASE [MSPHXX_ARC_2010_02_01] MOVE N'MSPHXX_ARC' TO N'K:\MSPHXX_ARC_2010_02_01.MDF',

    MOVE N'MSPHXX_ARC_LOG' TO N'L:\MSPHXX_ARC_2010_02_01.LDF'

    FROM...

  • RE: Copy DB - different name - end of month

    my script just had print @sql; i did not include the final exec(@sql); sorry, i thought that was intuitive;oops!

    just add that to the end of it;

    I assumed that since we...

  • RE: Copy DB - different name - end of month

    it's all part of the rESTORE command; i just fiddled with a backup command and scripted it;

    i think you mean the MOVE command, right?:

    RESTORE DATABASE [SandBox_2010]

    FROM DISK =...

  • RE: Copy DB - different name - end of month

    i think the easiest is a full backup, and then a restore with a name that was dynamically created.

    i don't think the backup command takes a variable for the database...

  • RE: I want to display Custom Error Message!!

    in sql 2000, you cannot do it.

    any error 16 or above, which would be datatype error like you saw, constraint violations for foreign keys/pk/unique constraints cannot be custom captured.

    you can...

  • RE: Patern Matching

    if your column is varchar or nvarchar, it's fairly easy; you know the exact length of the string to catch, and can use charindex or patindex to find where it...

Viewing 15 posts - 10,036 through 10,050 (of 13,469 total)