Viewing 15 posts - 16 through 30 (of 95 total)
How about modifying your proc to have a TVP (table valued parameter) as an input ?
I *think* thats what you are after - someone smarter than me may have a...
December 19, 2016 at 9:09 pm
You arent actually populating your return variable
Try this.
CREATE FUNCTION hstore_num ()
RETURNS int
BEGIN
DECLARE @Result int
SELECT @Result = MAX(in_view.temp)
FROM (SELECT temp = COUNT(state)
FROM stores
GROUP BY state) AS in_view
RETURN...
April 19, 2016 at 11:03 pm
You would probably be best asking this question to the person who gave you the requirements.
April 18, 2016 at 8:09 pm
Global temp tables will help ## instead of #.
Just keep in mind they will disappear with every sql service restart.
April 14, 2016 at 6:40 pm
You need to give your
select *
from (
.
.
.
)
an alias
select *
from (
.
.
.
) aliasHere
March 20, 2016 at 10:59 pm
If it is in a table like you say cant you just use replace ?
replace (col, 'domain1', 'domain2')
Or am i totally missing the point here ?
February 14, 2016 at 8:09 pm
This at least will be causing you problems
dbo.NetPortal_GetProductPrice(externalId,'LIST', ProdInfo.PPRO_SubSystem) ListPrice,
dbo.NetPortal_GetProductPrice(externalId,'MEMBER', ProdInfo.PPRO_SubSystem) MemberPrice
You should also check out the catch all query blog here
http://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/
Im sure other people will be able...
January 26, 2016 at 6:22 pm
Why do you want to combine them into one statement ?
They are probably better off staying separate.
January 24, 2016 at 9:50 pm
What are you actually trying to achieve ?
The query is only partly formed and will never work the way it is.
Your syntax errors are due to having commas where there...
December 14, 2015 at 8:22 pm
This will need to be the cd\dvd you installed from.
Or if you copied the entire contents to a directory you can use that.
December 13, 2015 at 5:57 pm
Using the setup from thomas.
Be aware that you havent specifed what happens with year boundaries. So if you need to do it on a yearly basis also then its a...
December 10, 2015 at 8:32 pm
You are most likely getting a divide by zero happening.
Add something like this - you may need to check for nulls also - been a while.
=iif(((Fields!A.Value) + (Fields!D.Value) + (Fields!C.Value))...
December 7, 2015 at 5:58 pm
Try this
WITH Capacities AS (
select en.NAME as ClusterName, ROUND(CAST(CPU_CORE_COUNT as FLOAT)*CPU_Hz*count(cast(hs.HOSTID as BIGINT))/800000000,0) as Hub_Capacity
from VPXV_HOSTS as hs WITH (NOLOCK,NOWAIT)
full join VPXV_ENTITY as en WITH (NOLOCK,NOWAIT) on hs.FARMID = en.id
where...
November 30, 2015 at 10:13 pm
Viewing 15 posts - 16 through 30 (of 95 total)