Forum Replies Created

Viewing 15 posts - 121 through 135 (of 683 total)

  • RE: find discrepancy between two tables

    Try this:

    select OrderID, Date, Quantity, Symbol from table1 where not exists(select * from table2 where OrderID = table1.OrderID) -- rows present in table1 that aren't in table2

  • RE: Update based on different values

    Why don't you just write it as two update statements? One that does all the 'A' records, and one that does all the 'U' records that also don't have...

  • RE: msdb..sysjobhistory

    run_time is an integer and is the time at which a job started. The key thing to remember is that it's an integer not a datetime. So....

    A run_time...

  • RE: Embedding SP call from another database into SELECT query

    It is possible, but not with a stored procedure as you have used in your example. Instead, SelectCardUsageSummary would need to be a function.

    Or better still, use a join...

  • RE: move server from workgroup to domain

    To be honest I don't think this causes any particular problems. I've done this in the past (including going from domain to workgroup) and nothing untoward happened - at...

  • RE: Usage of Functions in Stored Procedures

    I don't know.... I've run both your inline and variable procedures and on my machine they both take about 470ms, give or take a few ms. In fact,...

  • RE: ASP and SQL Coding Help

    You could do this in various ways. Assuming that the variable postCodeVariable just contains the first part of the post code you could do this:

    select * from Address where...

  • RE: constraint problem

    LOL. You could have said that to start with.

  • RE: constraint problem

    Err. Are you sure? :ermm: That statement you provided doesn't work on any of my SQL Server installations (2000-2005). What version of SQL Server are you running?

    That...

  • RE: constraint problem

    you can use the ALTER TABLE statement to disable or enable constraints.

    ALTER TABLE my_table NOCHECK my_constraint -- disables the my_constraint constraint in my_table;

    GO

    ALTER TABLE my_table CHECK my_constraint -- re-enables the...

  • RE: change disks in SQL server

    Jose,

    In theory that should work. Naturally I'd test this on a test box or somewhere.

    Another option would be to detach the databases, move them to the new...

  • RE: Can I set Read Uncommitted prior to calling sp_executeSql ?

    Hmm,

    I'm not sure. You could use the nolock hint in your dynamic sql statement, which is effectively the same as read uncommitted. That way you can be sure...

  • RE: Limiting impact of poorly designed queries

    Michael Earl (4/18/2008)


    That is where the correct solution comes into play. At that company, you have a pretty good argument to have a near real-time copy of the database...

  • RE: Limiting impact of poorly designed queries

    Let me play devil's advocate here - it's a role I enjoy:w00t:

    Whilst I wholeheartedly agree with Gail and with the concept that users should never be allowed to run whatever...

  • RE: Limiting impact of poorly designed queries

    Jim Russell (4/18/2008)


    As a SQL Server DBA, what are the steps you can take to avoid letting poorly designed queries from swamping the server. These are users/programmers that need and...

Viewing 15 posts - 121 through 135 (of 683 total)