User Profile

Collapse

Profile Sidebar

Collapse
MakingDBA
MakingDBA
Last Activity: May 23 '07, 10:42 AM
Joined: May 20 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Select top (7 - (datepart(weekday, Fordate))) from table1

    Is there any way to get 'x' rows using a computed value in the 'SELECT TOP' clause. I know of the 'rowcount' way but that doesnot solve the problem as I am making this query in XML.

    Please HELP!

    Regards,
    Not a DBA yet
    See more | Go to post

  • MakingDBA
    replied to SQL Triggers and stored procedures
    Dear MandlaT,

    I am not totally clear what you're asking but maybe you want to do a select on dstControl for the Yeardate you are about to insert so that you do so only if it doesnot exist.

    Regards
    MakingDBA
    See more | Go to post

    Leave a comment:


  • MakingDBA
    started a topic Is it possible to change login of 'dbo'

    Is it possible to change login of 'dbo'

    I restored a DB from another machine. I have created my own user 'Alchemy' for a login 'Alchemy'. After I restore this DB, the 'dbo' user connects itself to 'Alchemy' login. sp_change_users _login doesnot work on 'dbo' so how do I link my user 'Alchemy' to the login 'Alchemy'. I am unable to create my 'Alchemy' user in the restored DB and set it to the login 'Alchemy' as it keeps giving me the error
    Server: Msg 15063, Level 16, State 1, Procedure...
    See more | Go to post
No activity results to display
Show More
Working...