Forum Replies Created

Viewing 15 posts - 3,871 through 3,885 (of 4,087 total)

  • RE: easy sql data 2 excel?

    ashish.kuriyal (9/16/2010)


    DTS may fulfill your requirememnt and then that DTS can be scheduled in job

    Why would you use DTS when you have SSIS available?

    Reporting Services may actually be the best...

  • RE: sp_executesql won't return the expected result. Any help please?

    Jason Tontz (9/15/2010)


    Because I get an error :

    Msg 156, Level 15, State 1, Line 1

    Incorrect syntax near the keyword 'TOP'.

    That's because you have your TOP clause in the middle of...

  • RE: Alternatives for nested cursors

    Craig Farrell (9/15/2010)


    - For these users, they need all items from somewhere else...

    -- Cross Join to create master list of user/itemcodes

    It's actually not a CROSS JOIN, because the value of...

  • RE: Alternatives for nested cursors

    You really should provide TEST DATA. Despite that, I think that this is what you want.

    INSERT INTO dbo.Privs(Username, GroupCode, ItemCode, LevelVal)

    SELECT DISTINCT p.Username, p.GroupCode, g.ItemCode, g.LevelVal

    FROM dbo.Privs AS p

    INNER...

  • RE: Trigger

    Tara-1044200 (9/15/2010)


    I am still getting the erorr , may be i cant use this in a single query batch

    USE DB1;ALTER TRIGGER.......

    USE DB2;ALTER TRIGGER.......

    USE DB3;ALTER TRIGGER.......

    USE DB4;ALTER TRIGGER.......

    'ALTER TRIGGER' must be...

  • RE: Can Windows variables Be Used Within T-SQL

    Either Host_Name() or @@SERVERNAME should give you what you need. Host_Name will give you the name of the workstation that initiated the process, @@SERVERNAME will give you the name...

  • RE: Please help=it's urgent,Cluster failoverd to node b.

    You might get better help faster if you had posted this in the correct forum. While you might find an expert on clustering in a T-SQL forum, you're much...

  • RE: Importing a .txt file into SQL Server 2005

    Are you really using DTS instead of SSIS?

    It would really help to have SAMPLE DATA. Without that, it's really hard to determine the best course of action.

    It sounds like...

  • RE: Trigger

    You must not have included the "GO" statement in your dynamic SQL.

    Drew

  • RE: Trigger

    It's actually fairly easy, because your trigger code doesn't change between databases. Since this is probably only a one-time thing, I would just copy the results of the dynamic...

  • RE: Trigger

    Tara-1044200 (9/10/2010)


    Hmm thats a pain if i have to add trigger to every database there are more than 400 db's. any trick?

    Dynamic SQL. That's how I created triggers on...

  • RE: Trigger

    I check BOL and it looks like DROP_TABLE is not valid for server level events. You can only use the following at the server level: ALTER_AUTHORIZATION_SERVER, CREATE_DATABASE, ALTER_DATABASE,...

  • RE: Create, Rename, Delete file folder thru SQL

    BOL is SQL Server Books OnLine. If you Google "BOL SQL" and click "I'm feeling lucky" it will take you right there.

    Drew

  • RE: ORDER BY with CASE statement

    Magy (9/10/2010)


    Yes, I would like to be able to do this:

    ORDER BY

    CASE

    WHEN @SortSeq = 'asc' AND @SortOrder...

  • RE: Outer Join or SubQuery

    You just need to apply your filter criteria before or as part of the join statement. You can use a CTE to filter the records before the join or...

Viewing 15 posts - 3,871 through 3,885 (of 4,087 total)