Viewing 15 posts - 181 through 195 (of 683 total)
Well, I'm confused with this thread. Why not just this?
select replace(@var, char(10) + char(13), '')
This works on my machine. The string you gave is '1yxyx2yx3yxyx4yx5' where y = char(13) and...
April 21, 2008 at 9:29 am
Could it all be permissions related?
BOL (http://technet.microsoft.com/en-us/library/ms186301.aspx)...
"built-in functions such as OBJECT_NAME may return NULL if the user does not have any permission on the object"
April 21, 2008 at 9:00 am
Oops - yep I missed the ID :pinch: - glad I could help though 🙂
April 21, 2008 at 8:42 am
Chris Morris (4/21/2008)
RyanRandall (4/21/2008)
This uses explicit conversion, rather than implicit[/code]
Chris
I don't see any implicit conversion. Are you suggesting that what I posted is implicit?
Hi Ryan
Not at all - CAST() is...
April 21, 2008 at 7:58 am
This would be a guess in the absence of more information. To put this together, I first focused on getting the data we needed from the COSTS table and in...
April 21, 2008 at 7:56 am
The query you will need will be much less complicated than this. If you post your table structure, and some sample data, it will be much easier and quicker for...
April 21, 2008 at 7:43 am
Roy Ernest (4/21/2008)
SELECT blah
FROM blah
WHERE IsValid = 1
...
April 21, 2008 at 7:40 am
Lil Ms Squirrel (4/21/2008)
If @SiteNumber = -1 then I want to return all records but if @SiteNumber has a value of one or greater...
April 21, 2008 at 6:40 am
select replace(convert(varchar(8), getdate(), 3), '/', '')
April 21, 2008 at 6:16 am
karthikeyan (4/21/2008)
But Andras i dont want to use any functions. Because i dont have the permission to create functions.
Yes. Tricky. Maybe you can do something along these lines...?
select 'start' --needed...
April 21, 2008 at 6:12 am
1 or -1? Anyway, here's one way...
SELECT blah FROM blah WHERE IsValid = 1 AND (@SiteNumber = -1 OR SiteNumber = @SiteNumber)
April 21, 2008 at 5:41 am
This uses explicit conversion, rather than implicit[/code]
Chris
I don't see any implicit conversion. Are you suggesting that what I posted is implicit?
April 21, 2008 at 5:38 am
I feel that we haven't quite pinned your requirements down yet. Maybe the sample data and query here will help...?
declare @t table (TradeRef varchar(32))
insert @t
...
April 21, 2008 at 5:32 am
Robert (4/21/2008)
The OP wrote a vague question. If he/she doesn't take the effort to clear doubts, why do you keep guessing?
Hi Robert
There are a few reasons. Some people find it...
April 21, 2008 at 4:55 am
April 21, 2008 at 4:23 am
Viewing 15 posts - 181 through 195 (of 683 total)