Viewing 15 posts - 376 through 390 (of 516 total)
try using this:
BEGIN TRAN
SELECT *
FROM test_table (tablockx)
WHERE col1 = '1' ...
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 22, 2012 at 3:19 am
rVadim (8/22/2012)
Lokesh Vij (8/21/2012)
WITH CTE AS(
SELECT CAST( (SELECT CAST( col1 AS varchar(10))+ ','
...
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 22, 2012 at 2:21 am
you can use sp_getapplock. Check out the following link:
http://msdn.microsoft.com/en-us/library/ms189823.aspx
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 22, 2012 at 2:19 am
Slight modification in CTE:
WITH CTE AS(
SELECT CAST( (SELECT CAST( col1 AS varchar(10))+ ','
FROM @test-2 b...
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 21, 2012 at 11:50 pm
If it is always the second character string that you want to extract do it like this:
DECLARE @text VARCHAR(100) = 'abc_def_cet_qwe '
DECLARE @start_index INT
DECLARE @end_index INT
SELECT @start_index = CHARINDEX('_', @text,...
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 21, 2012 at 9:58 pm
Good question:-)
Its always wonderfu to brush up our fundamentals 😀
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 20, 2012 at 9:52 pm
Easiest question of all times..thanks for an easy 1 point 🙂
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 18, 2012 at 11:46 pm
Create a function or stored procedure with @hyphen and @inputstring as arguments or parameters
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 17, 2012 at 12:18 am
DECLARE @hyphen VARCHAR(100) = '2,10',
@inputstring VARCHAR(max) = 'ABCDEFGHIJKLMNOPQRST',
...
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 17, 2012 at 12:17 am
Hope you are looking for something like this:
DECLARE @LoginName VARCHAR(128);
DECLARE @dynsql VARCHAR(max);
DECLARE @default_db VARCHAR(200) = 'AP';
DECLARE @role_name VARCHAR(100) = 'PaymentEntry';
DECLARE c_login CURSOR FOR
SELECT LoginName
FROM ...
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 16, 2012 at 10:01 pm
Keld Laursen (VFL) (8/15/2012)
Lokesh Vij (8/15/2012)
Keld Laursen (VFL) (8/15/2012)
Thanks for the question. I...
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 16, 2012 at 12:09 am
Keld Laursen (VFL) (8/15/2012)
Thanks for the question. I were fairly sure that I...
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 15, 2012 at 11:54 pm
Lowell (8/15/2012)
everything other...
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 15, 2012 at 10:03 pm
Good one. Learnt something obvious 🙂
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 15, 2012 at 10:00 pm
rVadim (8/14/2012)
I think any comparison against NULL will yield Unknown, which is not True, and therefore records won't be returned.
+1
Yes that's correct!
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
August 14, 2012 at 9:25 pm
Viewing 15 posts - 376 through 390 (of 516 total)