Forum Replies Created

Viewing 15 posts - 1,036 through 1,050 (of 1,082 total)

  • RE: Combining two varchar fields to one datetime

    Hi there,

     

    Please could you give the full table structure, when I use your code on my talbe with bother fields as varchar(100) this all seems to work 100%

     

    I'm using SQL2005

     

    Thanks

    Chris

  • RE: !ActiveSchema!

    Hi All,

    Sorry about this.

    It seems that with some further coding and testing that this [!ActiveSchema!] is actually jsut something that needs to be replaced with a real schema...

  • RE: UDF''''s in aggregate selects....

    Hi Ville,

     

    I am having trouble getting the same results as you!

     

    Please coul dyou let me knwo the code behind [dbo].[DateToStr]?

     

    Thanks

    Chris

  • RE: Update statement problem

    how are you creating your queries?

    Can you not just type the code into the query window?

  • RE: Update statement problem

    UPDATE t1

    SET t1.Field = t2.field

    FROM Table1 t1

    INNER JOIN Table2 t2

     on t1.PKField = t2.FKField

     

    That should work

  • RE: Update statement problem

    Hi there,

    Are you sure that the data that is being selected from now is not different?

    that error normally means that you are trying to assign multiple values to a single...

  • RE: count & sum

    Hi There,

    Will this do the trick?

    SELECT COUNT(*)

    FROM (SELECT DISTINCT ID_NR,ID_NR_p,KZ FROM dbo.Table WHERE KZ ='V') [nest]

  • RE: count & sum

    what about this:

    SELECT COUNT(*)

    FROM

    WHERE KZ='z'

    taht will give you a result of 3

  • RE: count & sum

    I'm confused.,

    What should your result look like?

  • RE: count & sum

    Hi There,

    Try this.

    SELECT ID_NR,COUNT(*)

    FROM

    WHERE KZ='z'

    GROUP BY ID_NR

    Thanks

    Chris

  • RE: To find the no of holidays between two date

    Hi there,

    What you could do is create a table that holds all the holidays for you company(don't need to include week-ends).

    Then you can right a query that does a dateDiff...

  • RE: Group By errors

    That will be hard to do without know exactly what it is yu are trying to achieve through your query.

    I'm sure the logic behind why you want to group by...

  • RE: Group By errors

    There are various ways.

    For example try using subqueries(performance must be kept in mind here)

    Also try using table Variables r temp tables to break down your results tehn join them at...

  • RE: Group By errors

    HI Mark,

    Just remember that the more fields that you are grouping by will normally mean more rows being returned because of the un-unqueness of the rows.

    Does that make sense?

  • RE: Group By errors

    IS the problem with your result set or are you getting an actual error?

Viewing 15 posts - 1,036 through 1,050 (of 1,082 total)