General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
How will i use Alias in SQL Statement
Environment versions
Network:
Windows 2000 Server
Hi Experts,
I have two tables
(1) EMPMST
EmpCode
EmpName
(2) EMPATT
EmpCode
EmpDate
EmpAtt
EmpRate
cSql = "Select EmpMst.EmpName As Name,EmpAtt.EmpDate As Date,EmpAtt.EmpAtt As AttHrs,EmpAtt.EmpRate As ;
Rate From BetaSql.dbo.EmpMst,BetaSql.dbo.EmpAtt where Len(EmpMst.EmpCode) > 0 and EmpMst.Empcode = ?;
cEmpCode And EmpMst.EmpCode = EmpAtt.EmpCode"
I m Trying to retrive some date using SQLEXEC(Connectionhandle, cSql,'Abc') function, But when i
save this statement, it gives some error in side the quots that 'command contains unrecognized phrase/keyword '. Then i removed alias referances and after that not showing any errors, But how will
put conditions like 'EmpMst.EmpCode = EmpAtt.EmpCode' ?. Thanks in advance
Regards
Abdulla
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only