Viewing 15 posts - 2,911 through 2,925 (of 5,504 total)
SELECT TOP 1
@FirstName = FirstName,
@MiddleName = MiddleName,
@LastName = LastName
FROM
SomeTable
WHERE SomeColumn = SomeValue
ORDER BY SomeOtherColumn
Please note that I added TOP 1 together with...
August 31, 2010 at 2:20 pm
It's a little confusing... In your verbal description you're talking about a new colum but your example shows a new row. :ermm:
If you need a new column, you could use...
August 31, 2010 at 1:24 pm
Jan Van der Eecken (8/31/2010)
August 31, 2010 at 1:08 pm
Please have a look at the CrossTab article referenced in my signature to get your data pivoted.
Once you know how the concept works move on to the DynamicCrossTab article to...
August 31, 2010 at 10:43 am
Please have a look at the DynamicCrossTab article referenced in my signature. I guess this approach will do the job.
If you need further assistance please provide table def, sample data...
August 31, 2010 at 6:49 am
I refer to rusanu's web site[/url] once in a while.
It might help you as well, even though most of the stuff he wrote about is related to SS2K5.
I can also...
August 30, 2010 at 9:47 am
Please read and follow the advice given in the first link in my signature and provide ready to use sample data. Furthermore, please include your expected result based on the...
August 30, 2010 at 3:54 am
You need to include the namespace declaration in your SELECt statement.
Assuminig you're using SS2K5 or SS2K8, here's the XQuery snippet I would use:
declare @xml xml
set @xml='<HousingLoan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MemberData>
<Name>alan</Name>
</MemberData>
<FinanciarData>
<Source>Bank</Source>
</FinanciarData>
</HousingLoan>'
;
WITH XMLNAMESPACES
('http://www.w3.org/2001/XMLSchema-instance' as...
August 30, 2010 at 3:48 am
RBarryYoung (8/28/2010)
*sigh* Long story, ... between work problems and medical problems I literally have no time for anything else. Don't get me wrong, neither is serious, but both...
August 28, 2010 at 8:24 am
RBarryYoung (8/28/2010)
CirquedeSQLeil (8/27/2010)
Trey Staker (8/27/2010)
The executive assistant to our CIO ...
Ha - I first read that as "Execution Assistant..."
That would have been funny.:-D Would go really well with the...
August 28, 2010 at 7:55 am
Your pvt subqry does not contain a column named [Personnel_id]. Therefore, your ORDER BY fails.
I think that's not the only flaw in your query...
But without any table def, sample data...
August 28, 2010 at 6:06 am
I think it will be better to redesign the whole process. Modify the analysis procedure to process all products at once instead of calling it for each product separately. Or,...
August 28, 2010 at 5:56 am
How about providing table def, ready to use sample data and expected result? It would help a lot more than asking one question at a time...
August 27, 2010 at 2:49 pm
How about
CAST (Replace(Performance,',','.') AS DECIMAL(7,3))
As a side note: Why did you try to cast it to float in between? Shouldn't be needed.
August 27, 2010 at 1:47 pm
I don't know why you'd want to return the content of the ROOT node as well, but...
Here's my approach:
DECLARE @tbl TABLE (TRNKEY_XML XML)
INSERT INTO @tbl SELECT
'<ROOT>
<PROGRAM>ACSYNC</PROGRAM>
<Old_SSN>123456789</Old_SSN>
<New_SSN>987654321</New_SSN>
</ROOT>'
SELECT
TRNKEY_XML,
T.c.value('PROGRAM[1]','VARCHAR(10)') AS PROGRAM,
T.c.value('Old_SSN[1]','VARCHAR(10)')...
August 27, 2010 at 1:31 pm
Viewing 15 posts - 2,911 through 2,925 (of 5,504 total)