Forum Replies Created

Viewing 15 posts - 16 through 30 (of 38 total)

  • RE: Need to run a Select on a table for a specific time of day

    itpcpro (11/9/2011)


    Thanks John, Yeah that would be jobs that run before 7am... So 6:59:59 would be the ending point and I have another job that would pickup at 7:00:00 and...

  • RE: Need to run a Select on a table for a specific time of day

    itpcpro (11/9/2011)


    This does work if I run the job at 7am.. But what if I run the job at 10am or 1pm... I still only want the jobs that ran...

  • RE: Need to run a Select on a table for a specific time of day

    I realize this statement has a lot of date functions, but it will return a datetime for the day before at 5 pm.

    DATEADD(hh, 17, DATEADD(dd, DATEDIFF(dd, 0, GETDATE())-1, 0))

  • RE: join on 1=1

    I have seen this used many times as well. It basically satisifies the syntax requirement of the "JOIN" clause without any joining fields. Produces same result as a "cross join".

  • RE: OPENQUERY SYNTAX IS INSANE

    applebyte (11/9/2011)


    thanks for the reply. Adding the single quotes allowed the 'parse' check to be successful but when the code was executed, a syntax error occured.

    --

    Msg 102,...

  • RE: OPENQUERY SYNTAX IS INSANE

    it appears this is a case of needing to "embed" the single quotes within a quoted string. Anytime a sql statement is embedded in a "string" all items normally single-quoted...

  • RE: UPDATE/SET/REPLACE with multiple criteria

    In your example, use "NOT LIKE" instead of "<>".

    Does this correct the issue?

  • RE: General question - data conversion and inserts

    Well, I suppose it would be preference. I would say in your situation that the import/export wizard may be a faster method to get the data copied. If you are...

  • RE: Update/Set/Append

    Breakwaterpc (11/8/2011)


    However, one more issue with these tables. I know need to update part of a string that i placed in several different columns in the Subjects table....

  • RE: Update/Set/Append

    Breakwaterpc (11/8/2011)


    For some reason, i'm getting all twisted up and bumfuzzled here.

    First off, where is this variable "NewValue" getting used once it's cast? Doesn't appear anywhere in the...

  • RE: Update/Set/Append

    Also, when you concatenate the data together, do you require any separators such as a Space or Period?

    Here is a sample to get you started.....

    USE CIVIL

    GO

    UPDATE r

    SET comments =...

  • RE: Hi

    Just for reference, this SQL has the correction to the syntax error you received. Parantheses were missing around the select statement in the SET.

    DECLARE @CountValue INT

    set @CountValue= ( SELECT COUNT(ProductID)

    FROM...

  • RE: How to get NOT BETWEEN to work?

    LOLCatLady (11/2/2011)


    Hi, I'm new here and hoping someone could give me direction on how to make this code work.

    The INNER JOIN below with the select is pulling the correct data,...

  • RE: how to convert subquery to a join

    skanth (11/7/2011)


    select *

    from

    a,b,c

    where

    A.cash_id in

    ( select B.cash_id

    from B

    where B.cash_id = C.cash_id

    )

    Based on your query, all three...

  • RE: Inserting records into a large table

    Where I work, I started this same type of operation based on suggestions of other people while our tables were smaller. After a while, I realized this was not the...

Viewing 15 posts - 16 through 30 (of 38 total)