Forum Replies Created

Viewing 15 posts - 46 through 60 (of 168 total)

  • RE: Alter Table

    As of now there is no direct command is available for this, Its In the wish list for future releases

    You can easily do...

  • RE: coalesce is not working

    Try this

    Select

    COALESCE(CASE RTRIM(Mobile) WHEN ''...

  • RE: show street number

    Change Null to ad_num in Case statement like this

    update @table

      

      set ad_num =

      case

      WHEN (CHARINDEX(' ', ad_str1) < 10) AND (CHARINDEX(' ', ad_str1) <> 0)

        --creates...

  • RE: evaluate math function

    You can try this

    select

    name, fn, val,cast (val/0.65...

  • RE: Are primary keys clustered indices by default?

    When you create a PRIMARY KEY constraint, a unique index on the column, or columns, is automatically created. By default, this index is clustered; however, you can specify a nonclustered...

  • RE: Finding a column name in a database

    You can get this information from Information_schema views like this

    select

    * from information_schema.columns where column_name

  • RE: Stupid query question...

    try this also

    Select max(startdate) as startdate, max(starttime) as starttime, max(page) as page, p.pageid FROM Page_History P

    Inner Join

    (select pageid,max(startdate) as maxdate from Page_History Group by pageid) B

    on p.startdate=b.maxdate and p.pageid=b.pageid

    Group by...

  • RE: Create a table using a variable

    use dynamic sql

    declare @param sysname, @sql nvarchar(4000)

    set @param ='tablename'

    set @sql='Create table '+ @param+'(sno int)'

    exec sp_executesql @sql

  • RE: IF statement in a function.

    try this for your problem

    CREATE

    Function dbo.fnAFCompExitCTMgrAI(@YYear int , @MonthNum

  • RE: CURSOR FOR (Remove Comma, Create New Column)

    If you want to use cursor for achieving this

    try this

    DECLARE

    @STR VARCHAR(100),

    @val

  • RE: IF statement in a function.

    use case function instead of If

  • RE: Help on grouping

    you can add Givendate to where clause like this

    Declare @Givendate datetime

    set @GivenDate='10/09/2006'

    select a.RecID,a.MemNo,a.DateCalled from grTest a inner join

    (select MemNo,max(DateCalled) as maxdate from grTest

     where convert(varchar,DateCalled,101)=convert(varchar,@GivenDate,101)

     Group by MemNo) b

    on a.MemNo=b.MemNo and a.DateCalled=b.maxdate...

  • RE: Help on grouping

    try this

    select a.RecID,a.MemNo,a.DateCalled from ABC a inner join

    (select MemNo,max(DateCalled) as maxdate from ABC

     Group by MemNo) b

    on a.MemNo=b.MemNo and a.DateCalled=b.maxdate

  • RE: OPENQUERY Maximum Length 128 ERROR MESSAGE

    First of all, try to execute the Query in Remote Server, if it is executed succesfully then try with simple select query to remote server then

    try again OPENQUERY with the...

  • RE: OPENQUERY Maximum Length 128 ERROR MESSAGE

    try this

    SELECT

    * FROM OPENQUERY([HHFNT-DW],'SELECT 0 AS MANUAL,C.HMO,C.ID,C.CLAIM,C.LINE,C.ORIG_CLM_NUM,C.PX_DE,C.PX__PROCEDURE_CODE,C.PX__NAME,MBCL.MOD AS MOD_DE,

    D5.MODIFIER_CODE AS MOD__MODIFIER_CODE,

    ...

Viewing 15 posts - 46 through 60 (of 168 total)