Viewing 15 posts - 11,296 through 11,310 (of 13,879 total)
Jayanth_Kurup (6/27/2011)
Phil Parkin (6/27/2011)
Something like this:
declare @MaxToPoint Intselect @MaxToPoint = max(ToPoint) from PLevel
If @frmPoint <= @MaxToPoint then --> error
Hi
This would remove scope for inserting a range between 1 and...
June 27, 2011 at 4:48 am
Something like this:
declare @MaxToPoint Int
select @MaxToPoint = max(ToPoint) from PLevel
If @frmPoint <= @MaxToPoint then --> error
June 27, 2011 at 4:22 am
I am assuming that selecting MAX(ToPoint) and making sure that your range is above that is not adequate?
June 27, 2011 at 3:50 am
Please mark the bit that is creating the error. 'Third step' does not make it clear to me.
Also, please post the text of the error message.
June 24, 2011 at 5:21 am
It's not easy to understand what you are asking - can you provide sample input data, with desired output?
June 24, 2011 at 2:05 am
GilaMonster (6/23/2011)
The first there's a function applied to the column. That makes the predicate non-SARGable, meaning SQL can NEVER use an index seek operation...
June 23, 2011 at 11:21 am
As you are looking from the start of the column, you can use this
WHERE LEFT(fldField,3) = 'NCB'
- just a little tidier and avoids wildcards.
June 23, 2011 at 9:58 am
Here is proof that "it works"
DECLARE @a CHAR(1) = CHAR(10)
SELECT @a, ASCII(@a), REPLACE(@a,CHAR(10),' '), ASCII(REPLACE(@a,CHAR(10),' '))
Now please try to explain how your problem is different from what has been suggested.
June 23, 2011 at 9:40 am
How large is 'large'? Do you want to do this internally (ie, using your own network/Exchange infrastructure), or use a third party (which you might, if large really is LARGE)?
June 23, 2011 at 1:48 am
Try something like this:
DECLARE @a VARCHAR(20) = '010711'
SELECT @a,
'20' + RIGHT(@a, 2) + SUBSTRING(@a, 3, 2) + LEFT(@a, 2)
June 22, 2011 at 5:34 am
Jnrstevej (6/22/2011)
I'm trying to format the column(dueDate) which contains the date to a YYYYMMDD format
My understanding to achieve this would be
select convert(varchar,getdate(),112)
select CONVERT(date,duedate,112)
from test
--my attempt
select convert(varchar,duedate,112
from test
--Test table...
June 22, 2011 at 5:30 am
Nasty.
I've thought about the logic a little & this might work:
If @StartDay <= @EndDay then
where Day(Birthdate) Between @StartDay and @EndDay
else
where Day(Birthdate) Not Between @StartDay and...
June 22, 2011 at 2:30 am
Sachin4all (6/21/2011)
select utid,date,time
from time t
where transactiontime between ? and ?
I have created the varibles startdate and enddate as datetime
Sourcetype as directinput...
June 21, 2011 at 1:01 pm
You asserted it was okay to ommit readability because it's got no technical function in the post I replied to. I'm pointing out that that's specious.
You continue to infer things...
June 21, 2011 at 8:46 am
Viewing 15 posts - 11,296 through 11,310 (of 13,879 total)