SQL/mSQL where (*) = something - Possible

Posted on 1999-01-05
Last Modified: 2008-03-06
My question is about SQL and mSQL.  I need to know if there is a SQL statement operator, suported by mSQL to define the "where" as a wild card. For Ex:

Select * From DB1
Where * Like S*

This would return all Fields of a row which contains any string starting with "S" no matter which field it is in...
Hence the Where *
Is this legal/Possible

Question by:guadalupe
1 Comment

Accepted Solution

spiridonov earned 50 total points
ID: 1092516
No , such statement doesn't exist. However you can create stored procedure, that will emulate such behaviour: loop through all the fields and check each of them for S* condition.

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question