Viewing 15 posts - 3,256 through 3,270 (of 5,504 total)
It's a common misinterpretation to assume ISNUMERIC() will work like "OnlyNumbers".
Here's an alternative:
DECLARE @a VARCHAR(10)
SET @a='1e10'
SELECT ISNUMERIC(@a)
IF @a NOT LIKE '%[^0-9]%'
SELECT 'numeric'
ELSE SELECT 'not numeric'
You could also search this site...
June 25, 2010 at 1:55 am
If you're able to remove the dashes prior or during insert it will work independend of any language setting, since SQL Server will identify '20100625' as YYYMMDD.
Could you describe a...
June 25, 2010 at 1:39 am
You're welcome 😀
The concept is called "CroosTab" (see the related link in my signature). The next "level" would be DynamicCrossTab that allows you to create a matrix with flexible name/number...
June 24, 2010 at 11:49 pm
There's a difference between "connecting" and "using" SS2K8 with SSMS 2K5.
You can connect to the db. You can even use a query window and query SS2K8 tables as long as...
June 24, 2010 at 4:26 pm
Just being curious: What's the reason to disallow a change of language settings? Care to share an example? If it's due to using DATEPART(week/weekday) or @@DATEFIRST we might be...
June 24, 2010 at 2:47 pm
Nilssond (6/24/2010)
June 24, 2010 at 2:41 pm
Please provide table definition (DDL), sample data and expected result based on the sample in a ready to use format as described in the first link in my signature.
Also, please...
June 24, 2010 at 2:35 pm
Something like this?
SELECT
EmpNo,
EmpName,
Adate,
MAX(CASE WHEN Reader='I' THEN Atime ELSE NULL END) AS TimeIN,
MAX(CASE WHEN Reader='O' THEN Atime ELSE NULL END) AS TimeOut
FROM #Log_Transactions
GROUP BY EmpNo,EmpName,Adate
June 24, 2010 at 5:21 am
Please provide table def and sample data in a ready to use format together with your expected result and what you've tried so far. For details on how to post...
June 23, 2010 at 4:36 pm
Posting your problem in multiple threads doesn't only waste resources, it also slows down the time until you get an answer that will actually solve your issue (especially if it...
June 23, 2010 at 2:53 pm
Duplicate post. Please reply here.
June 23, 2010 at 2:49 am
If you want to generate the names based on the value of Begin_Journey_Date then you could include the following lines in your union statement:
SELECT 'Q'+ cast(datepart(quarter,Begin_Journey_Date) as char(1))+cast(datepart(year,Begin_Journey_Date) as...
June 22, 2010 at 11:56 pm
I'd like to understand the business case rather than doing an interpretation of SQL code...
But by looking at mister.magoos latest code snippet it seems like he's on the right track....
June 22, 2010 at 5:25 pm
Ram:) (6/22/2010)
I didn't get you completely.. as per my understand i think your are asking about ORDER BY TYPE and your taking top value from that..
If it is so.....
June 22, 2010 at 5:07 pm
Thank you for clarification regarding the SQL version you use.
Would you mind answering the question in my previous post (order of appearence)?
June 22, 2010 at 4:53 pm
Viewing 15 posts - 3,256 through 3,270 (of 5,504 total)