Posts Tagged ‘SQL’

Pagination and Switch Case in Where clause – SQL Server

Example of using pagination and switch case in where clause in SQL server

Resolve error – ORA-28000: the account is locked

How to Resolve error – ORA-28000: the account is locked

Convert rows into comma separated values column – SQL Server

Convert rows into comma separated values column – SQL Server

Get Foreign Key related details for the Table

Get Foreign Key related details for the Table in SQL Server

Drop Function if exist – SQL Server

SQL

Drop the user define function from database if it exists.

Get the FortNight Start and End date – SQL Server

SQL

Get the Fort night start and end date on the basis of input provided. if date falls in first 15 day then it will give the First Fort night start and end date and if date falls after 15 day then it gives respective start and end date.

Get First Day and Last Day of Week – SQL Server

SQL

Scalar function to get the first Day and Last day of the Week in SQL Server

Get First Day and Last Day of Month – SQL Server

SQL

Get the first day and last day of the month in SQL Server using Scalar functions

Drop Stored Procedure if exist in SQL Server

How to drop the stored procedure in SQL Server if exist

Search for Table in SQL Server

In organization, where huge number of tables present in database. its very hard to search the particular table. Here few SQL queries to search the table name by pattern. Search For Table whose name starts with A Clustered Index speeds up performance of the query ran on that table. Clustered Index are usually Primary Key but [...]