Forum Replies Created

Viewing 15 posts - 16 through 30 (of 1,553 total)

  • RE: Generating random 6 digit numbers

    Ah, you're right.

    Didn't read the thread carefully enough.

    btw, the convert/cast difference is only because I copied mine from an old note made back when cast wasn't yet available in SQL...

  • RE: Generating random 6 digit numbers

    Here's an old note I found in my archives.

    Hope it may be of some help.

    The general rule to use rand to generate random numbers from {lower limit} to {upper limit}...

  • RE: Collation Error

    The most common reason for this kind of error, is when your database has a collation that is different from the server's default collation, and the query generates tempdb activity.

    In...

  • RE: sp_spaceused

    The basic syntax is:

    INSERT myTable EXEC someProcedure

    'sp_spaceused myTableName' returns a single resultset, so just create a table matching the output, and then use the INSERT EXEC syntax.

    'sp_spaceused' alone otoh returns...

  • RE: Select *

    This is really another subject, but I feel I have to disagree anyway.

    What you're essentially proposing here, is that the model doesn't count.

    Whenever you're using 'select *' instead of an...

  • RE: CONVERT from minutes to hours

    Sorry for the late reply, but yes, that's precisely what I ment. 🙂

    / 60 for the full hour, and % 60 if you want the remaining minutes

    /Kenneth

  • RE: CONVERT from minutes to hours

    So that means that the quantity column isn't correctly typed then, since the number of minutes doesn't have any fractions..

    Still, divide the minutes by 60 and mod by 60 for...

  • RE: CONVERT from minutes to hours

    If you have minutes, then divide by 60 for the hours and mod 60 for the minutes left on the remaining hour... Though, what does your minutes look like with...

  • RE: SELECT

    This looks like a legacy join syntax..

    But as Steveb says, don't use leagacy joinsyntax, start using ANSI joins instead.

    It seems that what you're after is an outer join in this...

  • RE: Detecting SQL Agent running state from T-SQL

    Any particular reason not to use any of:

    sp_help_job

    sp_help_jobactivity

    ..?

    /Kenneth

  • RE: SQL Server 2005 sp2 Disk Space

    So what is the real question?

    Your SAN guys haven't zoned enogh disk for your server?

    Have them expand it if it's full/too small.

    /Kenneth

  • RE: Collation Designator

    If I read your question right, the only difference is that one is case sensitive, and the other insensitive?

    Implications are pretty obvious, if you're going from CS -> CI

    CS 'a'...

  • RE: Set SMTP for SQL 2000

    Or, forget about MAPI and use Gert's xp_smtp instead.

    http://sqldev.net/xp/xpsmtp.htm

    Used it for years while on 2000 - never had any problems with it..

    /Kenneth

  • RE: Convert month to date and add value in datewise from Month column

    It seems like the scope is increasing from the original problem..?

    If you're starting to need exceptions in the dates based on 'non-calendar' attributes, such as workdays (next thing is perhaps...

  • RE: Delete records from table join

    Ah, you're absolutely correct.

    That's what you get when you don't read close enough.. 😉

    /Kenneth

Viewing 15 posts - 16 through 30 (of 1,553 total)