Forum Replies Created

Viewing 15 posts - 256 through 270 (of 349 total)

  • RE: Update only if not null

    Hello Senthil

    if (@price is null)

    UPDATE products

     SET productdetail = @detail

    WHERE productid = @id

    else

    UPDATE products

     SET productdetail = @detail,

     productprice = @price

    WHERE productid = @id

      and @price is not null

     

     

  • RE: Date formatting problem

    Hello LS,

    Can you try this:

    select Convert(varchar(2),col_mm_no)+ '/' + '01' + '/' + Cast(col_yr_no as char(4)) as newdate from table1

    or

    select Convert(varchar(2),col_mm_no)+ '/01/' + Cast(col_yr_no as char(4)) as newdate from table1

  • RE: Can''''t connect to DB engine

    Hello Yaip,

    Please go through this link, it may give you some idea

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=225971&SiteId=1

    Thanks and have a nice day!!!

  • RE: Possible to change Database ID?

    Hello Thuan,

    What do you mean by "overriding an existing database with the same name".

    you are mentioning that you have taken a backup from server 1 and restored on server 2...

  • RE: code to access database from server

    Hello Charles,

    Please go through this link

    http://msdn2.microsoft.com/en-us/library/ms178371.aspx

    Thanks and have a nice day!!!

  • RE: Help with Left Join in query and ordering

    Hello Jim,

    Can you post some sample data?

    Also would you execute your query and check by removing the "AND" condition in the "Where" clause.

    Thanks and have a nice day!!!

     

  • RE: Restore to point in time

    Hello Henrik,

    Check out "STOPAT clause" in Books Online. Have you given any time to stop at that particular time or not?

    Thanks and have a nice day!!!

  • RE: Record Locking

    Hello Richard,

    Can you run these two queries simultaneously and check whether the locked record is fetched or not in the second query?

    Select top 1 @trackingcode = trackingcode from tblSerial with...

  • RE: Attach MDF file with no LOG

    Then you try to attach the same through Enterprise Manager.

    Right Click on databases -> all tasks -> attach database

    a new window will be opened. Give the location of the .mdf...

  • RE: Attach MDF file with no LOG

    Hello,

    execute this query with the respective information

    EXEC sp_attach_single_file_db @dbname = '', --- your database name

       @physname = '' --- the location of the .mdf file

    Thanks and have a...

  • RE: "Unspecified Error" after moving DTS package to new server

    Hello,

    How you moved the DTS package from the source server to the other server?

    The reason for the error is that on the original server you have mentioned that you are...

  • RE: Deadlock issue

    Hello Jay

    Can you change the alias name to a different one and check out? Also change the '{' to '('.

    Thanks and have a nice day!!!

  • RE: Real Newbie Backup Question

    Hello Mike,

    Yes and No.

    You can have the backups on the same server. Suppose, if the server crashes and the backup files are not recoverable then you will be at a...

  • RE: How to locate error rows from DTS Exception Log

    Hello David,

    Check up the table "cfs" and find out the last row it has inserted into it and based on it you can find the same in the source data...

  • RE: Dual Database Query

    Hello Mark,

    Can you try this one

    Update mainframedataconversion

    SET ethnicity = ptr22.Ethnicity,

    race = ptr22.Race,

    email = ptr22.Email

    from mainframedataconvertclaimant ptr34, tblvalue ptr22

    where ptr34.ssn = ptr22.ssn

    Thanks and have a nice day!!!

Viewing 15 posts - 256 through 270 (of 349 total)