Viewing 15 posts - 1 through 15 (of 21 total)
Rough guess based on what you described above.
Step 1: Generate a random number between 1 and 10000
Step 2: Output random number in step 1 + DATEDIFF(DAY, '1/1/1800', dateColumnInTable).
If they're doing...
October 17, 2007 at 3:44 pm
This is probably more a job for SSIS than for stored procs.
Calling a web service in SSIS is pretty easy (there's a task for it), and you should be able...
September 13, 2007 at 4:22 am
select
ccp.part_id,
ccp.warehouse_id,
ccp.count_freq,
ccp.last_count_date,
pl.qty
from
cycle_count_part ccp LEFT JOIN part_location pl ON ccp.part_id = pl.part_id AND ccp.warehouse_id = pl.warehouse_id
where pl.part_id IS NOT NULL
AND
ccp.warehouse_id in ('GSS_PROD','AIRCRAFT_PROD')
...sorry for the bad formatting.
September 12, 2007 at 5:30 am
High level overview of how to do this (we do this a lot in our application).
Use a sproc that takes an XML parameter.
Wrap the parent and child updates into XML
Have...
September 12, 2007 at 5:25 am
If you're trying to implement paging (which it sounds like you're doing), have a look at: http://www.sqlservercentral.com/columnists/jSebastian/3181.asp
It has seveal links to ways to accomplish paging, including front and back...
September 4, 2007 at 5:44 am
It's still eating your XML, but assuming it looks like:
<TestCaseID>12345</TestCaseID>
<TestCaseID>12346</TestCaseID>
You can use:
INSERT INTO <table> (field) SELECT T.T.value('.[1]', 'INT') FROM @XML.nodes('/TestCaseID') AS T(T)
Should do what you're trying to do without a...
August 28, 2007 at 4:20 am
Mmmm... One of those having tricks can solve this.
SELECT
Pole_ID
FROM
XX
GROUP BY
Pole_ID
HAVING
COUNT(*) = SUM(CASE WHEN Date IS NULL THEN 0 ELSE 1 END)
Note that...
August 22, 2007 at 12:52 pm
Interesting...
I used the:
<xsl:for-each select="/Report/table1/Detail_Collection/Detail">
syntax in XML Notepad against the XML you posted, and everything worked fine, once I removed the reference to the XML schema (https://corepm.acme.com, since that doesn't...
August 17, 2007 at 10:10 am
Can't check this right now, but I'm pretty sure you need to either change the
<xsl:template match="/">
to
August 17, 2007 at 5:13 am
I've sometimes run into this issue when scrubbing our production DB for the developers. You may need to do an index rebuild on the affected tables to see a space...
August 15, 2007 at 5:32 am
The syntax for these is a painfully awkward, but it works.
You may need to change this slightly based on the actual layout of...
August 14, 2007 at 9:57 am
Couple ideas, not being sure what you're trying to do.
If you're doing the statement in a loop, it's probably bad, as the xml.nodes will parse the entire XML set each...
August 14, 2007 at 5:37 am
Best bet for this is to run profiler against the DB and trigger the error in the front end, if you can (not sure where your web server/DB are). Profiler...
August 3, 2007 at 4:40 am
You need to do left joins into the Prod and Loc tables:
SELECT test.TestID, ISNULL(location.LocationName, '-'), INULL(product.ProductName, '-')
FROM Test as test
INNER JOIN ProdLoc AS prodLoc ON test.ProdLocID = prodLoc.ProdLocID
LEFT JOIN Product AS...
August 3, 2007 at 4:27 am
I've seen the same issue when looking at query plans. I think this has to do with the 10,000 row assumption thing on working tables.
If you run profiler against these...
August 2, 2007 at 9:19 am
Viewing 15 posts - 1 through 15 (of 21 total)