Forum Replies Created

Viewing 15 posts - 3,151 through 3,165 (of 3,544 total)

  • RE: Silly Question

    Excellent solution Brendt, wish I'd thought of that

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: header record in file

    I would bcp header data to one file, bcp the data to another and concatenate the two.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Remote constraint

    Not in SQL7.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Silly Question

    Hi Frank,

    'writing nice looking sql'

    Sure is, I try to make my code as tabular and indented as possible to make reading and understanding easy and especially for the next poor...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: GROUP BY WEEK

    Hi Jay,

    Just being picky but why do have 'HAVING COUNT(*) > 0' in the query? Is it not superfluous as the query cannot return month/year with a count of 0?

    Edited...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Remote login and password in linked servers

    What do you mean by transfer?

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Silly Question

    Hi Frank,

    Actually three, 0, 1 and NULL. In the original and my query there is no provision for NULL and therefore i assumed (there's that word again) there were no...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Silly Question

    Why better, I see nothing wrong with your way. Another way of writing it would be

     CREATE PROCEDURE dbo.spRef_GetCertifications
    
    (
    @activesOnly bit
    )
    AS
    SELECT ID, Name, IsActive, SubmittedOnGMT
    FROM...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: BCP/BULK INSERT using fixed length file

    I am on SLQ7 SP4 and I can import fixed length text files with or without cr/lf.

    Can you post table structure and sample data?

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Help big problem search between tow date fields

    Do you mean like this

    SELECT *, 
    
    (CASEWHEN (tarih >= CONVERT(varchar(11), DATEADD([day], 0, GETDATE()), 120)+'16:00:00')
    AND (tarihb <= CONVERT(varchar(11), DATEADD([day], 1, GETDATE()), 120)+'16:00:00')
    THEN 1
    WHEN...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Union

    Several things

    Why have 4 unions

    Why are you grouping on more fields than in distinct

    Why group and distinct

    What do you mean by merging, do you mean concatenate as in FollowupType+CallType+Job...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Jet db as a Linked Server in SQL 2000

    Make sure

    Access DB is not encrypted or secured

    The server has access to the file

    Change security to 'they will be mapped to' with a remote user of admin and no password.

    ...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: How can i find a the date of birthday ?

    This view will return values from the table plus two extra columns for BirthdayToday and BirthdayThisWeek

    DROP VIEW UserBirthDay 
    
    GO
    CREATE VIEW UserBirthDay AS
    SELECT...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Text File Source trailing spaces

    If the field contains a LF then I think there must be a problem with the datafile. I have seen data where LF not converted and CR/LF added to each...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: How can i find a the date of birthday ?

     SET DATEFIRST 1 --Monday
    
    declare @startday int,@endday int
    set @startday = day(getdate()-datepart(weekday,getdate())+1)
    set @endday = @startday+6
    select FirstName,LastName
    from users
    where month(Date_born) = month(getdate())
    and day(Date_born) >= @startday
    and day(Date_born) <= @endday

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 15 posts - 3,151 through 3,165 (of 3,544 total)