Viewing 15 posts - 3,676 through 3,690 (of 10,144 total)
elham_azizi_62 (2/3/2014)
I am in hurry and I don't have time and I have to give it to my boss immediately.please help me.
Something so timecritical should not be subject to the...
February 3, 2014 at 7:41 am
Put a PRINT statement prior to the EXEC.
PRINT @Query
EXECUTE sp_executesql @Query
Run the batch. Copy the output from the Messages window and paste it here.
February 3, 2014 at 6:04 am
elham_azizi_62 (2/3/2014)
please write T-Sql for me.thanks
If I do this, you will remain a novice. You must at least make an attempt to write the TSQL.
February 3, 2014 at 5:51 am
Please post ddl and dml for the tables involved in your query.
This is quite a trivial request and there are several ways to do it - what have you...
February 3, 2014 at 5:40 am
Pass the string into the stored procedure as a string parameter and split it there. Splitting it first and attempting to pass in all of the resolved elements as a...
February 3, 2014 at 5:36 am
That's okay, it was always going to be a long shot with no sample data blah blah.
I hope you can take away a few ideas from it though, and...
January 31, 2014 at 9:35 am
Luis Cazares (1/31/2014)
Chris, I think you were expecting different results than the ones the OP asked for.I would go for the last query from o.fimin.
Heh I see it now.
"In the...
January 31, 2014 at 9:30 am
You might get some performance lift by jigging around with your filters. If you're going down this route then do take on board Gail's comments about DISTINCT. You might benefit...
January 31, 2014 at 6:48 am
Always carefully test any solutions offered to you. The one you rejected works with the sample set, the one you appear to have accepted does not. Here's a third offering:
SELECT...
January 31, 2014 at 5:29 am
-- The requirement is the Table1.SetId (1, 2, 3...) is to be assigned to the Table2.SetId
-- for the same number of rows as the value of Table1.MsgCount. For example,
CREATE...
January 30, 2014 at 6:58 am
SELECT
s.subTypeId, s.subTypeValue, s.subparentId, s.childLevel, s.sortOrder,
s.leafFlag, s.aggregatesSubTypeId, s.sourceIdentifier, s.origId, s.RecId,
camasapavalue = '[' + x.ConcatenatedString + ']'
FROM #SAMPLEDATA s
CROSS APPLY (
SELECT ConcatenatedString = STUFF(
(SELECT ',' + CAST(subTypeID AS VARCHAR(30))
FROM...
January 30, 2014 at 5:39 am
Can you post up some sample data, Kapil? Showing multiple rows per key? Obfuscate if necessary, but it really would be very useful to see it.
January 30, 2014 at 3:54 am
Let's say you have a "dupe pair" of rows in your source table - dupes on the basis of a unique key on one or more columns.
Does it matter...
January 30, 2014 at 3:18 am
MERGE #temp T
Is the table #temp always empty before you start the upsert?
January 30, 2014 at 2:46 am
Use a traditional upsert.
What you're trying to do in your original MERGE is to update rows which don't exist.
Perform your inserts first from a deduped source set -...
January 30, 2014 at 2:16 am
Viewing 15 posts - 3,676 through 3,690 (of 10,144 total)