Viewing 15 posts - 4,666 through 4,680 (of 10,144 total)
You're having problems with this mainly because you are working with one row at a time. Your control table is updated once for each row inserted, instead of updating it...
May 7, 2013 at 5:06 am
I'm sure there's an easier (and safer) way of doing this.
ALTER PROCEDURE [dbo].[BS_GetSTNValue]
--DECLARE
@pFromStore int = 1001,
@pToStore int = 1004,
@pSTN VARCHAR(20) = 0 output
AS
--BEGIN
DECLARE
@count INT = 0,
@AWBNo VARCHAR(10)...
May 7, 2013 at 3:30 am
TOP (n) without ORDER BY can return different results between executions of the same query. TOP 1 effectively means "give me a row from the set matching the search criteria,...
May 7, 2013 at 1:46 am
Four queries in your stored procedure use TOP (n) without ORDER BY. The results may be unpredictable.
May 7, 2013 at 1:20 am
niladri.primalink (5/3/2013)
It works fine for me. But the same query when I am pasting in SP it shows me the error
SELECT file_id...
May 3, 2013 at 5:12 am
ChrisM@Work (5/3/2013)
IgorMi (5/3/2013)
<<snip>>Queries having WHERE clause connected by AND operators are evaluated from left to right in the order they are written.
What is the source for this statement? It's...
May 3, 2013 at 4:03 am
IgorMi (5/3/2013)
ChrisM@Work (5/3/2013)
IgorMi (5/3/2013)
ChrisM@Work (5/3/2013)
IgorMi (5/3/2013)
Hi
SELECT sum(CONVERT(float, ft.amount))FROM filetransaction ft
WHERE ft.fileid <>332 and ISNUMERIC(ft.amount)=1
Check this also http://www.sqlservercentral.com/articles/IsNumeric/71512/
Regards
IgorMi
Which of those two filters will SQL Server apply first?
Queries having WHERE...
May 3, 2013 at 3:59 am
IgorMi (5/3/2013)
ChrisM@Work (5/3/2013)
IgorMi (5/3/2013)
Hi
SELECT sum(CONVERT(float, ft.amount))FROM filetransaction ft
WHERE ft.fileid <>332 and ISNUMERIC(ft.amount)=1
Check this also http://www.sqlservercentral.com/articles/IsNumeric/71512/
Regards
IgorMi
Which of those two filters will SQL Server apply first?
Queries having WHERE clause connected...
May 3, 2013 at 3:52 am
IgorMi (5/3/2013)
Hi
SELECT sum(CONVERT(float, ft.amount))FROM filetransaction ft
WHERE ft.fileid <>332 and ISNUMERIC(ft.amount)=1
Check this also http://www.sqlservercentral.com/articles/IsNumeric/71512/
Regards
IgorMi
Which of those two filters will SQL Server apply first?
May 3, 2013 at 3:20 am
T.Ashish (5/2/2013)
Yes, I also feel second query should be slower. But both are working exactly same.
How long do they take to run?
What method are you using to measure the execution...
May 3, 2013 at 3:09 am
SELECT
SUM(x.FloatAmount)
FROM filetransaction ft
CROSS APPLY (
SELECT FloatAmount = CASE
WHEN ISNUMERIC(ft.amount) = 1 THEN CAST(ft.amount AS FLOAT)
ELSE 0 END
) x
WHERE 1 = 1
May 3, 2013 at 3:07 am
a_ud (5/3/2013)
I've never used a CROSS APPLY, but I guess this could be translated (done) also...
May 3, 2013 at 2:57 am
You have a column [ID] in the two skills tables. Is this [EmployeeID]? The table definition of users_hierarchy clashes with the later INSERT; which has the correct column name?
May 3, 2013 at 2:54 am
wolfkillj (5/2/2013)
Sean Lange (5/1/2013)
ChrisM@Work (5/1/2013)
Sean Lange (5/1/2013)
I would suggest you use the newer join constructs. With this query you don't even need a where...
May 3, 2013 at 2:40 am
Lynn Pettis (5/2/2013)
Okay, I have to ask without pointing to anything specific, do any of you think I have been harassing any of the OP's recently rather than helping them?
Absolutely...
May 3, 2013 at 1:25 am
Viewing 15 posts - 4,666 through 4,680 (of 10,144 total)