Viewing 15 posts - 1,486 through 1,500 (of 1,923 total)
Jeff Moden (5/21/2010)
May 21, 2010 at 12:29 am
Don't use INSERT INTO, rather use SELECT * INTO for the new 7 column temp table. Like:
SELECT COL1, COL2, COL2 , COL4, COL5, COL6, NULL COL7
INTO #TEMP
FROM REALTABLE
And then...
May 20, 2010 at 10:24 am
Kannbiran, when u change the dateformat to DMY, the insert statement must also follow suite and contain rows like '01-Mar-2010' or '30-03-2010' etc..
May 20, 2010 at 3:31 am
Jeff Moden (5/19/2010)
ColdCoffee (5/19/2010)
Thanks Jeffy;
Ummm.... not to be a stick in the mud but two people in the known universe get to call me "Jeffy"... and you're not either one...
May 19, 2010 at 8:37 pm
Jack Corbett (5/19/2010)
May 19, 2010 at 8:25 pm
WayneS (5/19/2010)
DECLARE @YOUR_TABLE TABLE...
May 19, 2010 at 8:20 pm
I will go further and give you this:
1. First the sample table and sample rows set up
DECLARE @NUM_TABLE TABLE
(
NUM INT
)
INSERT INTO @NUM_TABLE
SELECT 11536 UNION
SELECT 123057 UNION
SELECT 11015...
May 19, 2010 at 9:53 am
Hi there, try this:
select stuff( stuff(cast(015136 as varchar),2,0,':') , 5,0,':')
😎
May 19, 2010 at 9:41 am
Jeff Moden (5/19/2010)
ColdCoffee (5/18/2010)
Jeff Moden (5/18/2010)
niteshrajgopal (5/18/2010)
Hi again, is there anyway I can add to your reputation or something on this forum:-)
Heh... not to worry. CC is building his...
May 19, 2010 at 9:31 am
You can use homebrew01's idea, but then there is a catch there; when u declare it inside the dynamic sql, your code which used "maxno" has to be packed up...
May 19, 2010 at 9:27 am
Hi, This is my first attempt at running totals, hope i am not screwing up anything!
Now setting up the test environtment:
SET DATEFORMAT YMD
IF OBJECT_ID('TEMPDB..#A') IS NOT NULL
DROP TABLE #A
CREATE TABLE...
May 19, 2010 at 6:10 am
Hi, if your table would not have millions and millions of record, then the following code would suffice your needs!
Code :
1. The test set-up ; Please look at how...
May 19, 2010 at 5:41 am
Use DATALENGHT function, This will calculate white spaces at both ends of the string. This might help your cause!
May 19, 2010 at 3:31 am
You may probably wnat to read thro one excellent article from Jeff Moden on how to "REPLACE Multiple Spaces with One"
LINK : REPLACE Multiple Spaces with One[/url]
Hope this helps you!
May 19, 2010 at 2:05 am
You can make use of the ASCII funtion!
Like this
SELECT ASCII('x') -- = 120
SELECT ASCII('X') -- = 88
Now u can compare both the fields and when then match do something...
May 19, 2010 at 2:01 am
Viewing 15 posts - 1,486 through 1,500 (of 1,923 total)