Viewing 15 posts - 4,666 through 4,680 (of 8,731 total)
Jayanth_Kurup (7/20/2015)
select * from #t1 t1
cross join #t2 t2
where t1.city <> t2.city
and t1.city > t2.city
Do you realize that the first condition is not needed?
July 20, 2015 at 8:03 am
You need to add quotes to your date (and if possible remove the dashes).
Date >= '20150720'
The reason for returning older dates is that without quotes, SQL Server identifies the value...
July 20, 2015 at 7:54 am
Try the following article.
http://www.sqlservercentral.com/articles/sql+n-Tuples/89809/
July 20, 2015 at 6:48 am
There's just one exception to the rule: The string FALSE will return 0 when converted to bit.
July 20, 2015 at 6:35 am
There are 2 possible options:
Instead of using COUNT, use SUM which can return 0.
,SUBSTRING((SUM(DISTINCT CASE WHEN d.attribute_value IN ('iPhone','Android') THEN 1 ELSE 0 END)
/SUM(DISTINCT CASE WHEN b.activity_name ='Open Email'...
July 17, 2015 at 1:57 pm
After reading again your original post, I guess that the problem is effectively with [data$], that should be either a named table in Excel or the name of a spreadsheet...
July 17, 2015 at 1:50 pm
The client is the computer with the user interface (most commonly Management Studio). In this case, the client and the server are the same computer.
SQL Server uses service accounts to...
July 17, 2015 at 1:45 pm
Is the file in the server? The path refers to the server, not the client.
Does the Service account have permissions to the file? Remember that it's not your account, but...
July 17, 2015 at 1:18 pm
And this is the problem with cross posting. We don't know if you're using 2005 or 2012 as you posted basically the same question on both forums and got similar...
July 17, 2015 at 1:14 pm
This is a different way of accomplish this task, but you might need to correct the sample data to be able to check it.
--Note the N before the string literals...
July 17, 2015 at 12:53 pm
You need a double negative condition. The only problem is that you need to include all possible characters as I did with the space.
SELECT *
FROM Test
WHERE Name NOT...
July 17, 2015 at 12:43 pm
You might want to read more about the OVER clause.
Have a nice weekend 😉
July 17, 2015 at 12:31 pm
I'm not sure if I understood correctly, but this should give you an idea.
CREATE VIEW [dbo].[vSHLBHL_BHLPriority]
AS
WITH vSHLBHL_BHLrows AS(
SELECT ID_Wells,
...
July 17, 2015 at 12:17 pm
I agree that it depends. Some people might even suggest to disable autogrowth and set the database to the max possible size. To define the max possible size, you need...
July 17, 2015 at 11:56 am
If you're using natural quarters, you might be able to use something like this:
WITH TableA([date],[ID])
AS
(
SELECT '2012-09-21','1' UNION ALL
SELECT '2012-09-28','1' UNION ALL
...
July 17, 2015 at 11:45 am
Viewing 15 posts - 4,666 through 4,680 (of 8,731 total)