Forum Replies Created

Viewing 15 posts - 3,256 through 3,270 (of 5,504 total)

  • RE: Error Converting Varchar to Decimal Strange Behavior

    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...

  • RE: Stop users using SET LANGUAGE

    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...

  • RE: Show in columns

    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...

  • RE: I'm able to connect SQL Server 2008 instance from SSMS of SQL 2005!!

    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...

  • RE: Stop users using SET LANGUAGE

    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...

  • RE: De-normalizing Data

    Nilssond (6/24/2010)


    I do not need to aggregate any data, just display the data in historical order. This issue is that each subcategory may have more detail lines than the...

  • RE: Recursive query

    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...

  • RE: Show in columns

    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

  • RE: Help needed

    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...

  • RE: SQL Query help - Delete records based on above and below record values

    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...

  • RE: Data Driven Subscription feature in SSRS R2

    Duplicate post. Please reply here.

  • RE: Updating Stored Procedure

    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...

  • RE: CONDITIONAL SELECT - HELP

    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....

  • RE: CONDITIONAL SELECT - HELP

    Ram:) (6/22/2010)


    Hi Lutz,

    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.....

  • RE: CONDITIONAL SELECT - HELP

    Thank you for clarification regarding the SQL version you use.

    Would you mind answering the question in my previous post (order of appearence)?

Viewing 15 posts - 3,256 through 3,270 (of 5,504 total)