Viewing 15 posts - 136 through 150 (of 2,006 total)
Thanks for taking the time to reply Jeff.
Unfortunately, none of the options you've laid out are viable for me. If I did any of them, the only loser would be...
January 29, 2014 at 5:38 am
Probably not the best way to do this, just off the top of my head: -
DECLARE @code NVARCHAR(255);
SET @code = '12333345566689';
WITH CTE(N) AS (SELECT 1 FROM (VALUES(1),(1),(1),(1),(1),(1),(1),(1),(1),(1))a(N)),
CTE2(N) AS (SELECT 1...
January 20, 2014 at 7:57 am
Make sure that you understand it. You've got to support the code, not me 😉
January 13, 2014 at 6:54 am
Couple of minor corrections here.
IF EXISTS (SELECT 1 FROM sysobjects WHERE id = OBJECT_ID('xml_to_table') AND OBJECTPROPERTY(id, 'IsProcedure') = 1)
BEGIN;
DROP PROCEDURE [dbo].[xml_to_table];
END;
GO
CREATE PROCEDURE [dbo].[xml_to_table] (@XML XML) AS
BEGIN;
...
January 13, 2014 at 6:42 am
This is going to need a lot of testing. Also, I'm not sure that it's the best way to go about this sort of problem. I've written this more as...
January 13, 2014 at 6:37 am
Also not exactly a wizard at XML, so I have no idea how this'll scale.
--== SAMPLE DATA ==--
DECLARE @XML XML = '<users>
<userTime>
...
December 2, 2013 at 1:44 am
Minnu (11/29/2013)
Gettting below error
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
is there any method to convert '-' to datetime,
in my scenario,...
November 29, 2013 at 9:01 am
Minnu (11/29/2013)
Hi Team,DECLARE @TEMP VARCHAR(100),
@DATETIME DATETIME
SET @TEMP = NULL
SET @DATETIME = CONVERT(DATETIME,ISNULL(@TEMP,'-'))
PRINT @DATETIME
Please help
What are you trying to achieve? Currently, you're trying to convert the char value "-" into a...
November 29, 2013 at 5:03 am
Ed Wagner (11/25/2013)
They aren't better or worse than joins, but they are different. Paul White has a good article posted at http://www.sqlservercentral.com/articles/APPLY/69953/ and part 2 is at http://www.sqlservercentral.com/articles/APPLY/69954/.
To supplement...
November 25, 2013 at 6:34 am
vignesh.ms (11/6/2013)
@ Cadavre :Thanks for your understanding
Please explain how it works...?
Note: This is the second version of this explanation as the forums ate the first explanation. No...
November 6, 2013 at 9:16 am
Ryan Keast (11/6/2013)
I have the following part in my Select statement -
Select CASE WHEN dbo.[IH_RE-TNCY-PERSON].[ON-TNCY] = '1'
THEN 'yes'
ELSE dbo.[IH_RE-TNCY-PERSON].[ON-TNCY] END AS 'on-tncy',
I get the error -...
November 6, 2013 at 7:00 am
Here's some code that replaces your loop and does the same job: -
-- Sample data
IF object_id('tempdb..#sample') IS NOT NULL
BEGIN;
DROP TABLE #sample;
END;
CREATE TABLE #sample (saledate DATETIME, custname...
November 6, 2013 at 6:05 am
vignesh.ms (11/6/2013)
* My query works what I'm intended to do.
* My expectation is I dont want to hard code the date.
I tried myself, following...
November 6, 2013 at 5:50 am
Cadavre (11/6/2013)
-- Sample data
IF object_id('tempdb..#sample') IS NOT NULL
BEGIN;
DROP TABLE #sample;
END;
CREATE...
November 6, 2013 at 4:31 am
Stab in the dark because you haven't been very clear in what you want to do: -
-- Sample data
IF object_id('tempdb..#sample') IS NOT NULL
BEGIN;
DROP TABLE #sample;
END;
CREATE TABLE...
November 6, 2013 at 4:11 am
Viewing 15 posts - 136 through 150 (of 2,006 total)