Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How will i use Alias in SQL Statement
Message
From
21/05/2005 03:01:46
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
How will i use Alias in SQL Statement
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01016437
Message ID:
01016437
Views:
58
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
Map
View

Click here to load this message in the networking platform