Wednesday, March 28, 2012
Need Help 2
I am currently trying to figure out how to code this
I need the count of all rows in colum TERM that is > 1 when its grouped by the COLUM NAME
Anyone got any Ideas,i'm not sure wheter i get it right.
hope that it was the thing that you ask for.
Select TERM,Count(<table key>) as Cnt from <Table \name>
Wher TERM > 1
Group by TERM.
If I didn't get it right then just forget about it.
:D|||select count(*) from tbl
where term in
(
select term from tbl group by name having count(*) > 1
)
Monday, March 26, 2012
Need help
Lets say, I have a TABLE that has colums
A B C D
Now, I have added a 5th colum E
I want to populate E with D
I can't seem to get the insert command right,
Anyone ??Hello, please try this:
UPDATE myTable SET E=D;
Originally posted by ChrisWBates
This may seem like a dumb question, but here is what I am trying to do,
Lets say, I have a TABLE that has colums
A B C D
Now, I have added a 5th colum E
I want to populate E with D
I can't seem to get the insert command right,
Anyone ??|||Or more fully
UPDATE A SET E=D FROM myTable99 A
GOsql
Friday, March 23, 2012
Need expression help ASAP
I have a report in ssrs where it has a colum with dates in it I has and other colum with either a $0.00 amount or and amount paid. I need a colum which which calculates only the number of days from the date colum that when the other colum =0 it gives me the total number of days. VS.net SQL 2005 SSRS C#
example of what needed:
Invoice amount | Date of Invoice| Amount received | number days past due
$100.00 06/01/2007 0.00 18 days ( this is what I need)
can some one explain.
Here are my expressions
FormatCurrency(Fields!Grossamtbilled.value)
FormatDateTime(Fields!EXPR1.Value,2)
FormatCurrency(Fields!RCVAMOUNT.Value)
I'm not sure what expression you would use when creating a report, but it would be fairly easy to do it in the original SQL Statement (by using a mixture of the CASE and DateDiff functions).
sql