Viewing 15 posts - 6,661 through 6,675 (of 8,753 total)
Hi and welcome to the forum, here is a quick and straight forward sample, should be enough to get you passed this hurdle.
😎
Note: Suggest that you revise the design...
November 2, 2014 at 12:44 pm
Lynn Pettis (11/2/2014)
Eirikur Eiriksson (11/2/2014)
Quick suggestion, use the FIRSTROW = n, n = number of rows to skip😎
Actually, the n is the number of the row to start with. ...
November 2, 2014 at 7:48 am
Quick suggestion, use the FIRSTROW = n, n = number of rows to skip
😎
November 2, 2014 at 1:07 am
Jeff Moden (10/30/2014)
November 1, 2014 at 4:54 pm
Adding some gas supplies for the stove, first there are five methods for replacing logical operators or comparison operator combination equivalent thereof with a single comparison operator.
😎
USE tempdb;
GO
SET NOCOUNT ON;
...
November 1, 2014 at 4:40 pm
Looking at the XML and the expected results, it is apparent that something is missing in the description;-)
The code below is slightly verbose in order to be self explanatory, note...
November 1, 2014 at 3:11 am
Quick window function based solution with xml path concatenation, should get you passed this hurdle.
😎
USE tempdb;
GO
SET NOCOUNT ON;
IF OBJECT_ID('dbo.data_set') IS NOT NULL DROP TABLE dbo.data_set;
create table dbo.data_set (id int primary...
October 31, 2014 at 11:29 pm
Some additional knowledge/information/logic is needed to complete this as djj mentioned, here is some quick code to get you started.
😎
USE tempdb;
GO
SET NOCOUNT ON;
IF OBJECT_ID('dbo.Webs') IS NULL
BEGIN
Create Table dbo.Webs
(
FullURL nvarchar(255)
);
Insert...
October 30, 2014 at 11:04 am
serg-52 (10/30/2014)
Alternatively use OPENXML
DECLARE @xmlDocument nvarchar(max)
SET @xmlDocument = N'<table>
<tr>
<td>cell1</td>
<td>cell2</td>
<td>cell3</td>
</tr>
<tr>
...
October 30, 2014 at 8:23 am
Tweaking the code a little bit more shaves off approximately 17 percent, here is an all in one code
😎
USE tempdb;
GO
SET NOCOUNT ON;
--===== Create the 100K row test table
...
October 30, 2014 at 5:01 am
Quick thought, the dynamic sql should be nvarchar so use NCHAR(39) where it's needed, it is on the other hand not needed for the parameters, use sp_executesql and the execution...
October 30, 2014 at 1:50 am
Thanks Alan and Jeff, very good job indeed!
This is really the SSC community at it's best and although I haven't had any time to look properly into this, Alan and...
October 29, 2014 at 11:29 pm
A quick solution, should get you passed this hurdle
😎
USE tempdb;
GO
SET NOCOUNT ON;
DECLARE @TXML XML = '<table>
<tr>
<td>cell1</td>
<td>cell2</td>
<td>cell3</td>
...
October 29, 2014 at 2:37 pm
Quick suggestion, use a case statement
😎
USE tempdb;
GO
create table dbo.fun_test(
packtype nvarchar(50),
price money)
insert into dbo.fun_test
values ('Single','2'),('Monthly','25.00'),('Monthly','27.00'),('Monthly','23.50'),('Single','2'),('Deposit','1'),('Deposit','2')
select
PackType
,count(*) as Records
,sum(CASE ...
October 28, 2014 at 11:16 am
Little clean up in the logic, now it looks pretty good
😎
/********************************************************************
-- Stripping out any non-numerical characters
-- EE 2014-10-28 Inital coding
-- EE ...
October 28, 2014 at 7:22 am
Viewing 15 posts - 6,661 through 6,675 (of 8,753 total)