Forum Replies Created

Viewing 15 posts - 4,006 through 4,020 (of 5,109 total)

  • RE: passing tableName as a variable in stored prcoedure

    You're not escaping your Dynamic SQL when you get to your variable. Thus the SQL you're executing is expecting a variable @facilityID,. which you haven't declared.

    Try replacing the...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: SQL job schedule question

    So, for your first step, you could do something like this:
    DECLARE @FirstWD DATE;

    SELECT TOP 1 @FirstWD = [Date]
    FROM DimDate DD
    WHERE DD.[Calendar Year] =...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: SQL job schedule question

    What do you defined as a Business day? First weekday, or do you want to exclude public holidays (if so, are you storing details of public holidays?)? I simply the...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: subquery

    I still don't see any difference to your request to your original request. Does this not achieve what you want?
    SELECT S2.student_rollno,
           marks, --Not sure...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: SSIS package works properly in visual studio but hangs after deploy (some records inserted then crashed)

    You could try setting your bad rows to go to a different destination for now, for simplicity you could do it to a csv/text file. Then have a look at...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: subquery

    I might be missing something here, screenshots are not a good way to portray your data, but why not add an extra join, to your Subjects_Gradetype_junction table, and return the...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Showing users that have created 0 records

    May I ask why you think a LEFT JOIN won't work for you? What's is your reasoning, have you tested?

    Have a look at this simple example. Note that...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Is DATEFIRST affected by collation?

    richardmgreen1 - Friday, March 31, 2017 6:17 AM

    Hi Thom

    They do against all the servers.
    Looks like I'll have to go through all of...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Is DATEFIRST affected by collation?

    richardmgreen1 - Friday, March 31, 2017 5:37 AM

    Hi John

    All the servers are set up to set British English (looking in Server Properties/Advanced/Default/Language).

    That's...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: What do you do to relax after work?

    Took back up cycling last year, really enjoy that. Now that the clocks have gone back it's light after 18:00, so I can actually cycle into and from work again,...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Instance is under memory pressure. How to relieve from pressure

    coolchaitu - Thursday, March 30, 2017 8:40 AM

    Jeff Moden - Thursday, March 30, 2017 8:14 AM

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: How to split count of salespeople who had sales vs no sales?

    Phil Parkin - Thursday, March 30, 2017 7:38 AM

    Thom A - Thursday, March 30, 2017 6:50 AM

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Transaction Order - Debate

    An after insert trigger is still all part of the same transaction, it just means that the trigger happens after the insertion, rather than before or instead of. If any...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: How to split count of salespeople who had sales vs no sales?

    No need for temporary tables, you can do this with a simple aggregate and CASE statement:
    SELECT COUNT(DISTINCT CASE WHEN T.TransactionId IS NOT NULL THEN E.EmployeeId ELSE NULL...

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • RE: Are the posted questions getting worse?

    SQLRNNR - Wednesday, March 29, 2017 9:28 AM

    Thom A - Wednesday, March 29, 2017 8:31 AM

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

Viewing 15 posts - 4,006 through 4,020 (of 5,109 total)