Forum Replies Created

Viewing 15 posts - 1 through 15 (of 49 total)

  • RE: using IN and a list of values

    And I'm always impressed at how often someone else has a much simpler solution Learning new ways to think about things all...

  • RE: using IN and a list of values

    If necessary, you could select the results of the query into a temporary table and then use the cursor to iterate through the temporary table?

    However, couldn't you do this without...

  • RE: using IN and a list of values

    The only way to do this kind of thing is with dynamic SQL, e.g.

    declare @sql varchar(255)
    
    set @sql = 'select * from test where var_id in ('...
  • RE: Looking for Insert ideas using SPROC

    Something like this maybe?

    declare @startV15 datetime, @endV15 datetime, @currentV15 datetime
    

    set @startV15 = '2003-12-01 00:00:00'
    set @endV15 = '2003-12-02 00:00:00'

    -- Add the first 15 minute interval to the...
  • RE: Returning Numeric values exactly as inserted

    Probably doesn't add anything to the discussion, but would using a computed column expression help with the FDA issue? If you have a varchar column NUM_AS_STRING you could create...

  • RE: insert into table

    Not sure what you mean. What's the purpose of the stored procedure? To insert values or retrieve them?? Can you post some code to demonstrate more clearly what...

  • RE: insert into table

    Can't you replace the function entirely with a stored procedure? What is it that you are trying to do?

    Cheers,

    mia

    Life moves pretty fast. If you don't stop and look around...

  • RE: insert into table

    It's not possible to insert into a table in the body of a function unless it's a table variable local to the function. You would need to use a...

  • RE: Problem with "WITH CHECK OPTION"

    Interestingly enough, if you change the reference in the innermost subquery from EMPLOYEEDETAILS.<Name> to USERS.<Name> (which is what I think ramakrishna100 intends from the first posting), the update succeeds, but...

  • RE: GROUPING based on another group ?

    Ah! Knew there must be a more elegant way of doing it than mine

    Cheers,

    mia

    Life moves pretty fast. If you don't stop and look around once...

  • RE: Problem with "WITH CHECK OPTION"

    I still don't know why 'with check option' isn't working. The only way I can get the with check option to work with your query is by doing it...

  • RE: Problem with "WITH CHECK OPTION"

    I presume you mean to select from USERS in the innermost nested select statement (as indicated in your first example)?

    i.e.

    
    
    select USERS.FIRSTNAME
    from users
    join EMPLOYEEDETAILS on...
  • RE: Problem with "WITH CHECK OPTION"

    I'm not absolutely clear from the example if this is what you need. I'm assuming userid in users links to employee_id in employee, in which case creating a view something...

  • RE: GROUPING based on another group ?

    Slightly different version of what's gone before - if you need to count students from previous years where they have skipped a year (e.g. if 'C10.99.001' had not appeared in...

  • RE: SELECT FROM a WHERE {end bit of field} not in B..?

    Or more briefly:

    select t2.id, t2.email

    from Table2 t2

    left outer join Table1 t1 on t1.domain = right(t2.email, len(t1.domain))

    where t1.id is null

    Multiple posts again - always think of a shorter way about...

Viewing 15 posts - 1 through 15 (of 49 total)