Viewing 15 posts - 271 through 285 (of 2,893 total)
Alan.B (7/24/2013)
Erland Sommarskog (7/24/2013)
Alan.B (7/24/2013)
Why is the SELECT@x=@x+ method not guaranteed to work?
Why would it?
See this KB article Pay particular attention to the first sentence under Cause.
I say it...
July 25, 2013 at 3:57 am
...
While I generally agree lets not go off on a rant.. Perhaps I read that wrong, but we don't need to be testy.
As a rule you should never use...
July 24, 2013 at 10:50 am
NineIron (7/24/2013)
Thanx. I don't think we're being served very well....................
So, if you have no choice, but to rename database (as your client/employer requires you to do), you must go inside...
July 24, 2013 at 10:41 am
RAISERROR cause transaction to rollback, so your log insert is rollbacked as well as delete...
Check use of self-linked server in order to simulate autonomous transaction in SQL Server.
July 24, 2013 at 10:36 am
NineIron (7/24/2013)
July 24, 2013 at 10:30 am
Elliott Whitlow (7/24/2013)
I'm pretty sure they are telling you wrong.. The USE statement is not permitted inside a stored procedure...
Unless it's not in dynamic SQL, which is absolutely fine:
CREATE PROC...
July 24, 2013 at 10:11 am
dan-572483 (7/24/2013)
July 24, 2013 at 10:05 am
Sean Lange (7/24/2013)
July 24, 2013 at 8:50 am
ksatpute123 (7/24/2013)
Easiest wayDECLARE @listStr VARCHAR(MAX)
SELECT @listStr = COALESCE(@listStr+',' ,'') + Name
FROM Production.Product
GROUP BY Name
SELECT @listStr
🙂
Yep, does look like. However...
Correct concatenation of string values (eg. accumulating of numeric values)...
July 24, 2013 at 8:45 am
tommyh (7/24/2013)
select count(*)
Now to my supprise it returned 1. Anyone know why it...
July 24, 2013 at 6:05 am
karunakar2351 (7/22/2013)
The datatype of the column is varchar(50)
Obviously very wrong choice for storing dates, as it allows to contain any string.
Now, the best way to fix all possible issues...
July 22, 2013 at 7:02 am
if your column is of DATETIME or DATE datatype, it doesn't have any format. So you cannot change the format of it!
The way SQL Server stores dates internally has nothing...
July 22, 2013 at 6:06 am
Here is one of the short form which can be used for ITV function
RETURN SELECT ISNULL(CASE WHEN ISDATE(@value) = 1 THEN CASE WHEN CAST(YEAR(@Value) AS CHAR(4)) = LEFT(@Value,4) THEN 1...
July 22, 2013 at 5:56 am
Ananth@Sql (7/22/2013)
1 and 1 to 12 and date should be between 1 to...
July 22, 2013 at 5:52 am
If system architecture wants to use ORM methodology (eg. Entity Framework, NHibernate and any other) then, as DBA, you should provide relevant permission/access model.
July 22, 2013 at 5:41 am
Viewing 15 posts - 271 through 285 (of 2,893 total)