Viewing 15 posts - 8,971 through 8,985 (of 15,381 total)
;with EconSearch(SomeValue) as
(
select 'D.01.01.01' union all
select 'D.01.01.02' union all
select 'D.01.01.03' union all
select 'D.01.01.03.00'
)
select len(SomeValue) - len(Replace(SomeValue, '.', '')) as NumberOfPeriods
from EconSearch
March 22, 2013 at 9:59 am
Not much details here to provide anything resembling a coded solution but maybe NULLIF would work?
NULLIF(HistoryTable.Col1 = MainTable.Col1)
March 22, 2013 at 9:55 am
Thanks for the nod Lowell.
March 22, 2013 at 9:18 am
Assuming like Lowell said you are looking for these references in code and not in the actual values you could also just install SQL Search from RedGate. It is a...
March 22, 2013 at 8:56 am
Jason-299789 (3/22/2013)
CREATE PROCEDURE dbo.TEST
AS
DECLARE @ProcName sysname
SET @ProcName= OBJECT_NAME(@@PROCID)
...
March 22, 2013 at 8:54 am
julesbenone (3/22/2013)
Tks. tried that before logging this post but it didn't work ...
What do you mean it didn't work? Remember I don't know what you want for final output. I...
March 22, 2013 at 8:07 am
Are you asking if there is a way to determine the name of the currently running stored proc from within the stored proc? I don't know of any way to...
March 22, 2013 at 7:59 am
Please take a few minutes and read the article at the first link in my signature for best practices when posting questions. We need to see ddl, sample data and...
March 22, 2013 at 7:57 am
Please take a few minutes to read the first article in my signature about best practices when posting questions. We need to see ddl, sample data and desired output.
If you...
March 22, 2013 at 7:53 am
I can't get to your image but can you just replace the comma with a carriage return?
Select Distinct State, (Select Stuff((Select char(10) + City
From #tempCityState
Where State = t.State
FOR Xml Path('')),1,1,''))...
March 22, 2013 at 7:44 am
I think you are asking how to get the results of your select into a table?
If it is a table that doesn't exist you could use select into:
WITH cte AS
(
SELECT...
March 22, 2013 at 7:35 am
You are welcome. Thanks for letting me know that worked.
March 22, 2013 at 7:29 am
Sam S Kolli (3/21/2013)
So you are recommending to do the check in the proc itself, rather than relying on the table definition to drive the logic?
No you should ignore my...
March 22, 2013 at 7:28 am
OK I think I get what you were saying. I was just too dense to get it. I think something like this should get you started.
CREATE PROC dbo.insert_into_child(@list_of_string_vals varchar(8000))
AS
BEGIN TRY
BEGIN...
March 21, 2013 at 3:06 pm
Evil Kraig F (3/21/2013)
As mentioned, we want to see the DDL...
March 21, 2013 at 2:54 pm
Viewing 15 posts - 8,971 through 8,985 (of 15,381 total)