Viewing 15 posts - 151 through 165 (of 747 total)
You probably have one or more calculations w/ a result > 100
Contrived example... This succeeds:
This succeeds:
SELECT 'Symbol',
'2023-05-02',
CAST(IIF(0 = -1, 0, 1.0 * 1.234567 / .01234567) AS NUMERIC(7,4))...
May 3, 2023 at 12:07 am
Post duplicated
May 2, 2023 at 11:56 pm
What are the data types (w/ precision & scale) of T3.P_V, T4.C_V, T3.P_O, T4.C_O, T3.P_D, & T4.C_D?
Can you provide a sample script of failing data?
May 2, 2023 at 11:56 pm
Your example using
WHERE PRM_StartDate = (SELECT MAX(PRM_StartDate) FROM PriceMatrix)
would , fixing the double WHERE, only return rows where PRM_StartDate is the maximum where IMA_ItemStatusCode = 'Active'.
So...
May 2, 2023 at 2:57 pm
Based on some other links, try replacing & with %26
May 1, 2023 at 10:23 pm
PLAN & COUNT are reserved keywords. If you're going to use them as an object (e.g., column) name or alias, you need to wrap them in double quotes or...
May 1, 2023 at 3:33 pm
Posting DDL & insert scripts rather than links to download is more likely to get you help.
Not getting snippy with a generous expert like Grant...
April 6, 2023 at 9:35 pm
That would happen if you did not have ord.Amount wrapped in the aggregate SUM function.
It should work w/ the query listed.
April 4, 2023 at 5:03 pm
How many rows does the CTE body (the subquery portion) return? I'm not sure if the query engine is smart enough to short-cut the query based on the top 1...
March 31, 2023 at 2:24 pm
You can't parameterize a from clause. You could parameterize the WHERE clauses.
You could concatenate the table type into dynamic sql as described here: https://odetocode.com/articles/365.aspx
March 28, 2023 at 1:44 pm
where Date From >= '2020-04-01' and Date To <= '2020-04-28'
There is no data in your sample that meets that requirement.
In
2 ----- 2020-04-01 ----- 2020-04-30
Date...
March 21, 2023 at 2:53 pm
Is there a reason you don't have a clustered index or primary key? (may or may not be the same)
March 20, 2023 at 3:53 pm
Is TempDB on the C Drive? Is it growing/filling the drive?
Or is it actually SSMS temp files mentioned previously?
Check/tune their queries if possible.
March 7, 2023 at 8:41 pm
Is there a reason the app team can't tell you which columns are unused?
You could use server-side trace or extended events to log executions over a period long enough to...
March 6, 2023 at 6:37 pm
Viewing 15 posts - 151 through 165 (of 747 total)