Forum Replies Created

Viewing 15 posts - 61 through 75 (of 110 total)

  • RE: Need Help: Filter records with a combination of values

    Hi,

    Can you please provide some more information?

    Some dummy data and the DML required to reproduce the problem you are trying to solve would be most useful.

    Cheers,

    Jim.

    SQL SERVER Central Forum Etiquette[/url]

  • RE: SQL 2008 Alerts for blocking

    Hmm..

    There may be a way to do this using triggers etc.. But you can also do it by running a schedule every x minutes to check for blocking.

    Create a teble...

    SQL SERVER Central Forum Etiquette[/url]

  • RE: How to Save Query output to separate text file - Each time you run any querry?

    Hi,

    Is there no way to parametrise the text file name?

    osql.exe -E -SPERRY-PC -dMASTER -Q"EXEC SP_HELPDB" > C:\SQL\TEST {INSERT PARAMETER HERE} .TXT

    SQL SERVER Central Forum Etiquette[/url]

  • RE: Display Every Day of the month even if no data is available

    Hi there..

    For this kind of task you're going to need a dates table. This simply has every day from a predefined start date, to a predefined end date. So it...

    SQL SERVER Central Forum Etiquette[/url]

  • RE: i need to do a reverse lookup on zip and get city and state for us and canada.

    Ahhhh I see...

    I assume you're in the US? There's a fantastic one for the UK based on an ordinance survey. That I can link you to if needed?

    Try this site...

    SQL SERVER Central Forum Etiquette[/url]

  • RE: General Stored Procedure Query Plan Question

    With Option B you will have to deal with SQL Server compiling the procedure every time you execute it as there may have been changes to the SPs within the...

    SQL SERVER Central Forum Etiquette[/url]

  • RE: i need to do a reverse lookup on zip and get city and state for us and canada.

    It may be possible to do what you're after in a query, but without any sample data or DDL it makes things difficult for us.

    Try this for help: http://www.sqlservercentral.com/articles/Best+Practices/61537/

    Sounds like...

    SQL SERVER Central Forum Etiquette[/url]

  • RE: Multiply two columns in SQL nd store

    Hi,

    Are you just looking to output the values??

    CREATE TABLE #product (

    ID INTEGER IDENTITY,

    Product INTEGER NOT NULL,

    Price MONEY NOT NULL,

    Quantity INTEGER NOT NULL

    )

    INSERT INTO #product

    SELECT 1,1.75,10

    UNION ALL

    SELECT 1,1.75,15

    UNION ALL

    SELECT 1,1.75,20

    UNION ALL

    SELECT...

    SQL SERVER Central Forum Etiquette[/url]

  • RE: Modulo operator problem

    This is why I love SQL so much, you have one single set of criteria that must be fulfilled and an insane amount of ways to write the code 😀

    SQL SERVER Central Forum Etiquette[/url]

  • RE: Modulo operator problem

    Thanks for looking into a bit more deeply Cadavre.. I've been working with SQL Server for 5 years now and have literally never had anyone else look at my code...

    SQL SERVER Central Forum Etiquette[/url]

  • RE: Modulo operator problem

    Hmmm... I have to disagree with you, as I ran the query after adding in your new user and got the below results:

    id ...

    SQL SERVER Central Forum Etiquette[/url]

  • RE: Modulo operator problem

    I fear there's been a certain amount of 'scope creep' in this request..

    Also, this query will return different results each day. For instance, if nothing changes for the next week...

    SQL SERVER Central Forum Etiquette[/url]

  • RE: Modulo operator problem

    Hi,

    Given the criteria:

    All users:

    a: that have been active during last 6 months

    b: that only have jobs that are older then 6 months,

    c: that are not marked as inactive,

    d: that have...

    SQL SERVER Central Forum Etiquette[/url]

  • RE: How to add row totals and column totals to Pivot

    Could you please provide us with some sample data so we can more easily assist you with your query?

    EDIT: Also if you uncomment the --COUNT(REQUESTS.reqid), won't that give you your...

    SQL SERVER Central Forum Etiquette[/url]

  • RE: Modulo operator problem

    You need to wrap the whole statement in your WHERE clause in some brackets and then take the modulo.

    Try this..

    SELECT DISTINCT userid, YEAR(GETDATE())*365+MONTH(GETDATE())*30+DAY(GETDATE()) -

    ((CASE timeendyear WHEN 9999 THEN YEAR(GETDATE())...

    SQL SERVER Central Forum Etiquette[/url]

Viewing 15 posts - 61 through 75 (of 110 total)