Forum Replies Created

Viewing 15 posts - 121 through 135 (of 206 total)

  • RE: sql function - null parameter

    select * from tblemp where empid=isnull(@empid,empid)

    You can change your select to something like above. Does that work?

  • RE: Named Transactions

    So if you are doing nested transactions like this you don't need to have the inner "begin transaction" just a "save transaction" statement? I tested this and it works...

  • RE: Named Transactions

    Wow, thank you. I have yet to use nested transactions like this and thought I was going crazy.

  • RE: Tic-Tac-Toe Problem

    Very cool. I have ran this a couple time but sometimes the execution result in an infinite loop. I didn't have time today to figure out where a...

  • RE: Tic-Tac-Toe Problem

    Yes, I have seen wargames. 🙂 I was just curious to find a set of moves where the very last move was a win.

    So lets say we change...

  • RE: Transfering content of a string variable to a file in a SP

    If you are stuck with not using bcp then you probably need to change the datatype of the @cmd variable to varchar(max) also. sysname is basically a nvarchar(128) datatype.

  • RE: my result set becomes Empty?

    I guess I am unclear on what your expected result set is.

  • RE: my result set becomes Empty?

    Have you made sure this productID exists? The adventureWorks database I have installed does not have this productID.

  • RE: Awkward Text Parsing

    I can't think of a way to do this without knowing something static after the username. Here is what I did and I guess it will work for the...

  • RE: Update table

    Lets see if this is closer. The code has a couple comments but I will try to expand. The dateadd function takes 3 parameters (datepart, number, start date)....

  • RE: Update table

    I really don't think you will have to use a cursor for this. I am still not sure about the statements below. What condition has to be satisfied?...

  • RE: Update table

    I think you are asking for something like this. I have created test tables and test data so if this is inaccurate let me know. This will change...

  • RE: stored procedure and if statement

    I don't think this does what you want but it does what you asked for and it will be able to get you started at least.

    CREATE TABLE #temp (Mon INT,...

  • RE: Conditional select

    Using the same logic as the 2 different approaches above you will get 2 different result sets:

    [Code]

    SELECT * FROM #REF

    WHERE (Code1 in ('SS18','SS19') OR Code2 in ('SS18','SS19') OR Code3 in...

  • RE: Conditional subscription?

    Not the first time this has come up.... Some interesting ideas can be found here:

    http://www.sqlservercentral.com/Forums/Topic719090-150-1.aspx

Viewing 15 posts - 121 through 135 (of 206 total)