Forum Replies Created

Viewing 15 posts - 4,771 through 4,785 (of 5,109 total)

  • RE: Find last business day from table with date and day in SQL 2008 and 2012

    John Mitchell-245523 (11/29/2016)


    Isn't it as simple as this?

    SELECT DISTINCT

    MAX(TheDate) OVER(PARTITION BY YEAR(MyDate), MONTH(MyDate)) AS LastBizofMonth

    ,MyDay

    FROM MyTable

    WHERE MyDay NOT IN ('Saturday', 'Sunday')

    By the way, please don't double-post.

    John

    Depends on the OP's definition...

    Thom~

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

  • RE: Generate Running MAT from Quarter

    mokarem (11/29/2016)


    Thanks for your effort. but it is not giving the expected result.

    For quarter data '2014 quarter 1' , '2014 quarter 2', '2014 quarter 3', '2014 quarter 4'

    the...

    Thom~

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

  • RE: Generate Running MAT from Quarter

    What is MAT, and where is it coming from? We don't have any informaiton on that. I've made a simple guess that you could do this with an CROSS APPLY,...

    Thom~

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

  • RE: First time installing vNext on Linux...

    The SQL database engine is incredibly quick to install yes, but I'm not going to really complain about that. Considering that when installing SQl Server on Windows it can take...

    Thom~

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

  • RE: Cant create database (.bak) file..

    We'll need a bit more information than that. Error messages, for example. What SQL are you running to create the backup?

    Thom~

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

  • RE: Minus Column for current month from previous month

    As Kingston said, Lag/Lead, Analytic Functions (Transact-SQL), would be a much better choice.

    Without knowing your full DDL or data sample, this is complete gueswork, but:

    USE DevTestDB;

    GO

    CREATE TABLE #fueltran (ReadingID INT...

    Thom~

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

  • RE: Granting SSRS Access to Cube

    You can still configure datasources to use Windows Authentication (it's one of the options in the Web portal, just make sure you tick "Use Windows Credrentials when connected to the...

    Thom~

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

  • RE: Granting SSRS Access to Cube

    I sounds like you've configured your datasource incorrectly. Are you using a shared datasource or a datasource saved within the report?

    If shgared, have you deployed the datasource? Either way you'll...

    Thom~

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

  • RE: No data in one column of a view (NULL value instead

    polytropic2310 (11/23/2016)


    Nobody can see images I insert in my post or just Luis ???

    We can see them, but pictures don't help us with what the data looks like. If I...

    Thom~

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

  • RE: How to connect sql server 2012 to excel when there is \ in server name

    shy.n86 (11/23/2016)


    Logon,Unknown,Login failed for user 'ABCD'. Reason: Password did not match that for the login provided. [CLIENT: 00.03.00.00]

    Logon,Unknown,Error: 18456<c/> Severity: 14<c/> State: 8.

    You have your error there then. The password...

    Thom~

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

  • RE: Joining Two Tables

    INNER JOINS (msdn) really are the basics on SQL. I would suggest reading on the matter, rather than asking for someone to write you SQL for what looks like a...

    Thom~

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

  • RE: No data in one column of a view (NULL value instead

    I don't have an answer right now but I HAD to fix that awful Word Wrapped SQL you'd pasted, so that someone else doesn't have to:

    SELECT intras_annee,

    ...

    Thom~

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

  • RE: Make Varchar the Default instead of NVarchar

    If you're using an ETL tool, then the ETL tool will be making all the decisions, not SQL Server. The problem isn't SQL Server, it's your ETL tool.

    You said earlier...

    Thom~

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

  • RE: How to connect sql server 2012 to excel when there is \ in server name

    Considering that the error is "Login failed for user '<username>'" this implies that you login details are the problem, not the fact that it has a \ in it. You...

    Thom~

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

  • RE: Make Varchar the Default instead of NVarchar

    As I said above, alphanumeric fields will be treated as an NVARCHAR, not a VARCHAR (techinally, as I said, DT_WSTR, and DT_STR respectively). This is an intentional behaviour (as it...

    Thom~

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

Viewing 15 posts - 4,771 through 4,785 (of 5,109 total)