SQL語法美化軟體 – SQL Pretty Printer 3.3.3

 1,612 total views,  1 views today

這是一套很好用的資料庫SQL語法軟體,他可以直接把SQL語法轉成C#、PASCAL、PHP…等等的語法,對於程式開發者是很好用的,尤其是開發delphi 常常會被幾個引號搞亂,使用SQL  Pretty Printer 就可以快速編程了。

原本很亂的SQL

SELECT top 100
sl.specObjId,
sl.lineID,
sMax.maxVel
— get the spectroscopic object ID, the line ID, and the max width (in velocity)
FROM SpecLine sl,
(SELECT
specObjID,
lineID,
Max(2.99e52.354sigma/wave) as maxVel
FROM SpecLine
WHERE (
— only include measured lines
category = 2 AND
— only include the most prominent lines
lineID in (1215,1400,1549,1909,2799,4863,6565) AND
— make sure that this is a reaonably well measured line
— (these are fairly weak constraints)
nSigma > 3 AND
chisq/nu < 20 AND
ew > 0 AND
abs(ew – heightsigma1.065*2.354/continuum)/ew < 0.25
)
GROUP BY specObjID, lineID) as sMax

整理後的SQL

[sql]SELECT top 100 sl.specObjId,
sl.lineID,
sMax.maxVel
— get the spectroscopic object ID, the line ID, and the max width (in velocity)
FROM SpecLine sl,
(SELECT specObjID,
lineID,
Max(2.99e5 * 2.354 * sigma / wave) as maxVel
FROM SpecLine
WHERE (
— only include measured lines
category = 2
AND
— only include the most prominent lines
lineID in ( 1215, 1400, 1549, 1909,
2799, 4863, 6565 )
AND
— make sure that this is a reaonably well measured line
— (these are fairly weak constraints)
nSigma > 3
AND chisq / nu < 20
AND ew > 0
AND abs(ew – height * sigma * 1.065 * 2.354 / continuum) / ew < 0.25 )
GROUP BY specObjID,
lineID) as sMax
[/sql]

有需要的可以下載試用
http://www.dpriver.com/index.php

發表迴響

%d 位部落客按了讚: