Forum Replies Created

Viewing 15 posts - 5,881 through 5,895 (of 6,598 total)

  • RE: Using Datepart

    Jerry Hung (10/29/2008)


    DATEPART Books Online

    You can use YEAR(datefield) and MONTH(datefield) such as

    SELECT id FROM transactions WHERE YEAR(trandate) = 2008 AND MONTH(trandate) BETWEEN 1 AND 3

    YEAR is just DATEPART(year, ___), MONTH...

  • RE: SMALL HELP EGD ORDER BY

    Not sure how I can help on that other issue - looks like you have a couple of people who already have given you an answer that should work. ...

  • RE: SMALL HELP EGD ORDER BY

    I am happy that worked for you - I think either YYYYMM or YYYY-MM would work the same way and ordered the way you want it.

  • RE: SMALL HELP EGD ORDER BY

    Try this:

    Select convert(char(7), date, 120) As DatePeriod

    ,count(*) As Total

    From TBL1

    Where Status = 'OUT'

    Group By

    ...

  • RE: Locks held by a deleted log-in

    That would be the best bet - but, if you don't find anything it is time to call the vendor. I have a feeling that regardless of what you...

  • RE: backup with different credentials

    Since the backup operation will occur on ServerA - and will run in the context of the SQL Server Agent on that server, the only way I see is to...

  • RE: query with dates

    For passing dates into a procedure, I would recommend always passing the full date in YYYYMMDD format. The time will default to midnight.

    If you can't do that - then,...

  • RE: The pesky 15023 (user already exists) error

    What you really should have done is to create the logins before restoring the databases. Google 'sp_helprevlogin' to find a procedure for copying logins from one server to another.

    Make...

  • RE: Multiple GRANT statements

    Are you sure those objects exist in the 'dbo' schema? And, are you sure you have permissions to grant access to those access (requires WITH GRANT privilege).

  • RE: Locks held by a deleted log-in

    Well, this is going to be a bit harder and most likely will end up going to the vendor anyways. What you need to do is isolate the trace...

  • RE: Find Missing Number Ranges

    Search this site for Tally Table - it is exactly what you are looking for.

  • RE: Update....

    Lookup REPLACE in Books Online:

    SELECT REPLACE(description, 'Jasper Conran', 'JC') ...

  • RE: Locks held by a deleted log-in

    If you still have the trace output available - search the text data for the word 'locked'. Basically, you need to identify the request that is being returned that...

  • RE: I need to join 2 tables using a 3rd table

    The only thing I would add would be to make sure the joins are correct. Using outer joins (LEFT) will return all rows from TableA and only matching items...

  • RE: SQL Server 2008 Intellisense! Love it or hate it?

    Not true, as can been seen from my example. The error goes away eventually; it works in redgate; I'm specifying database with 'use' etc.

    I would bet anything that the...

Viewing 15 posts - 5,881 through 5,895 (of 6,598 total)