Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp to sqlserver codes conversion
Message
 
 
To
25/11/2016 11:37:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
OS:
Windows 7
Network:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01643953
Message ID:
01643980
Views:
42
>Dear Experts,
>
>How to conevert these vfp codes for sqlserver 2008 management studtio?
>
>
SELECT cast(LEFT(codes,1) as char(7)) as codes, names, SUM(amount) as amount 
FROM table1 WHERE LEN(codes) = 7 GROUP BY  LEFT(Codes,1), Names 

UNION ALL 
SELECT cast(LEFT(codes,2) AS CHAR( 7)) as codes, names,SUM(amount) as amount FROM table1 WHERE LEN(codes) = 7 
GROUP BY  left(Codes,2),Names 
etc
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform