Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)

  • RE: query help needed

    I got the solution. Hope it helps someone else.

    select

    CollectionUrl

    , MAX(LastAccessedDate)

    from dbo.tracking

    group by CollectionUrl

    having DateDiff(dd, MAX(LastAccessedDate), GETDATE()) > 60

  • RE: Populate table data based on two other tables

    Thanks. Somehow I missed thinking from that angle. The following query worked fine for me.

    Insert Into courseProgress (userId, classId, classParamId, status)

    select empTraining.userId, empTraining.classId, classParamDetails.classParamId, (CASE WHEN appCategory = 'Eq....

  • RE: Why my Join does not work ?

    Thanks, Maxim. It worked. I wrote sql joins before and I never encountered this issue with condition in where clause. As far as I remember, Left Join and Right Join...

  • RE: Why my Join does not work ?

    My mistake. The column title is from the query, itemId (not categoryId).

  • RE: Complicated Query - SQL Gurus Help please

    I gave more thought on this and came up with some ideas.

    The material expression would be evaluated as follows [where op is AND/OR].

    ((((m1 op1 m2) op2 m3) op3 m4) op4...

  • RE: Default NULL not working

    I am not using any Stored Procedures.

    Its because of the SQL Server behavior. If you try to put '' into a column of int datatype, SQL Server puts a default...

  • RE: Default NULL not working

    Here is the whole Insert statement

    Insert Into catalogItems (categoryId, itemPrice, supplierCompanyId, itemDeliveryDays, itemLimit) Values ('${param.category}', NULLIF('${param.itemPrice}',''), '${param.splrCompany}', '${param.delDays}', NULLIF('${param.itemLimit}',''))

    itemPrice is of float datatype and itemLimit is of int datatype. If user did not...

  • RE: Default NULL not working

    Used NULLIF(column-name, '') and that helped in converting '' to NULL.

  • RE: Default NULL not working

    I was able to resolve my problem using NULLIF. Thanks.

  • RE: Default NULL not working

    The Column allows NULLs and there is a default value of (null) for the column. There are no triggers. Also, There is no default value in the insert statement. I...

Viewing 10 posts - 1 through 10 (of 10 total)