Forum Replies Created

Viewing 15 posts - 346 through 360 (of 455 total)

  • RE: SQL server won''''t start

    If it is working on a particular user account it will not work, change the same to Local System Account, by going to the services.

    It should work.

    Thanks

     

  • RE: What isolation level and lock type should I use?

    You may have to use UPDLOCK for not restricting the other users from reading your data while you complete your update process.

    Please check Locking Hints in SQL Server BOL.

     

    Thanks.

  • RE: Identifying NULL Dates

    Yes there is no need to have a CASE for your TSQL

    Just

    SELECT ISNULL(MYDATE,'1900-01-01 00:00:00.000') FROM MYTABLE, will give you the desired output.

  • RE: Don''''t include the time of datetime??

    Yes, since the date comparison that you are doing is for equals between the dates the above solution should do it.

    WHERE

    (LEFT(DCCntHst.SentDate),11) = LEFT(CONVERT(DATETIME,@paramdatetime),11))

    Thanks

  • RE: Select Query

    Well its not random picking, I need to pick every 'x' row like 1,5,9,13 so on so forth, the interval is derived basically on the total count of records that...

  • RE: Insert Date

    Well if you want set a default date GETDATE() for the column at the time of definition, which will automatically populate with the system date on Insert, irrespective of whether...

  • RE: Select Query

    Well this is for data analytics sampling that I am using this query and I will be picking every 'x' (4th in the question I asked) record in the total number of...

  • RE: Select Query

    It is taking about 8 seconds but I have few more joins and a clustered index on my table on the ID column and this is on my Sandbox not...

  • RE: Select Query

    Awesome, I am working on few millions of records and it really works great, Thanks to Frank and Remi for your great input and help.

  • RE: Select Query

    Thanks for all the responses, I implemented a similar logic as posted by Dinakar and it worked fine.

    Regards

  • RE: Select Query

    I have ID field which is the PKEY of the table, I have varchar field containing text and I have one datetime field, the ordering should be done on the...

  • RE: Try to find duplicates, but creating LOCKS?

    How about trying it this way, create temp tables to hold your sub query output and replace the IN clause with a join to the temp table .

    Thanks

  • RE: Using In Statement in Stored Procedure?

    TRY THIS...

    CREATE PROCEDURE sp_Test_FOR_InStatement

    @sStr as char(50)

    AS

    set @sStr = rtrim(@sStr)

    DECLARE @strQuery VARCHAR(500)

    SET @strQuery='select * from a2zOrderdata where [Order No] in (' + @sStr +')'

    EXEC (@strQuery)

    GO

    Ofcourse usage of dynamic sql is not...

  • RE: Problems with Trigger

    select A.TaskTemplateId from OSL_TskTmpls_R B

    what does B mean in this SQL.

     

  • RE: Cursor won''''t fetch next row?

    I did not verified your total script but the basic thing missing is fetch system inside the loop

     

    set @sql = 'declare muCursor cursor fast_forward for select sku, markup, id_cont from...

Viewing 15 posts - 346 through 360 (of 455 total)