Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to retrieve repeated data from detail Table
Message
From
27/04/2005 08:49:57
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
27/04/2005 08:39:18
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01008750
Message ID:
01008798
Views:
16
>Mr. Cetin,
>
>Yes, i agreed with you that Job Nos. and times are changing,
>But if i make query based on Date, Or (Date and Job No.) Or (Date And Employee And Job)
>
>(ie, the Table structure and data like as follows)
>
>Date EmpCode JobNo. Time
>01/04/2005 A Job1 3
>01/04/2005 A Job2 3
>01/04/2005 A Job3 2
>01/04/2005 B Job1 8
>
>How will be the Sql Satemant.
>
>Rgards
ldDate = {^2005/04/01}
lcJob = 'Job1'
lcEmpCode = 'A'

text to m.lcSQL noshow
select Date,EmpCode, JobNo, Time 
 from mySQLServerTable 
 where Date = ?m.ldDate 
   and JobNo = ?m.lcJob
   and EmpCode = ?m.lcEmpCode
endtext
SQLExec(m.lnConHandle,m.lcSQL,'myResult')
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform