Viewing 15 posts - 6,196 through 6,210 (of 8,753 total)
dwain.c (2/6/2015)
Erikur is too quick for me but here's another way:
😀
The logic is exactly the same, I just short-handed the CASE statement with a little math. Note that the math...
February 6, 2015 at 2:03 am
Quick solution using the APPLY operator
😎
USE tempdb;
GO
SET NOCOUNT ON;
DECLARE @MappingTable TABLE
(
Productname nvarchar(10),
identification_key1 int,
identification_key2 int,
identification_key3 int
);
insert into @MappingTable(Productname,identification_key1,identification_key2,identification_key3)
VALUES ('Apple' , 1,2,1)
,('Orange', 1,2,3)
...
February 6, 2015 at 1:34 am
Further on Jeff's answer, could you post the DDL for the table and everything that comes with it (indexes, constraints, triggers etc.)?
😎
February 5, 2015 at 9:46 pm
Jeff Moden (2/4/2015)
Sean Lange (2/4/2015)
Sioban Krzywicki (2/4/2015)
Sean Lange (2/4/2015)
Sioban Krzywicki (2/4/2015)
Grant Fritchey (2/4/2015)
Eirikur Eiriksson (2/4/2015)
Sioban Krzywicki (2/4/2015)
Grant Fritchey (2/4/2015)
Brandie Tarvin (2/4/2015)
February 4, 2015 at 10:59 pm
ma701ss (2/4/2015)
February 4, 2015 at 10:29 pm
This should get you passed this hurdle
😎
USE tempdb;
GO
SET NOCOUNT ON;
DECLARE @TXML XML = '<?xml version="1.0"?>
<STOREITEMS>
<CREATED>
<CATEGORY id="127" name="Category 1">
<PRODUCT ITEM="4023">
<NAME>Patriot</NAME>
<MODEL>7505</MODEL>
<PRICE>10.46</PRICE>
<RRP>20.00</RRP>
<THUMB>07505ds.jpg</THUMB>
<IMAGE>07505.jpg</IMAGE>
<MULTI/>
<MULTI1/>
<MULTI2/>
<MULTI3/>
<BIGMULTI1/>
<BIGMULTI2/>
<BIGMULTI3/>
<DESCRIPTION>Description.</DESCRIPTION>
<XIMAGE>07505x.jpg</XIMAGE>
<XIMAGE2>07505x1.jpg</XIMAGE2>
<XIMAGE3>07505x2.jpg</XIMAGE3>
<XIMAGE4/>
<XIMAGE5/>
<LENGTH>9</LENGTH>
<DIAMETER>1.75</DIAMETER>
<ORINGCIRC/>
<ORINGDIAM/>
<WIDTH>5</WIDTH>
<CONTROLLER>Built In</CONTROLLER>
<WHATISIT/>
<FOR/>
<MOTION/>
<FEATURES>Multi speed</FEATURES>
<MISC/>
<STYLE/>
<POWER>2 x AA (Included)</POWER>
<SIZE>7</SIZE>
<ATTRIBUTES NAME="Batteries" ATTRIBUTEID="9">
<ATTRIBUTEVALUES VALUE="190" TITLE="None" PRICEADJUST="+0.00"/>
<ATTRIBUTEVALUES VALUE="182"...
February 4, 2015 at 3:25 pm
Sioban Krzywicki (2/4/2015)
Grant Fritchey (2/4/2015)
Brandie Tarvin (2/4/2015)
Anyone know anything about this Grant guy? Does he know what he's talking about?
Nah, I hear he's a giant bag of wind and...
February 4, 2015 at 8:42 am
Brandie Tarvin (2/4/2015)
February 4, 2015 at 7:57 am
Mindy Hreczuck (2/3/2015)
I'm trying to figure out which databases this expansion will take...
February 4, 2015 at 2:00 am
ma701ss (2/3/2015)
I'm trying to insert into a table from an XML file. The mapping works OK however there is a problem with one of the fields. It is field name...
February 4, 2015 at 1:50 am
Quick thought, this code looks very inefficient, while the logic is rather simple, should be straight forward to construct a set based code for the operation. Could you post DDL...
February 4, 2015 at 1:43 am
Quick thought, maybe this will help
😎
USE tempdb;
GO
SET NOCOUNT ON;
DECLARE @TXML XML = '<ROOT><code>1</code><code>2</code><code>3</code><code /></ROOT>';
SELECT
ROW_NUMBER() OVER
(
...
February 2, 2015 at 11:39 pm
sqldriver (2/2/2015)
Eirikur Eiriksson (2/2/2015)
Quick thought, the problem itself is straightforward, the issue is more the schema, normalize it and the solution is easy.😎
That was one of the first things I...
February 2, 2015 at 11:01 pm
Grant Fritchey (2/2/2015)
Sioban Krzywicki (2/2/2015)
SQLRNNR (2/2/2015)
Ed Wagner (2/2/2015)
I only have Standard Edition, but I can't imagine running a production instance on SQL Express. Maybe I'm just spoiled.
I have to...
February 2, 2015 at 12:34 pm
Quick thought, the problem itself is straightforward, the issue is more the schema, normalize it and the solution is easy.
😎
February 2, 2015 at 12:02 am
Viewing 15 posts - 6,196 through 6,210 (of 8,753 total)