Viewing 15 posts - 12,121 through 12,135 (of 15,381 total)
It can get really difficult to test this fairly easily. It is difficult to test the second proc. You have to go back and figure out how to create the...
May 2, 2012 at 10:50 am
polkadot (5/2/2012)
This CAST solution retrieve the whole year YYYY. I need YY.
So get the right 2.
May 2, 2012 at 10:42 am
Not really sure what you mean but can you use ISNULL in your sql? That way you will get a default date if there is no date.
May 2, 2012 at 10:38 am
Something like this?
(max(Ac_Client_Ledger_Transactions.PostedDate) <='2011-04-20')
May 2, 2012 at 10:36 am
Sure Excel has this type of formatting built in. Just right click -> format Cells -> chose your desired format. You can do this on a whole column in 1...
May 2, 2012 at 10:32 am
patrickmcginnis59 (5/2/2012)
Sean Lange (5/2/2012)
May 2, 2012 at 10:28 am
Something like this should work...
declare @Date datetime = '2011-10-07 13:18:48.720'
select LEFT(CAST(@Date as varchar(20)), 3) + '-' + CAST(YEAR(@Date) as CHAR(4))
May 2, 2012 at 10:27 am
This type of formatting really belongs in the front end and not in t-sql. However if you have to format it from sql you will have to make liberal use...
May 2, 2012 at 10:22 am
Lynn Pettis (5/2/2012)
Sean Lange (5/2/2012)
Lynn Pettis (5/2/2012)
Sean Lange (5/2/2012)
Lynn Pettis (5/2/2012)
Sean Lange (5/2/2012)
May 2, 2012 at 10:09 am
Lynn Pettis (5/2/2012)
Sean Lange (5/2/2012)
Lynn Pettis (5/2/2012)
Sean Lange (5/2/2012)
May 2, 2012 at 10:03 am
You can't cast that as TIME. You are talking hours and minutes.
Given your description take a look at this.
;with MyData(col1)
as
(
select 2932 union all
select 624
)
select CAST(col1/60 AS VARCHAR(6)) + ':' +...
May 2, 2012 at 9:52 am
Lynn Pettis (5/2/2012)
Sean Lange (5/2/2012)
May 2, 2012 at 9:43 am
Well unless you are doing on the most god awful things I have seen some sql people do...which is to create a temp table and then call a stored proc...
May 2, 2012 at 9:29 am
That can't possibly be the entire code for your proc. It is selecting data from temp tables that are not declared inside the proc.
May 2, 2012 at 9:18 am
Viewing 15 posts - 12,121 through 12,135 (of 15,381 total)