Viewing 15 posts - 646 through 660 (of 1,923 total)
Hello Marty,
You still on the thread ? Did the code i sent work for you?
September 8, 2011 at 8:50 am
Jeff Moden (9/7/2011)
Well done, CC.
Thanks, Jeff..
September 8, 2011 at 1:53 am
You can use SELECT INTO also , to insert the result set into a table
SELECT INV_NO
,BLANK = SUM ( CASE WHEN...
September 7, 2011 at 9:42 am
Here is how you must present data so that people viewing the thread will hop on to it asap
Sample data:
IF OBJECT_ID('TempDB..#TempData') IS NOT NULL
DROP...
September 7, 2011 at 9:39 am
Mark, i know of a easy way to do that .
First, your visual representation of the data is good. But it would greatly help if you had provided the data...
September 7, 2011 at 9:06 am
Jeff is 100% right on his assessment of my code. There can be MANY tweaks. As a humble student of his, i wanted to impress my mentor. Jeff if u...
September 4, 2011 at 11:15 pm
Added more details in code and optimized it.
DECLARE @StartDATE DATETIME
,@EndDate ...
September 4, 2011 at 9:48 am
And coming to my code, a 0-based will throw the CASE statement out of sync. That's why i din't use it 🙂
September 4, 2011 at 9:35 am
R.P.Rozema (9/4/2011)
This is easily accomplished by adding -1 to row_number().
Thanks Rozema for "bettering" it out. If zero based tally table will make it cleaner, we can do something like
Tally...
September 4, 2011 at 9:32 am
Welsh Corgi (9/3/2011)
Very cool code @ColdCoffee.
Thank you Welsh!
September 4, 2011 at 1:16 am
Wooshy tooshy 🙂 i was in love with the requirement so i got coding for this in my flight to North Carolina 🙂 hows that for dedication 😛
First Part of...
September 2, 2011 at 10:04 am
How will this do?
; WITH ConvertedValues AS
(
SELECT [account]
, DATEADD( MM , DATEDIFF( MM , 0, CONVERT( DATETIME ,...
August 31, 2011 at 7:40 pm
How about this?
DECLARE @Table Table
(
RecordNum INT IDENTITY(1,1)
,strDomainName VARCHAR(255)
,strShortName VARCHAR(255)
)
INSERT INTO @Table ( strDomainName)
...
August 31, 2011 at 6:07 pm
Depends on SET IMPLICIT_TRANSACTIONS setting in the connection/database level property.
But generally , if u wont want to auto-commit , u can have something like this
BEGIN TRAN
insert
update
delete
and once you confrm...
August 31, 2011 at 3:44 pm
All of the 4 books are great 🙂 No prejudice , i just love all of 'em 😛
August 31, 2011 at 2:55 pm
Viewing 15 posts - 646 through 660 (of 1,923 total)