|
|
-
Krishnrajsinh Rana Learned 6 Months ago through Just Learned | 1 Point
The trick is to append `.0e0` to the string and if it returns 1, the value is a whole number (no decimal fractions).
DECLARE @val VARCHAR(100)
SELECT @val = 'a'
SELECT ISNUMERIC(@val + '.0e0')
-- Returns 0
SELECT @val = '25'
SELECT ISNUMERI...
|
-
Krishnrajsinh Rana Liked 10 Months ago through Just Learned | 1 Point
Hi,
Just now i Wrote one query to remove special characters from a string..
Hope this is useful.
DECLARE @I VARCHAR(100)
SELECT @I ='abhi *s d ^.l'
WHILE PATINDEX('%[^A-Za-z0-9 ]%' , @I ) <> 0
BEGIN
SELECT @I= STUFF(@I,PA...
|
-
Krishnrajsinh Rana Learned 10 Months ago through Just Learned | 1 Point
Hi,
Just now i Wrote one query to remove special characters from a string..
Hope this is useful.
DECLARE @I VARCHAR(100)
SELECT @I ='abhi *s d ^.l'
WHILE PATINDEX('%[^A-Za-z0-9 ]%' , @I ) <> 0
BEGIN
SELECT @I= STUFF(@I,PA...
|
-
Krishnrajsinh Rana Liked 10 Months ago through Just Learned | 1 Point
Hi,
Just now i Wrote one query to remove special characters from a string..
Hope this is useful.
DECLARE @I VARCHAR(100)
SELECT @I ='abhi *s d ^.l'
WHILE PATINDEX('%[^A-Za-z0-9 ]%' , @I ) <> 0
BEGIN
SELECT @I= STUFF(@I,PA...
|
-
Krishnrajsinh Rana Learned 10 Months ago through Just Learned | 1 Point
Hi,
Just now i Wrote one query to remove special characters from a string..
Hope this is useful.
DECLARE @I VARCHAR(100)
SELECT @I ='abhi *s d ^.l'
WHILE PATINDEX('%[^A-Za-z0-9 ]%' , @I ) <> 0
BEGIN
SELECT @I= STUFF(@I,PA...
|
-
Krishnrajsinh Rana Liked 11 Months ago through Just Learned | 1 Point
Normally, people uses PARSENAME fuction to retrieve Server,Database,Owner and Object from four part query.
Here is another use of same to remove decimal points
SELECT PARSENAME('$12,345.00',2) -- $12,345...
|
-
Krishnrajsinh Rana Learned 11 Months ago through Just Learned | 1 Point
Normally, people uses PARSENAME fuction to retrieve Server,Database,Owner and Object from four part query.
Here is another use of same to remove decimal points
SELECT PARSENAME('$12,345.00',2) -- $12,345...
|
-
Krishnrajsinh Rana Liked 11 Months ago through Just Learned | 1 Point
Normally, people uses PARSENAME fuction to retrieve Server,Database,Owner and Object from four part query.
Here is another use of same to remove decimal points
SELECT PARSENAME('$12,345.00',2) -- $12,345...
|
-
Krishnrajsinh Rana Learned 11 Months ago through Just Learned | 1 Point
Normally, people uses PARSENAME fuction to retrieve Server,Database,Owner and Object from four part query.
Here is another use of same to remove decimal points
SELECT PARSENAME('$12,345.00',2) -- $12,345...
|
-
Krishnrajsinh Rana Liked 11 Months ago through Just Learned | 1 Point
I needed to check where all a table is being used in a database or which objects are dependent on a table. Searched google and Pinal was on top :)
Here is the code.
SELECT referencing_schema_name, referencing_entity_name,
referencing_id, r...
|