Viewing 15 posts - 61 through 75 (of 82 total)
Different way of doing the same thing. Slightly shorter code:
select stuff(stuff(stuff(stuff(stuff(stuff(@eftv_dt,5,0,'-'),8,0,'-'),11,0,' '),14,0,':'),17,0,':'),20,7,'')
February 6, 2003 at 8:15 am
You could try something like this, which will curser through a table column, converting each row into title case, ie upper case the first letter of every word following a...
January 31, 2003 at 3:09 am
Yep, that makes more sense. Ignore my answer!
Until this point I never realised that numeric allows greater calculating abilities than ints or bigints - doh!
January 21, 2003 at 10:15 am
Hmmm
Well that's going to be a bit of a problem then.
Basically you won't be able to do that calculation as is, as sql cannot calculate int values over the maximum...
January 21, 2003 at 9:37 am
Wrap each numeric part inside a cast as bigint statement. That should give you a few trillion to play with.
select cast( as bitint) * cast(8192 as bigint) etc...
January 21, 2003 at 8:52 am
So Antares686
It sounds like you had an idea up your sleeve as to how to order a full rowed table like:
SELECT * FROM TestC, TestC As TblA
so,what was it,...
January 20, 2003 at 5:38 am
In my keenness to post a reply, I neglected to join in the 'debate'
The query uses a cross join
select a, b, c, d, e
from testC ,(select cast(newId() as varchar(50))...
January 17, 2003 at 10:43 am
select a, b, c, d, e
from testC ,(select cast(newId() as varchar(50)) as GUID) as B
Order By GUID
January 17, 2003 at 10:32 am
Try something like this:
CREATE PROCEDURE spProcess
@strDynTable char (30),
@id int
declare @sql varchar(8000)
set @sql = '
declare @tmpuid varchar(50)
select @tmpuid = uid from '+ @strDynTable+' where id...
January 16, 2003 at 10:13 am
Consider it verified!
In which case, can I revise my original post to "Can you time something that runs in less that three millisecond"...no never mind!!, Thanks for your replies
December 17, 2002 at 10:49 am
Well like I said, was more out of interest that a real need.
But if you had a piece of code that could be written in two different ways, and both...
December 17, 2002 at 9:15 am
I don't know if others think this is a bad idea, but one option you potentially have is to remove the offending word from SQL's Ignored/Noice file, typically found in:
\\SERVERNAME\c$\Program...
December 17, 2002 at 2:10 am
Hi
Thanks for replying.
I like that idea, it only falls down if there is a single entry in the staging table, it will still do the full incrementation on all updated...
November 22, 2002 at 10:22 am
--Try:
-- set up parameter
declare @Date datetime
set @Date = '01 jan 2002 12:00:00.000'
-- convert date into text format
select convert(varchar(30), @date, 106)
--or take day part and pad with leading zero
if len(day(@date)) =...
November 11, 2002 at 10:11 am
Getdate() cannot be used in User Defined Functions (because it is not deterministic).
I guess in this instance, the current date would have to be passed in as a parameter.
...
October 17, 2002 at 10:08 am
Viewing 15 posts - 61 through 75 (of 82 total)