Forum Replies Created

Viewing 15 posts - 16 through 30 (of 46 total)

  • RE: smart work with select

    select ',' , column_name from information_schema.columns where table_name = 'x'

    That will give you a result set which has columns listed

    , columnA

    , ...

  • RE: help with date query

    as mentioned above it has to do with the time portion.

    select convert(datetime,date), getDate() from TblJobClock to see the comparison you were attempting to make.

  • RE: Subtotals in t-sql

    Definitely a much improved version.

  • RE: Subtotals in t-sql

    Excellent.

    Hope that works out for you.

  • RE: syntax error

    First glance: you have your comparison inside of the trim/cstr functions

    trim(cstr(Fields!Total.Value =""))

    vs

    trim(cstr(Fields!Total.Value)) =""

    also

    iif(trim(cstr(isnothing(Fields!Total.Value)))

    should likely be

    iif(isnothing(trim(cstr(Fields!Total.Value)))

    because you are not trimming and converting the results of the isnothing(), you are checking...

  • RE: Subtotals in t-sql

    This isn't pretty but looks like it may get what you want as far as formatting, etc.

    create table #gmreport (

    Type int, -- 1 = Entry or Subtotal, 2 = Final...

  • RE: help with "joiN' quiries

    tommey152 (3/30/2012)


    --Question 11 .No of Employees Joined in each year, output of this query should be “Year”, “No Of Employees Joined”

    select

    distinct DateOfJoin,

    COUNT(EmployeeID)...

  • RE: help with "joiN' quiries

    We have identified an issue with your initial join(s).

    Same with question 5.

    If you have specific questions I would attempt an answer.

  • RE: help with "joiN' quiries

    schrodinger's departname

  • RE: help with "joiN' quiries

    I pointed put a potential flaw in your join logic.

    You seem focused on questions.

    I apologize if I am off base but I just feel as though you are just wanting...

  • RE: help with "joiN' quiries

    In that second join JobID is not likely to join correctly to DeptID.

    I would start there.

    Though you say it is not homework, I'm curious as to where you came up...

  • RE: help with "joiN' quiries

    In my opinion you should provide your failed queries so we can guide you in the right direction.

    No one is likely (hopefully) going to just answer your homework questions outright.

  • RE: Identity_Insert

    You will need to specify your insert column list.

    Default behavior would not insert into the identity column.

    SET IDENTITY_INSERT TEST ON

    GO

    INSERT INTO TEST (id, name) VALUES (11, 'Hrithik')

  • RE: need help with CASE stmt and table joins

    Just having fun, no offense intended.

  • RE: need help with CASE stmt and table joins

    I'm not so sure, I think the answer is below.

Viewing 15 posts - 16 through 30 (of 46 total)