Forum Replies Created

Viewing 11 posts - 61 through 71 (of 71 total)

  • RE: Scheduled Job: Email Output File within same step

    Hi guys,

    The file I am trying to send out is the output file from the step that's been run.... think it's chicken and egg syndrome...

    I've created the step that executes...

  • RE: Faster more efficent way of deleting rather than exists

    As in rather than having to do my two hits to then do the delete, just in one statement with less code...

    So for me yours looks better.

    Thank you!

  • RE: The row count

    Hi Sandy,

    Here's the query runs:

    SELECT getDate()

    SELECT * FROM dbo.tblOfMine

    SELECT getDate()

    --START TIME 2008-06-10 17:10:16.757

    --FINISH TIME 2008-06-10 17:14:59.980

    SELECT getDate()

    SELECT 'x' FROM dbo.tblOfMine

    SELECT getDate()

    --START TIME 2008-06-10 17:14:59.980

    --FINISH TIME 2008-06-10 17:16:46.810

    Regards

    Kev

  • RE: The row count

    Hi Lynn,

    Cheers for the link, read it like you do:

    In future you can use:

    expression [AS] column_alias

    expression [AS] [column_alias]

    expression [AS] "column_alias"

    expression [AS] 'column_alias'

    column_alias = expression

    But not:

    'string_alias' = expression

    I'd never come across...

  • RE: The row count

    I am running in one hit through Query Analyser against my table of 34280059 rows:

    SELECT getDate()

    SELECT count(*) FROM dbo.tblOfMine

    SELECT getDate()

    --STARTED AT 2008-06-10 16:14:53.233

    --COUNTED 34280059

    --ENDED AT 2008-06-10 16:14:56.123

    --TIME DIFF:...

  • RE: The row count

    I had wandered if NULLS had some issue.

    Thank you for the clear explanation, and picking up on the alias by assignment question.

    🙂

  • RE: The row count

    Hi Sandy,

    I did

    SELECT getDate()

    SELECT count(*) FROM dbo.tblOfMine

    SELECT getDate()

    SELECT getDate()

    SELECT count('x') FROM dbo.tblOfMine

    SELECT getDate()

    And got the same time differences. Guess what I haven't factored in was that I ran the others...

  • RE: The row count

    Thanks Steve,

    Just done that and all are the same.

    Though on speed seems SELECT count(1) is 0.012 seconds faster than SELECT count(*) when querying 34000000 rows. SELECT(count(primary_ID) is 0.001 seconds slower.

    Yeah...

  • RE: Conditional Statements in WHERE Clauses

    Doing this type of thing in the order by clause.. now that's the way forward!

    If you have 20 lines of sql in an sp and have to order the results...

  • RE: Practical Methods: Naming Conventions

    • tCustomer_CustomerID
    • tInvoice_CustomerID

    Hmmm... so which one is the foreign key and which one is the primary key? Or more importantly which table is the foreign key referencing?

    I tend to use pk_<tableName>...

  • RE: Does it help?

    I use two monitors at work, did in the previous job as well. They are both CRT's, I keep asking every once in a while for LCD's just so I...

Viewing 11 posts - 61 through 71 (of 71 total)