Viewing 15 posts - 3,091 through 3,105 (of 7,191 total)
Here are the first two things I would look at:
(1) Is your query being blocked by another process?
(2) Have you compared the execution plans from the two databases?
Are the databases...
August 25, 2015 at 8:48 am
The UI is simpler, yes, but it's helpful to know the command if, for example, you're doing the same change on a lot of servers, or you're scripting a change...
August 20, 2015 at 3:19 am
Try running a trace, just capturing login events from your user accounts. That'll give you a bit more information, such as the application that's making the connection (provided the...
August 18, 2015 at 2:02 am
Is there a service or an application running under your account? The entry in the errorlog tells you the IP address from which the connection was made - this...
August 17, 2015 at 9:41 am
The answer's right there in the error message. You don't have an alias for the third column of your SELECT statement.
John
August 17, 2015 at 4:56 am
Please will you post your whole query and a CREATE TABLE statement for the table you're selecting from?
Thanks
John
August 17, 2015 at 4:50 am
Another way of doing it:
SELECT A, B, C, 'Text 1' MyText
FROM MyTable
UNION ALL
SELECT A, B, C, 'Text 2'
FROM MyTable
John
August 13, 2015 at 8:56 am
Since 2016 hasn't been publicly released yet, I wouldn't advise you use it for production. There's SQL Server 2014 to consider as well, don't forget.
John
August 10, 2015 at 8:47 am
Happyt 43606 (8/10/2015)
returns -in a column, 346 in a column and A in a column.
What do you want in the other two columns? Is this a homework question, by...
August 10, 2015 at 5:20 am
Something like this?
SELECT
dato
FROM dbo.dutyrostershift d
JOIN dbo.vacation v
ON d.dato BETWEEN CAST(start-36163 AS datetime) AND CAST(fld_end-36163 AS datetime)
AND d.employeeid = v.personalid
WHERE d.shifttype = 2
John
August 10, 2015 at 4:54 am
It's not clear whether you want five columns or three. This will work for your example:
DECLARE @StreetName varchar(100)
SET @StreetName = '-346A'
SELECT
col1 = LEFT(@StreetName,1)
,col2 = SUBSTRING(@StreetName,2,3)
,col3 = RIGHT(@StreetName,1)
John
August 10, 2015 at 4:37 am
The issue is still that, with the set of parameters you've passed in, you're selecting every row from the table. What you originally posted, though, was only the subquery...
August 10, 2015 at 3:36 am
You're selecting every row from the table, so it's not going to be all that quick. Get rid of your whole WHERE clause - it's just noise. A...
August 10, 2015 at 2:20 am
"The system cannot find the path specified" - that's a very clear error message. Is the file on the same computer as the database? If not, you'll need...
August 5, 2015 at 3:00 am
Viewing 15 posts - 3,091 through 3,105 (of 7,191 total)