Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Headings

Status
Not open for further replies.

EscapeUK

Programmer
Jul 7, 2000
438
GB
I have a queryDef that calls a stored procedure.

However I would like to code the query headings myself
 
What are you actually doing in the Stored Procedure???
Creating a table?????

In Access you would use
Custname:[YourCustomersFieldname]
which would make the column heading or title "Custname"

in SQL use
Select YourCustomersFieldname AS Custname, someother columns Where ....


so the AS clause creates an expression which will show up
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
No just searching a table the As thing does not seem to work.

Can you see anything wrong with this

CREATE PROCEDURE sp_mysp
@Var1 varchar(100),
@Var2 varchar(100)

AS

select ABC_Table1.Description, ABC_Table2.Description


from ABC_Anothertable
JOIN ABC_Table1 ON (ABC_Table1.ID = ABC_AnotherTable.ref)
JOIN ABC_Table2 ON (ABC_Table2.ID = ABC_AnotherTable.Ref2)

Where ABC_AnotherTable.ref = @Var1 And ABC_AnotherTable.ref2= @Var2
 
its ok i feixed it

here is my alteration if anyone is interested

select ABC_Table1.Description As [Title1], ABC_Table2.Description AS [Title2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top