Viewing 15 posts - 4,936 through 4,950 (of 14,953 total)
You should be able to do that pretty easily in the underlying query, just by using IsNull or Coalesce.
February 17, 2011 at 9:58 am
First = Top 1
Last = Top 1 with inverted Order By
For example:
select
(select top 1 MyColumn
from MyTable
Order By MyColumn) as First,
...
February 17, 2011 at 9:55 am
TheSQLGuru (2/17/2011)
There are numerous places where cursors are acceptable if not preferred, IMNSHO. What we REALLY need is faster-performing cursors from the Microsoft engine team!!
Use CLR procs/functions for those....
February 17, 2011 at 9:52 am
Are there any transformations at all on that column? Derived column or anything else?
February 17, 2011 at 9:51 am
Have you considered using a Nested Sets style hierarchy? They are much, much faster to query, and usually work better in SSAS that way.
Data on hierarchies at: http://www.sqlservercentral.com/articles/T-SQL/65540/
Data on...
February 17, 2011 at 9:47 am
I searched for "oledb 64-bit sql" online, and found a bunch of articles that seem to suggest you need the Oracle 10G client and that you need to include the...
February 17, 2011 at 8:29 am
Try this:
declare @xmlFile xml
set @xmlFile = '<?xml version="1.0"?>
<FamilyAndSubFamily>
<myStruct parentStructId="0" family="18" subFamily="11" />
<myStruct parentStructId="0" family="43" subFamily="32" />
<myStruct parentStructId="0" family="7" subFamily="0" />
</FamilyAndSubFamily>
';
--
SELECT
x.i.query('.').value('(myStruct/@parentStructId)[1]','int') AS ParentStructID,
x.i.query('.').value('(myStruct/@family)[1]','int') AS Family,
x.i.query('.').value('(myStruct/@subFamily)[1]','int') AS SubFamily
FROM @xmlFile.nodes('/FamilyAndSubFamily/myStruct') as x(i);
February 17, 2011 at 8:24 am
More likely, it's an issue with distributed transactions. Those can be very, very slow.
I'd have to see the query to give advice on it, but take a look at...
February 17, 2011 at 8:18 am
Jeff Moden (2/17/2011)
The Dixie Flatline (2/17/2011)
...My mind was in the gutter too.
Heh... the list is growing by leaps and bounds. Lot's of folks sent me the same request via...
February 17, 2011 at 8:16 am
Uripedes Pants (2/11/2011)
February 17, 2011 at 7:57 am
I'm not clear on what you're asking.
Are you planning on replicating, and backing up the target database in order to use that for DR? If so, can you clarify...
February 16, 2011 at 12:51 pm
Just to expand on what Grant wrote:
SQL table storage requires writing to the transaction log, checking locks, resolving locks, writing to the table, marking the tran log as committed, et...
February 16, 2011 at 12:49 pm
You'd have to use dynamic SQL for that.
Build the query string using sys.columns, then execute it using sp_executesql.
February 16, 2011 at 10:00 am
Viewing 15 posts - 4,936 through 4,950 (of 14,953 total)