Viewing 15 posts - 511 through 525 (of 1,409 total)
twin.devil (3/4/2014)
you with ensure that data on which you are joining should be of numeric...
March 4, 2014 at 6:45 am
Keep in mind there are some caveats with the IsNumeric function. Several blogs and articles are written about that. Search for "IsNumeric" on this site.
Take a look at http://www.sqlservercentral.com/articles/ISNUMERIC()/71512/
March 4, 2014 at 6:35 am
igloo21 (3/4/2014)
Above bolded parts in the quotes display a contradiction. Did the query run correct when removing both the CASE statements or did it NOT run correct?
If it didn't run...
March 4, 2014 at 6:11 am
igloo21 (3/4/2014)
GilaMonster (3/4/2014)
If you comment out the CASE in both the select and the where does the error go away?
Thanks for the reply, yes it goes away, but I need...
March 4, 2014 at 5:58 am
What is the defined datatype for column [sCustomer_number] in table [dbo].[abc_Customers] ?
I expect the error is caused by the CASE statement. Can you confirm this by removing both the CASE...
March 4, 2014 at 5:02 am
Kurt W. Zimmerman (2/28/2014)
February 28, 2014 at 8:41 am
I see your point although you can also colorcode the query-windows in SSMS. Register the instances in registered servers and apply a different color for each instance under the "connection...
February 28, 2014 at 8:37 am
If you want the option to have 'XXXXX' as a complete textstring instead of this added after the intial string, then you need to put the initial string inside the...
February 28, 2014 at 8:28 am
Wouldn't it be easier to open connections to multiple SQL instances from one single SSMS? Each SSMS will need it's own resources, so opening up only one SSMS will perform...
February 28, 2014 at 3:35 am
The problem is in the rounding of FLOAT values. A FLOAT value isn't a precise value.
You can see the difference where you substract the values, see the results from the...
February 13, 2014 at 4:44 am
The EXEC (@SQL) starts a new transaction. Within this transaction the variable has to be declared.
declare @var varchar(max) = '@var1',
@sql varchar(max)
declare @var1 varchar(max)
print @var
set @sql='declare '+@var+' varchar(max);set '+@var+' = ''name'''
print...
February 13, 2014 at 4:15 am
With your provided sample data the blelow query will get the desired results.
Query:
select
COUNT(ID) as 'Count'
, CONVERT(char(4), datepart(yyyy, CreatedOn)) + 'Q' + convert(char(1), datepart(q, CreatedOn)) as QuarterOfYear
, State
from Ticket
group by
CONVERT(char(4), datepart(yyyy,...
February 11, 2014 at 1:37 pm
You can use the DATEPART function to get the quarter of a datetime value. Next you need to GROUP BY on the DATEPART part. Below I have generated some sample...
February 11, 2014 at 1:27 pm
Casper101 (2/10/2014)
...it has happened that the job does not finish and at 8 AM when business opens it then causes loads of problems with deadlocks, forcing me to Kill the...
February 11, 2014 at 1:53 am
Does it succeed if you add this user to the 'db_owner' role using SSMS? First try scripting out your actions in the GUI and run the output. If that doesn't...
February 10, 2014 at 2:19 pm
Viewing 15 posts - 511 through 525 (of 1,409 total)