Forum Replies Created

Viewing 15 posts - 196 through 210 (of 458 total)

  • RE: 64 bit linked server issue

    I'd also be interested in this as I've run into the same problem in the past and have also been a little hesitant to just recreate most of my system...

  • RE: retrieving value from an xml field in the db

    Look into using the query() method from XQuery. In BOL it's "Query() method".

  • RE: Error when subtracting two columns

    SELECTID, Name, [Date Received], [FirstOfAnnual Date] AS [Annual Date],

    DATEDIFF(dd, [FirstOfAnnual Date], [Date Received]) AS DIFF

    FROM TEMP WHERE DATEDIFF(dd, [FirstOfAnnual Date], [Date Received]) = 0

    That would limit it to where the...

  • RE: Error when subtracting two columns

    I'm assuming you're using DATETIME datatypes for those two columns?

    If so, use the DATEDIFF function instead of the subtraction operator. It's a little cleaner and you're less likely to...

  • RE: Database Mail,sp_sysmail_activate ''''Invalid Parameter''''

    Make sure db mail is enabled on the server... (from BOL):

    sp_configure 'show advanced options', 1;

    GO

    RECONFIGURE;

    GO

    sp_configure 'Database Mail XPs', 1;

    GO

    RECONFIGURE

    GO

  • RE: How to grant datareader permission to a login?

    Make sure you create the associated user in the database first from the login and then you can do something like:

    exec sp_addrolemember 'db_datareader', 'someuser'

  • RE: dynamically change the background, foreground colors of a cell based on contents

    You can go to the "Expression" settings in the properties box for each of those and do something like this:

    =IIf(Fields!Source_Rowcount.Value Fields!Target_Rowcount.Value, "Red", "White")

  • RE: Need T-SQL 2k5 help - please advise

    Do some research on Common Table Expressions (CTEs)... in this situation that's by far the best tool. In fact, I think I've seen an example exactly like this...

  • RE: SQL Server 2005 Clustering Questions

    In general I think the terminology of "Active/Active" vs "Active/Passive" is on its way out. It's really a question of how many instances you want to install across the...

  • RE: user with dba permissions detach a database

    I'd have them reconnect using sqlcmd and set their default database to something else to resolve the issue...

    sqlcmd -E -S MYSERVER -d master -q "alter login [domain\user] with default_database =...

  • RE: Inquery about Best Practices for SQL

    I think you could ask 20 different SQL Server professionals their "best practices" built on experience and get 20 different answers. There was a series at SQLTeam.com (I think)...

  • RE: how to sum in a view

    well, you could do it by subquerying the data... i.e.:

    create view dbo.census_history

    as

    select nurs_sta, cen_dtime, sum(tot_cen) as tot_cen

    from

    (

    select case when nurs_sta = 'def' then 'abc' else nurs_sta end as nurs_sta, cen_dtime,...

  • RE: Conditional formatting possible ?

    Sure... In your example you could go into the font color box, select "Expression" from the drop down and enter something like this:

    =Iif(Fields!Quantity.Value > 0, "Blue", "Red")

  • RE: Display top 20 items

    SELECT TOP 20 * FROM items ORDER BY Price ASC

    SELECT TOP 20 * FROM items ORDER BY Price DESC

    If you're doing something like a parameterized report where you can only...

  • RE: Maybe one of you SQL gurus can help me out

    I was going to suggest John's method, however I'd recommend that you probably want to make sure that on the insert you use an ORDER BY clause to make sure...

Viewing 15 posts - 196 through 210 (of 458 total)