Viewing 15 posts - 1,951 through 1,965 (of 5,504 total)
That's a rather vague description...
Please note that we can't look over your shoulder so we can't see what you're struggling with nor what the tables/data look like.
Therefore, you'd need to...
February 10, 2011 at 1:41 pm
MB-400824 (2/10/2011)
I am sorry to not responded to the last post, but I have been focusing on implementing the suggestions that have been offered here. I was able to...
February 10, 2011 at 1:14 pm
Something like this?
SELECT
st.name AS '@name',
si.name AS 'index/@name'
FROM sys.indexes si
INNER JOIN sys.tables st ON si.object_id = st.object_id
FOR XML PATH('table')
February 10, 2011 at 12:59 pm
If I'm not overlooking something, you could simply replace the REPLACE(FOR XML) subquery with the code column itself.
What makes me wondering: how did you come up with the concatenated version...
February 10, 2011 at 12:50 pm
IIRC, this issue is caused by the Jet 4.0 / EXCEL registry setting for the TypeGuessRows parameter.
See http://support.microsoft.com/kb/189897 for details.
February 10, 2011 at 12:29 pm
Based on the rather vague description I expect you insert the data row by row.
If that's the case, change your insert concept to use a single insert for all 1399...
February 10, 2011 at 12:04 pm
Use your query inside a CTE and update the CTE value:
;WITH cte AS
(SELECT
p.ProductId,
scr.SupplierSequence,
DENSE_RANK () OVER (PARTITION BY p.ProductId ORDER BY scr.SupplierSequence ASC) AS...
February 10, 2011 at 12:01 pm
Something like this?
SELECT
[BOOKING_ID],
[BOOKING_TYPE_CD],
[BOOKING_STATUS_CD] ,
MAX([BK_PARTY]) AS [BK_PARTY],
MAX([FW_PARTY]) AS [FW_PARTY],
MAX([SH_PARTY]) AS [SH_PARTY]
FROM [dbo].[xyz]
GROUP BY [BOOKING_ID],[BOOKING_TYPE_CD],[BOOKING_STATUS_CD]
As a side note: thank you for the ready to use sample...
February 10, 2011 at 11:47 am
I would try to rewrite the stored procedure as an inline-table valued function.
This would change the RBAR approach into a set based solution.
We'd need to know more what the sproc...
February 10, 2011 at 11:41 am
It looks like a CrossTab query to get data in a pivoted format.
The query itself doesn't look that bad except for the following issues:
The subquery aliased as y selects more...
February 8, 2011 at 12:32 pm
I second Steve.
In a company I worked for the HR philosophy was "travellers should not be stopped".
If you think making more money at a different company is the best for...
February 7, 2011 at 3:11 pm
brito.santos (2/7/2011)
Supose you had to load 1 or 2 Gb of Xml data from one file into 2 tables. What you'd consider the best choice, OpenRowSet or BCP?
It depends. But...
February 7, 2011 at 2:53 pm
It took me a while to convert the sample data into a ready to use format...
Based on what I've seen all you'd need to do is change your original query...
February 7, 2011 at 1:26 pm
george sibbald (2/6/2011)
Beats me where the case statement would come into it but this would do it:
select top 1 yourcolumn from yourtable order by yourcolumn...
February 6, 2011 at 4:15 pm
Viewing 15 posts - 1,951 through 1,965 (of 5,504 total)