Viewing 15 posts - 2,701 through 2,715 (of 7,614 total)
The column names will make no difference in a NOT EXISTS. It's customary to use SELECT * or SELECT 1 in a NOT EXISTS query.
September 17, 2019 at 5:58 pm
I'm not aware of any such tool. If there were one, it would be rather expensive, I'm sure.
Tuning code for performance requires human skills (hallelujah!, since that's one of the...
September 17, 2019 at 4:58 pm
As this occurred on the Production Server,I am unable to provide the sql plan.
Then there's not much we can do for you.
If the OP runs the query I...
September 13, 2019 at 7:12 pm
Is this the right way to calculate the size of logical reads?
Yes.
Should the size of logical reads be used to measure the performance or the number of logical reads provided...
September 13, 2019 at 6:57 pm
You can't remove tempdb files while SQL is running. Those are in effect system files. When you recycle the SQL Server instance, your changes will be put into effect then.
September 13, 2019 at 6:53 pm
Something else is going on, would need to see a more complete original statement and the table definition(s).
September 12, 2019 at 2:57 pm
Many companies have clients that have a credit limit: they can't order over a certain amount without prior approval. [I've worked in 2 such companies at least already.] That "remaining...
September 11, 2019 at 5:49 pm
You seem fixated on tying the physical format of data to its use/display. A value can be stored physically as an int without the value ever being directly used in...
September 10, 2019 at 10:35 pm
I've had the same bank account for more than 20 years. I'd hate to have to wait for them to compute a balance every time.
A balance is one of those...
September 10, 2019 at 8:48 pm
UPDATE dbo.table_name
SET balance = balance - @amount
WHERE balance - @amount >= 0.0
September 10, 2019 at 8:04 pm
a negative dollar amount followed by a non-negative dollar amount
Do you have something that can be sorted on to give the proper order of transactions? If so, it's easy to...
September 6, 2019 at 10:13 pm
You could consider using SQL's Change Tracking to keep track of the changes for you; you could then translate the tracking version into an actual datetime of change. And it's...
September 6, 2019 at 6:20 pm
Could you post the query plan, estimated is good enough for now, for this SQL:
delete lad from PA_LDG_HOLD_JRNAL_LINES_LAD lad inner join PA_LDG_JRNAL jrl on (lad.JRNAL_ID = jrl.HOLD_JRNAL_ID and lad.LINE_ID =...
September 5, 2019 at 3:45 pm
SELECT DateCol1, Col2,
STUFF(CASE WHEN [1] = 0 THEN ',1' ELSE '' END +
CASE WHEN [2]...
September 5, 2019 at 3:17 pm
NULL and 0.0 are not the same thing.
If you need the values to be 0.0, you should make sure they are INSERTed as 0. Use a default value and a...
September 4, 2019 at 6:26 pm
Viewing 15 posts - 2,701 through 2,715 (of 7,614 total)