66 lines
2.2 KiB
Markdown
66 lines
2.2 KiB
Markdown
# AI SQL Builder User Guide
|
|
|
|
## What is the AI SQL Builder Module?
|
|
|
|
The AI SQL Builder module is an intelligent tool that helps users create SQL queries using natural language processing. It allows users to generate complex database queries without needing extensive SQL knowledge.
|
|
|
|
## Getting Started
|
|
|
|
To access AI SQL Builder:
|
|
1. Login to the system
|
|
2. Click on **Settings** in the main menu
|
|
3. Select **AI SQL Builder** from the submenu
|
|
|
|
## Key Features
|
|
|
|
### Primary Functions
|
|
- **Natural Language Query Generation**: Convert plain English to SQL queries
|
|
- **Query Optimization**: Automatically optimize generated queries for better performance
|
|
- **Query Validation**: Validate SQL syntax before execution
|
|
- **Query History**: Save and reuse previously generated queries
|
|
|
|
### Secondary Functions
|
|
- **Query Templates**: Pre-built query templates for common operations
|
|
- **Export Results**: Export query results to various formats
|
|
- **Query Sharing**: Share queries with team members
|
|
|
|
## How to Use
|
|
|
|
### Creating a New Query
|
|
1. Click **"New Query"** button
|
|
2. Enter your question in natural language
|
|
3. Select the target database/tables
|
|
4. Click **"Generate SQL"**
|
|
5. Review the generated query
|
|
6. Click **"Execute"** to run the query
|
|
|
|
### Example Queries
|
|
- "Show me all welders who completed their qualification in the last 6 months"
|
|
- "Find all NDT tests that failed inspection"
|
|
- "List projects with pending RFI responses"
|
|
|
|
## Best Practices
|
|
|
|
### Usage Guidelines
|
|
- ✅ Use clear, specific language when describing your query
|
|
- ✅ Specify date ranges and conditions clearly
|
|
- ✅ Review generated queries before execution
|
|
- ✅ Use query templates for common operations
|
|
|
|
### Quality Assurance
|
|
- ✅ Always validate queries before running on production data
|
|
- ✅ Test queries on sample data first
|
|
- ✅ Keep queries simple and readable
|
|
|
|
## Troubleshooting
|
|
|
|
### Common Issues
|
|
1. **Query not generating**: Check your natural language description for clarity
|
|
2. **Incorrect results**: Review the generated SQL and modify if needed
|
|
3. **Performance issues**: Use query optimization features
|
|
|
|
### Getting Help
|
|
- Contact the IT department for technical support
|
|
- Consult the database administrator for complex queries
|
|
- Check the query history for similar examples
|