Forum Replies Created

Viewing 15 posts - 541 through 555 (of 2,462 total)

  • RE: retrive the data from database date by date

    Nikhil welcome to SSC. friend 🙂 we need something to tell you something. means post the table defintion along with some sample data , also expected output based on sample...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Am not able to export 10 lakh records to excel sheet.

    why so much of data on excel .it would be difficult to analyze it there (difficult to slice and dice) or even to scroll.

    from excel too , you can do...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: find out particular query is executed in sql server?

    some on instance level ....some database level..some table level.

    better google it 🙂

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: sql query to find out sql server configuration deatils?

    use databasename

    go

    select * from sys.sysfiles

    go

    select * from sys.database_files

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: SQL Server consuming 90% Memory

    jitender, are you still experiencing same memory issues ?

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: creating SQL login with cursor

    ScottPletcher (1/9/2013)


    the cursor should be optimized with FAST_FORWARD:

    Any article reference for this ?

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: creating SQL login with cursor

    paul 77096 (1/9/2013)


    Thats Brilliant, it worked like a dream.

    in future try to avoid cursors instead use loop or set based approach. why ???? google it 🙂

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Which Query has better statistics ?

    Thanks gail for explanation..

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: creating SQL login with cursor

    try this in your cursor code

    DECLARE @sql NVARCHAR(4000);

    While

    begin

    SET NOCOUNT ON

    SET @sql = 'CREATE LOGIN ' + @username + ' WITH PASSWORD = ''12345'', DEFAULT_DATABASE=[dbname], DEFAULT_LANGUAGE=[British], CHECK_EXPIRATION=OFF, CHECK_POLICY=ON';

    EXECUTE(@SQL);

    exec...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Problem with "If Exists (Select ...) Or Exists (Select ...)"

    thanks gail

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Problem with "If Exists (Select ...) Or Exists (Select ...)"

    julian.fletcher (1/9/2013)


    Really? Do you have any links to further details? That would be very helpful.

    sse this link http://sqlserverplanet.com/optimization/using-union-instead-of-or

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Problem with "If Exists (Select ...) Or Exists (Select ...)"

    its happening because of OR usage in first query , yes it is well know performance glitch.

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: duplicate row after a truncate

    hi2u (1/8/2013)


    Sometimes i get the following error on usp_Table1

    "Violation of PRIMARY KEY constraint 'PK_Table1'. Cannot insert duplicate key in onject 'dbo.Table1'

    i am not agree you will get this error...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: SQL 2008 R2 - CDC or Trigger

    kevin_nikolai (1/8/2013)


    Both a trigger and cdc (change data capture) can be enabled to monitor changes to a table.

    When would you use each of them, which is best ?

    see...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • RE: Need Result By using pivot or CTE

    another query

    select name,[Phone],[Sms],[Email]

    from

    (

    select name , mode , sum(case

    when name = 'AAAAA' then 1

    when name = 'BBBBB' then 1

    when name = 'CCCCC' then 1...

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

Viewing 15 posts - 541 through 555 (of 2,462 total)