Viewing 15 posts - 6,436 through 6,450 (of 8,731 total)
The tests that I've made, show that the advantage is minimal and not worth it. However, the flexibility you gain when not using BETWEEN is a good reason to avoid...
May 20, 2014 at 2:06 pm
The problem is that you're dividing 2 integers. That way, the decimal part is truncated. You need to cast any of the 2 integers into a decimal. And you should...
May 20, 2014 at 1:42 pm
If you don't want to rewrite the SELECT to put the columns in order. You could profit of INFORMATION_SCHEMA views, Dynamic SQL and concatenation code.
This is an example to achieve...
May 20, 2014 at 11:45 am
I could try to explain it, but Paul White already did a great job with a series of two articles that explain how APPLY works and how it is a...
May 20, 2014 at 11:30 am
A slight modification to Sean's code to avoid the REPLACEs.
DECLARE @string AS varchar(40)
SET @string = ' OKALOOSA AIRPORT ABC VALPRAISO FL ';
with SortedValues...
May 20, 2014 at 11:25 am
Why would you do that?
There's nothing to gain in that option. You'd need to generate the scripts for each and every view again to create them.
What if you have...
May 20, 2014 at 9:57 am
You don't even need the ROW_NUMBER if you don't care about the order. You could use the APPLY operator.
SELECT a.custname, i.item, i.amount, s.specialitem, s.specialamount
FROM customer a
INNER JOIN inventory i on...
May 20, 2014 at 9:52 am
It's still not pretty, it will read the table 4 times, but it should work better than the cursor. The recommendation is that you test both solutions to check which...
May 20, 2014 at 9:47 am
I'm sorry if I didn't make myself clear. The reference was supposed to be for KoldCoffee, as I assumed that you knew this. 😉
May 19, 2014 at 9:48 am
SQLRNNR (5/19/2014)
There is no special name for it. It's just another way of writing a join condition.
Actually, it could be considered as a non equi join. You can find...
May 19, 2014 at 8:51 am
You could try removing the dashes from your dates. SQL Server will identify the dates without problem regardless of language or dateformat configuration.
Another option is to use
SET DATEFORMAT ymd
before the...
May 19, 2014 at 8:45 am
I'm not sure if the problem is in the missing TOP (1) from your VB Code.
Another problem that you might encounter is SQL Injection. What would happen if someone...
May 17, 2014 at 4:03 pm
Right click on the database -> Tasks -> Generate Scripts.
May 16, 2014 at 3:50 pm
Viewing 15 posts - 6,436 through 6,450 (of 8,731 total)