Forum Replies Created

Viewing 15 posts - 17,986 through 18,000 (of 18,926 total)

  • RE: calculation

    we're both making assumptions and without the code there's no point in continuing this discussion.. I'll wait for his answer before drawing any final conclusion.

  • RE: urgent please

    It's pretty much the same thing I said. What else do you need to know?

  • RE: Simple query problem- help!

    Nah...

    For the whole month... so it makes more sens .

  • RE: Simple query problem- help!

    You need to double each apostrophe in the query.

    SELECT * FROM OPENQUERY(BARBSLIVE, 'SELECT REPLACE(d.agtpostcode, CHAR(32), '''') as pcode, c.agtname as name, MAX(d.agtrefno) as maxcode

    FROM EntaLive.dbo.agent as c ,EntaLive.dbo.AgentAddress as...

  • RE: UNION question

    Select ...

    union all

    select ...

    order by ColName

    This is the trick, but in your exemple you want 'b' to come before 'a' which requires either a desc order or some sort of...

  • RE: Update Using A Subqury

    Just reread the code, maybe something like this :

    UPDATE AE SET AE.count_fact = dtCounts.count_fact

    FROM tmp_ar_exception AE INNER JOIN

    (

    SELECT DISTINCT F_AR_Detail.date_id, COUNT(F_AR_Detail.date_id) AS count_fact FROM tmp_ar_exception LEFT OUTER JOIN

    ...

  • RE: Update Using A Subqury

    What is the rules that tells which row is the correct one?

  • RE: urgent please

    What I usually do for stuff like this is dump all the data into a temp table. Once you get your data there you can transfer the data that...

  • RE: calculation

    anything between 0 and 11 (int) divided by 12 (int) = 0, then 1 untill you get to 24. That's why I changed the 1 to 1.0 (decimal) /...

  • RE: Simple query problem- help!

    Your problem comes from the fact that you cannot use alias in the group by clause, this is allowed only in the order by clause.

    SELECT REPLACE(d.agtpostcode, CHAR(32), '') as...

  • RE: is there a "Clean" funcion in SQL?

    Yes you can but I'd expect an operation like this to create duplicates. What r u trying to achieve by this?

  • RE: UPDATE not working

    What you have here is 2 separate, unrelated, statements.

    Can you post the table definition along with some sample data. We'll also need to see what results you are trying...

  • RE: sql query - select all rows where (field) does not = (value)

    Select custId, lName, fName from dbo.Customers where CanceledOrder = 0

  • RE: UNION question

    You could always do something like this :

    select 'A' as Data, count(*) from dbo.SysColumns

    union ALL

    select 'B', count(*) from dbo.SysColumns

    Order by Case When Data = 'B' THEN 0 ELSE 1...

  • RE: UNION question

    I also thaught about this solution but I presumed that there was more unions in the select...

Viewing 15 posts - 17,986 through 18,000 (of 18,926 total)