Viewing 15 posts - 1,261 through 1,275 (of 3,957 total)
hemang.patel (10/21/2013)
Hi,Try these
Declare @id bigint = 1
Declare @string as varchar(100) ='100,200,300,400,500'
DECLARE @testXML XML
SET @testXML = N'<test>' + REPLACE(@string,',','</test><test>') + '</test>'
SELECT @id [id],node.value('.','varchar(100)') as [No]
FROM @testXML.nodes('/test') as records(node)
How does...
October 21, 2013 at 10:03 pm
Almost there.
So does cjohn count as 1 user on 04 Oct or as 2?
October 21, 2013 at 9:13 pm
Like this?
INSERT INTO SampleTable
SELECT 1, Item
FROM dbo.DelimitedSplit8K('100,200,300,400,500', ',')
October 21, 2013 at 9:07 pm
dogramone (10/21/2013)
Have a look here, http://www.sqlservercentral.com/articles/SQLServerCentral/66909/, and then the experts will all come out to play and you will get a very nice solution to your problem.
I agree so I'll...
October 21, 2013 at 6:54 pm
I think you need to be a little more clear about your expected output. To help out, here is you sample data in consumable form.
WITH SampleData AS
(
...
October 21, 2013 at 6:48 pm
Firstly, to avoid confusion, % in the way you are using it is not the modulo operator, it is a search wildcard character.
Secondly, I think what you may be trying...
October 21, 2013 at 6:38 pm
John Mitchell-245523 (10/21/2013)
October 21, 2013 at 6:32 pm
Illustrating what PietLinden suggested, which I like because it avoids the sort inherent in DISTINCT:
WITH SampleData AS
(
SELECT invoice_no
FROM
(
...
October 21, 2013 at 6:27 pm
Jeff Moden (10/21/2013)
In that case, I strongly recommend that you drop the whole idea of using a WHILE loop ...
Just in case the OP can't, I suppose there are lessons...
October 21, 2013 at 6:12 pm
GilaMonster (10/21/2013)
dwain.c (10/21/2013)
Not sure how advisable that is.It's strongly not recommended.
I was being polite. Not meaning that you're being rude of course. But you've got better creds...
October 21, 2013 at 7:30 am
PiMané (10/21/2013)
Just use XLOCK... XLOCK makes an exclusive lock to the record until the transaction is committed...
On c# you can:
1. begin transaction
2. SELECT...
October 21, 2013 at 4:12 am
I think you're going to have issues doing this no matter how you choose to "lock" the records, because if the user closes the web form while a record is...
October 20, 2013 at 11:10 pm
Jeff Moden (10/20/2013)
The problem is, you used REVERSE which the OP said he couldn't do. Heh... you also forget that a Palindrome can contain numeric digits. 😀
Nah... didn't forget....
October 20, 2013 at 8:50 pm
I made a rather small but silly mis-statement which I have corrected and resubmitted.
October 20, 2013 at 7:10 pm
Viewing 15 posts - 1,261 through 1,275 (of 3,957 total)