About 185,000 results
Open links in new tab
  1. SQL User Defined Function Within Select - Stack Overflow

    Mar 18, 2015 · If it's a table-value function (returns a table set) you simply join it as a Table. this function generates one column table with all the values from passed comma-separated list. …

  2. sql - How to use a function in Select Query - Stack Overflow

    Apr 13, 2017 · I need to use a function in a select query. Below is my code for Function and Select Query. Sample Function: CREATE FUNCTION …

  3. sql - How to call User-defined function in SELECT statement with …

    Feb 7, 2018 · For example (if the scema is dbo), you can call the function with dbo.GetIptoCountry(): select *, dbo.GetIptoCountry(IP_address) as country from tblInfo …

  4. sql - How to call table valued function inside select Statement ...

    Nov 28, 2014 · I have created table valued function. I am calling like this select * from dbo.fun_sample(1) It is working fine. I have table called Emp Table Emp Id Name Lname 1 …

  5. Running SELECT statement inside a Function in SQL

    I am trying to use a select statement inside a function like this: CREATE FUNCTION get_Id (d DATE) RETURNS INTEGER BEGIN DECLARE @retval INTEGER SELECT id from …

  6. Function SELECT that returns a row in SQL SERVER 2012

    May 30, 2017 · I want to create a function that gets the last record from my table, but it didn't work. My code is : CREATE FUNCTION GetLastReglement (@CT_Num VARCHAR(17)) …

  7. How do I perform an IF...THEN in an SQL SELECT?

    Sep 15, 2008 · From SQL Server 2012 you can use the IIF function for this. SELECT IIF(Obsolete = 'N' OR InStock = 'Y', 1, 0) AS Salable, * FROM Product This is effectively just a shorthand …

  8. Return value from function in SQL Server - Stack Overflow

    Sep 30, 2016 · Just rewrite it like this table-valued function:. CREATE FUNCTION dbo.Get_NextSaturdayDay() RETURNS TABLE AS RETURN ( -- Add the SELECT statement …

  9. sql - pass parameter in table valued function using select …

    Oct 24, 2013 · I have created a table valued return function which returns me a table . here is call of my function as follow . SELECT * FROM dbo.[StateFixedTaxesCalculation](3020,16,1,1006) …

  10. calling a function from PL/SQL in a select statement in ORACLE

    Compile the function in an appropriate schema (sames schema that will be running anonymous block) as follows: CREATE OR REPLACE FUNCTION GET_ANNUAL_COMP( sal IN …

Refresh