Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6047097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:18:50+00:00 2026-05-23T07:18:50+00:00

CREATE FUNCTION dbo.GetCustomers ( @ZIPCode VARCHAR(255) ) RETURNS TABLE AS BEGIN SELECT * dbo.GetCustomers

  • 0
CREATE FUNCTION dbo.GetCustomers
(
  @ZIPCode VARCHAR(255)
)
RETURNS TABLE

AS BEGIN
SELECT * dbo.GetCustomers
WHERE dbo.GetCustomers.ZIPCODE = ZIPCode 
RETURN
END

Im not familar with the syntax. Please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:18:50+00:00Added an answer on May 23, 2026 at 7:18 am

    It would have been worth guessing that the parameter @ZIPCode would go into the query as @ZIPCode

    CREATE FUNCTION dbo.GetCustomers
    (
      @ZIPCode VARCHAR(255)
    )
    RETURNS TABLE
    
    AS
    RETURN (
        SELECT * FROM dbo.Customers
        WHERE dbo.Customers.ZIPCODE = @ZIPCode
        )
    END
    

    Your first attempt WHERE dbo.Customers.ZIPCODE = ZIPCode is the same as WHERE dbo.Customers.ZIPCODE = dbo.CustomersZIPCode. That is, return all rows

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

here my code- create function dbo.emptable() returns Table as return (select id, name, salary
Consider the following tsql... create function dbo.wtfunc(@s varchar(50)) returns varchar(10) begin return left(@s, 2);
why error? CREATE FUNCTION [dbo].[seth] (@IdUrl BIGINT) RETURNS TABLE AS RETURN(SELECT * FROM dbo.NetGraph
I've used the following split function: CREATE FUNCTION dbo.Splitfn(@String varchar(8000), @Delimiter char(1)) returns @temptable
I have simplified my function to the following: create function [dbo].[UserSuperTeams](@ProjectId int) returns table
I have a function that returns groups(clusters) from a table.. create function dbo.ftAllClusters() returns
I have the following function: CREATE FUNCTION fGetTransactionStatusLog ( @TransactionID int ) RETURNS varchar(8000)
How come the following doesn't work? CREATE FUNCTION Test (@top integer) RETURNS TABLE AS
Is the following possible in SQL Server 2000? CREATE FUNCTION getItemType (@code varchar(18)) RETURNS
I have the following function: CREATE FUNCTION [dbo].[ListStockBySubCategory] ( @CategoryID varchar(10), @SubCategoryID varchar(10), @startRowIndex

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.