Forum Replies Created

Viewing 15 posts - 9,766 through 9,780 (of 10,144 total)

  • RE: The Daily Commute

    tedo (7/28/2008)


    I live in Japan, I have to go everywhere by train, I live about 30k from tokyo, however, the land of the shinkansen, has really slow trains. in the...

  • RE: UK Cultures

    tedo (7/28/2008)


    well people from england if you really want to see the English don't go to london, there are no English there now, you are likely to get stabbed rather...

  • RE: One Heck of a Query

    Hi Pino-daddy

    This is untested (no data).

    I've made two main changes to the query

    1. Replaced old-style joins

    2. Renamed the outermost derived table from D2 to D3

    select distinct D3.c4 as c1,

    ...

  • RE: Multiple criteria (COUNT(DISTINCT(*) in select statement

    Hi Brandon

    It's a little sketchy, but there's at least one solution for this. The simplest to follow is along the lines of...

    SELECT ReceivedCases = SUM(CASE WHEN status = 'C' AND...

  • RE: returning part of string value where separator is '-'

    DROP TABLE #Test

    CREATE TABLE #Test (TestString VARCHAR(30))

    INSERT INTO #Test (TestString)

    SELECT 'V104 - Luis' UNION ALL

    SELECT 'VHBG 104 - Luis' UNION ALL

    SELECT 'V1 04 - Luis' UNION ALL

    SELECT...

  • RE: count the rows

    Venkatesan Prabu (7/26/2008)


    Below query,

    select count(*) from table

    will fetch you the count of rows in your table.

    If you have date column then you can modify the query like,

    select count(*) from table...

  • RE: HOw to change folder name through sql command

    What do you get when you execute this?

    DECLARE @CMD VARCHAR (1000)

    SET @CMD = 'DIR C:\Inetpub\wwwroot\Pergamum\Doc\*.*'

    IF OBJECT_ID('tempdb..#Output') IS NOT NULL

    DROP TABLE #Output

    CREATE TABLE #Output (CopyResult VARCHAR(500))

    INSERT INTO #Output EXEC...

  • RE: SQL Stored Procedure with parameters

    So, you're starting about here...

    DECLARE @StartDate DATETIME, @EndDate DATETIME, @OrderID NVARCHAR (40), @CustomerID NVARCHAR (40), @ICPAuditID NVARCHAR (40)

    SET @StartDate = somedatetime

    SET @EndDate = somedatetime

    SET @OrderID = something or NULL

    SET @CustomerID...

  • RE: SQL Stored Procedure with parameters

    b_boy, you haven't declared all of the variables. In any case, it's going to save you time to test this as a query in QA before comitting it to a...

  • RE: HOw to change folder name through sql command

    Does this directory exist on the SQL Server which is running the command? 😉

    If not, you will need to figure out the address and substitute it for what you're using,...

  • RE: dateformat little fast reply

    RyanRandall (7/25/2008)


    Here's an alternative...

    select cast(stuff(stuff('280908', 5, 0, '/'), 3, 0, '/') as datetime)

    Is it friday or have we been here before?

  • RE: dateformat little fast reply

    Hi Terry

    You don't need to hold your breath - try the code in SQL Server 2k.

    Cheers

    ChrisM

  • RE: SELECTing from a selection?

    bellammj (7/25/2008)


    Thanks for your response Chris. I may well be in the wrong forum. I literally just started using Oracle/SQL yesterday and am feeling a little lost! Do you know...

  • RE: SELECTing from a selection?

    Are you sure you're in the right forum? This is an Oracle error

    http://ora-00904.ora-code.com/

    indicating that a column in the SELECT list doesn't exist.

    Having said that, it's good practice to check that...

  • RE: counting problem

    You're welcome Jude. To consolidate what you've picked up from this snippet, I'd strongly recommend you read "Using Joins" in BOL.

    Cheers

    ChrisM

Viewing 15 posts - 9,766 through 9,780 (of 10,144 total)