Forum Replies Created

Viewing 15 posts - 9,181 through 9,195 (of 15,381 total)

  • RE: How to split query result into seperate columns

    Jeff Moden (3/4/2013)


    Sean Lange (3/4/2013)


    Ed Wagner (3/4/2013)


    Thanks, Sean. Good article. You know, I'm consistently impressed by just how many different uses there are for the tally table. ...

  • RE: JOIN problems

    asm1212 (3/4/2013)


    Ok nevermind again...I was counting the wrong account number from a different table...I have it now and it is correct...Thank you for your input, it is greatly appreciated!

    You are...

  • RE: JOIN problems

    You will have to move your where condition to the join also. I have to say that your tables look like they could use some normalization.

    Something like this is maybe...

  • RE: JOIN problems

    Well obviously your sample and your query don't quite match up. 😉

    But you still have an inner join in here.

    SELECT rc.ResultCode,

    COUNT(a.AccountNumber)

    FROM dbo.ResultCodes rc

    LEFT OUTER JOIN dbo.Accounts a ON rc.ResultCode =...

  • RE: JOIN problems

    asm1212 (3/4/2013)


    Hey guys,

    I have these result codes from one table...There are like 12 distinct ones...When I join to the another table to get how many accounts were associated with each...

  • RE: sql2005

    eboucicaut (3/4/2013)


    hello ,

    i need some help plase

    how i can get the login who excute a query on my serversql 2005

    thank u in advance

    Are you trying to figure out after the...

  • RE: Date Add in table

    Excellent job setting up the problem. This is certainly possible using a tally table.

    ;with DateVals as

    (

    select SchoolID, min(CalendarDate) as StartDate, max(CalendarDate) as EndDate, datediff(day, min(CalendarDate), max(CalendarDate)) as TotalDays

    from #x1

    group by...

  • RE: Number of days between two integer date columns

    Looks like Lynn beat me to the punchline. 😀

  • RE: Number of days between two integer date columns

    sunder.mekala (3/4/2013)


    Hi Friends,

    I have a requirement where i have to write a Sql for :

    basically i have 2 columns 'startdate_SK' and 'enddate_SK' columns in table 'A'

    'startdate_SK' is a integer...

  • RE: Primary key or not to primary key, that is the question

    Just a rambling here...you seem to be somewhat concerned with storage space. You also have obviously realized the challenges of using a unique identifier as your PK. You have ended...

  • RE: date format 7/31/2013

    dhananjay.nagarkar (3/4/2013)


    Hi friends,

    Im new to TSql -

    I have requirement to display date as 7/31/2013 but currently I'm getting it from DB as 2013-03-01 18:40:24.000.

    any help on this will he...

  • RE: performance issues in parsing multiselect string paramters in SSRS, pfb the code

    It is very unclear what is going on here. Is your query working but the results are too slow? Is the query not working as expected? If it is a...

  • RE: How to split query result into seperate columns

    Ed Wagner (3/4/2013)


    Thanks, Sean. Good article. You know, I'm consistently impressed by just how many different uses there are for the tally table. So simple in design,...

  • RE: date problem

    This should work based on your description.

    declare @WeekOfYear int = datepart(week, getdate()) --10

    declare @Year int = datepart(year, getdate()) --2013

    declare @DayNumber int = datepart(weekday, getdate()) --2

    declare @BaseDate datetime = cast(@Year as...

  • RE: MERGE problem -> when I need to reenter an entry which is already in the history

    Hi and welcome to SSC. You seem to have a challenge you are dealing with. Unfortunately you haven't posted anywhere near enough information for anybody to be able to provide...

Viewing 15 posts - 9,181 through 9,195 (of 15,381 total)