Forum Replies Created

Viewing 15 posts - 3,196 through 3,210 (of 3,544 total)

  • RE: Correlated Subquery - Please Help

    Or

    SELECT CONTACT_ID, 
    
    SUM(CASE WHEN TRX_YEAR = YEAR(GETDATE()) THEN AMOUNT ELSE 0 END) AS 'YTD AMOUNT',
    SUM(CASE WHEN TRX_YEAR = YEAR(GETDATE())-1 THEN AMOUNT ELSE 0 END)...

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

  • RE: dBase import - null dates problem

    If your importing you are checking DTSSource ;)]

    Why not use ActiveX for the column in question, ie

    
    
    Function Main()
    If DTSSource("x") = True Then
    DTSDestination("x") = null
    eElseIf DTSSource("x")...

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

  • RE: DTS Import Fixed-Length ASCII File Problem

    I'm using SQL7 SP4 and don't have any trouble defining or importing fixed length text files with or without trailing spaces in the first record. Are you sure your records...

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

  • RE: Adding IDENTITY field to large table

    Don't know why you get timeout either but I agree with planet115's answer. Another alternative is to bcp out, create new table and bcp back in. I have done copies...

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

  • RE: Relationships cause FK contsraint error

    What you are attempting to do is not possible or logical. To work, each address stored will have to have an adOwnerID & adOwnerTable matching in both crmTestORg and PersonDetails...

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

  • RE: CPU loop in SQL Server 7.0

    Don't have a fixed time anymore, tend to boot on fail.

    FYI one server rebooted 5 days ago the other 10 days.

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

  • RE: Quick FullText question

    At the moment I only have one table with search facility. I tried a query with the table joined to itself (using id) and with multple CONTAINS statement. It worked...

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

  • RE: CPU loop in SQL Server 7.0

    Hi Greg,

    Can't say that I can identify my problem with yours.

    I have two Win2000 servers with SQL7 SP4 and different memory (512MB & 1GB). The following symtoms occur at random...

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

  • RE: need help -BETWEEN DATEPART

    Len,

    In addition I only did it this way due to the use of BETWEEN. I don't use BETWEEN personally, I always code the above as follows

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

  • RE: need help -BETWEEN DATEPART

    Sorry ilan,

    The line should be

    WHERE (fld1 BETWEEN @fromdate AND @todate) AND (fld2 = 12)

    Len,

    Your right, good idea. Never too old to learn.

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

  • RE: Move and Remove records

    If the contents of the single field is unique (eg contains date and time) then I would use a third table to hold extracted data, parse from, and join to...

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

  • RE: need help -BETWEEN DATEPART

    Personally I would do the following

    
    
    declare @fromdate datetime
    declare @todate datetime
    set @fromdate = CAST(CONVERT(varchar(8),getdate(),120)+'01' AS datetime)
    set @todate = DATEADD(second,-1,@fromdate)
    set @fromdate = DATEADD(month,-1,@fromdate)
    SELECT id, Fname, fld2, fld1
    FROM...

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

  • RE: How to store result of SELECT in local var.

    The syntax of the CASE statement looks OK.

    I would write the statement like this

    CASE WHEN BIV < 100 THEN 'M' ELSE 'A' END AS BivType,

    Pendantic I...

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

  • RE: Query Output

    SQL7 SP4 xp_sendmail with Outlook 2000. Could not use cdosys and SMTP as the email has to be sent externally and our Exchange server does not act as a relay...

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

Viewing 15 posts - 3,196 through 3,210 (of 3,544 total)