User Profile

Collapse

Profile Sidebar

Collapse
cheryl culwell
cheryl culwell
Last Activity: Dec 27 '10, 09:33 PM
Joined: Dec 14 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • cheryl culwell
    started a topic possible to use @variable in function?

    possible to use @variable in function?

    when using the following code in my function, I'm getting errors. Is it possible to set a variable and then use it in a function as follows?

    if OBJECT_ID ('tvf_Inline_Te st') is not null
    drop function tvf_Inline_Test
    go
    create function tvf_Inline_Test (@vstrDate char(15),
    @VSTRDTYR char(15),
    @mydatevar char(15),
    @thismo as char(15))
    set @thismo = right ('00'...
    See more | Go to post

  • what is wrong with my select for the retrieval of function data - getting error 216

    USE [PATEST]
    GO
    /****** Object: StoredProcedure [dbo].[ndform5queryfor xml] Script Date: 12/22/2010 09:03:12 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFI ER ON
    GO
    -- =============== =============== ===============
    -- Author: cculwell
    -- Create date: 10/29/10
    -- Description: nd form 5 query
    -- =============== =============== ===============
    ALTER PROCEDURE [dbo].[ndform5queryfor xml]...
    See more | Go to post

  • how can I retrieve the data '2010/05' by using the getdate variable

    The data in the table well_summary.ye armonth is defined as varchar(7) - I need to retrieve the previous month, get the current year & use those variables in a select to retrieve the previous month's data. I have formed the following select, but get an error with the "+" trying to add the '/' for the date. can someone help me correct the select?
    thanks

    select CAST(DATEPART(m , getdate())-1 AS VARCHAR(2)) /*last...
    See more | Go to post

  • how to select specific year/mo from table stored as varchar(7) '2010/05' in query

    I have a table, let's call it table, with a variable as yearmonth defined as varchar(7) and entered data as '2010/05'. I need to write a 'view' to be used by a 3rd party software which will select data from table for a specific month - i.e. previous month this year - how can I select only those records?
    See more | Go to post
No activity results to display
Show More
Working...