Forum Replies Created

Viewing 15 posts - 181 through 195 (of 314 total)

  • RE: Best way to create multiple databases

    Instead of creating database for every user(which sound so absurd) you can create views for every user and grant permissions on the view. If you have multiple databases then how...

  • RE: Query for calculating sum of negative and +ive value.

    Vandy..I don't see anything wrong in the query but I need one clarification. Is the credit and debit stored as postive value in the database (with another column being an...

  • RE: Bug or feature?

    Like you said it was not ordering by sid but was ordering by dbid but was dsiplaying dbid as sid (as is optional)

     

  • RE: Remove Consecutive Dates in Report

    Assuming that the work week is Monday to Sunday here is how you can do it.

    Declare @date1 datetime

    set @date1 ='9/3/2006'

    SET DATEFIRST 1

    select @date1 as date1,DateAdd(d,-1 * DatePart(dw,@date1)+1,@date1) as WeekBegin

    SET DATEFIRST 7

    Changing...

  • RE: Transaction log too big, should I delete or shrink the log?

    1.run DBCC OPenTran to see if any open tranasctions are there

    2.Change Recover Model to "simple"

    3.Do a complete backup.

    4.Run DBCC ShrinkDatabase(DBName,10)

    5.Change Recover Model to "full"

    6.Do a complete backup.

    7.Use the backup file...

  • RE: Using MAX in an UPDATE

    Try this:

     Update _FinalTrans set LargestTicket = B.LargestTicket

     from ( Select  Acct, MAX(TransAmt) as LargestTicket

      FROM _FinalTrans

      GROUP BY AcctNo ) B where _FinalTrans.Acct = B.Acct

  • RE: sql query question

    Hope this helps:

    Select Auction.AuctionRefID,AuctionRefID.AuctionPrice,

     Customer.CustomerName,Products.ProductName

     from Auction INNER JOIN

     (

      select AuctionRefID,max(AuctionPrice) as MaxPrice,min(AuctionID) as MinAuctionID

      from Auction

      Group by AuctionRefID ) WinningBid on Auction.AuctionRefID = WinningBid.AuctionRefID

         and Auction.AuctionID = WinningBid.MinAuctionID

     INNER JOIN Customer ON Auction.CustomerID...

  • RE: Best Approach to Copy Data between Databases on same server

    If your database is huge the backup and restore is going to take some time.But the same is the case of "snapshot" Replication. DTS is not the way to do...

  • RE: Disaster recovery

    DR is based on your requirements and the expectation by the end users on  How much data loss can your users tolerate and how long can the wait.

    To begin with...

  • RE: Mailing DBA when sql server agent fails

    If this process needs to work it should keep running every X minutes. But the problem is then you need to schedule a job that keeps running and sends email....

  • RE: Server name changed to IP Number?

    Do you have trouble connecting to SQL Server with your "Machine Name"?

  • RE: Problems dropping a table in Query Analyzer

    My guess is if you have a dot in the name SQL will assume it to be Owner.tableName instead of treating the table "Daily_transactions.hist" as table Name.

    Thanks

    Sreejith

  • RE: data types default values

    SQL BOL(Books Online) has everything u have asked for.

    Thanks

    Sreejith

  • RE: Selecting Records in the same calendar week as a date.

    Just an FYI, keep in mind about what SQL considers a week. You can do that by SELECT @@DATEFIRST. Default is Sunday so if your week starts on Monday then...

  • RE: DTS Package taking hours to complete

    Have u looked at query execution plan? That should point you in the right direction.Do you have Index on bloodType?

Viewing 15 posts - 181 through 195 (of 314 total)