Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing
Message
From
20/09/2002 09:23:49
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
00702476
Message ID:
00702674
Views:
15
Interesting, it returned a value of 65.

I guess I would be hesitant to change this value as it may impact
other stored procs. The system was originally written in v 6.5 and converted to SQL2K about one year ago.

>Check compatibility level using sp_dbcmptlevel. If it's last than 70 than empty string literal ('') is interpreted as a single blank. It also could affect some other commnads and behaviors.
>
>>SQL Server 2000. That's odd, is there some other setting that could be giving me results different from you?
>>
>>>Yes, I tested it under SQL 2000 and it returns result w/o spaces. What version are you running?
>>>
>>>>Sergey, did you test this? Here are my results:
>>>>
>>>>select convert(varchar,getdate(),114)
>>>>retuns: 08:01:30:890
>>>>
>>>>select replace(convert(varchar,getdate(),114),':','')
>>>>returns: 08 01 30 890
>>>>
>>>>Notice the spaces that are being returned.
>>>>
>>>>>You can use T_SQL REPLACE() function to remove colons.
SELECT REPLACE(CONVERT(varchar(32), getdate(),114), ':', '')
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform