Forum Replies Created

Viewing 15 posts - 4,426 through 4,440 (of 7,636 total)

  • RE: how to convert vb function to sql function

    wrt the missing bits: you should be aware that SQL Server places severe restrictions on what you can do in and with user defined functions. In particular, you cannot...

  • RE: Order by clause

    Hmm, I think that we must have interpreted his post differently, Chris.

  • RE: Order by clause

    Something like this:

    Select *

    From yourTable

    Order By (Case When col=1 then 0 else 1 End), Col1

  • RE: Identity Column

    I think that most of us have been there at one time or another and it usually takes a little bit to get over the idea that we will get...

  • RE: Error when Creating a View

    Itzsam (12/12/2008)


    When Creating a View................i am facing the error as..............

    " Msg 8152, Level 16, State 10, Procedure ddllogger, Line 7

    String or binary data would be truncated.

    The statement has been terminated....

  • RE: SQL Server, Creating a View

    washingtonen (12/14/2008)


    And BTW, the Function worked like a CHAMP.

    If condition = N then the data is retrieved in 5 seconds else it take about 5 minutes, and that's exactly what...

  • RE: SQL Server, Creating a View

    Oops, I missed these replies before my answer above...

  • RE: SQL Server, Creating a View

    A table-valued function is used just like you would a table or a view:

    Select * from dbo.fnDim_Concept()

    You can use the function reference anywhere in a query that you would put...

  • RE: dynamic column name in where clause

    Try it like this:

    where (case when @Store ='Country' then [Country]

    when @Store ='State' then [State]

    when @Store ='City' then [City]

    when @Store ='Region' then [Region]

    when @Store ='Store Name' then...

  • RE: Compute Clause????

    Well yes, it does beat the alternative.

  • RE: SQL Server, Creating a View

    here is a start:

    CREATE FUNCTION dbo.fnDim_Concept()

    RETURNS

    @tblVar TABLE

    (col1 int,

    col2 int)

    AS

    BEGIN

    if (select failed from dimstatus) = 'N'

    INSERT Into @tblVar select * from dim_region_mgr

    else

    ...

  • RE: SQL Server, Creating a View

    A table-valued function can be used just like a View. And yes, that includes being called from a View.

  • RE: Method for properly constraining an address table

    Take the IsPrimary flag out of UserAddress and put a PrimaryAddressID column into the Users table.

  • RE: SQL Server, Creating a View

    Ah, well in that case then timothy has the right solution. If that performs slowly, then that is a different problem.

    You cannot use an IF statement in a view....

  • RE: SQL Server, Creating a View

    How does the Flagsta table relate to the dim_concept table?

    In other words how do you determine which row in dim_concept or vw_dim_concept to dispaly if a row in Flagsta based...

Viewing 15 posts - 4,426 through 4,440 (of 7,636 total)