Viewing 15 posts - 5,251 through 5,265 (of 26,490 total)
Jeff Moden (5/13/2015)
Steve Jones - SSC Editor (5/13/2015)
I think...
May 13, 2015 at 9:18 am
pwalter83 (5/13/2015)
imex (5/13/2015)
Try:
with
CTE_Months as
(
select DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0) as MonthYear
...
May 13, 2015 at 9:16 am
Lot of work being done. This may not display what you want in the result set, but it should meet your requirements.
with Months14 as (
select dateadd(month,datediff(month,0,getdate()) - n, 0)...
May 13, 2015 at 9:00 am
tarr94 (5/13/2015)
Thank you for responding!
Your solution appears to work. I added a couple of sample values to further test it out.
declare @test-2 table(TestData varchar(32));
insert into @test-2
values ('1234-qwer'),('12e3-aer'),('1-12er'),('a3874-wlsie3'),('2873b-23');
select * from...
May 13, 2015 at 8:14 am
Something like this:
declare @Test table(TestData varchar(32));
insert into @Test
values ('1234-qwer'),('12e3-aer'),('1-12er');
select * from @Test;
select * from @Test where TestData not like '%[^0-9]%-%'
If so, be sure you understand what that last query is...
May 12, 2015 at 2:44 pm
CELKO (5/11/2015)
May 12, 2015 at 10:25 am
Jeff Moden (5/11/2015)
Try this, Bill. The sys.parameters thing isn't for the return of TVFs. sys.columns is.
SELECT OBJECT_NAME(object_id),*FROM sys.columns
WHERE object_id = OBJECT_ID('nameofyourfunctionhere')
;
Thanks...
May 11, 2015 at 4:31 pm
Couldn't find anything to support this, but it probably exists in tempdb while the function is used since it is a table variable returned by the function.
May be something worth...
May 11, 2015 at 3:22 pm
Raymond van Laake (5/11/2015)
Hmm, yes was considering using a trigger... thanks for all your inputs
When you use the GUI to make some changes to a table, SSMS will create a...
May 11, 2015 at 2:33 pm
New Born DBA (5/11/2015)
Lynn Pettis (5/11/2015)
New Born DBA (5/11/2015)
Lynn Pettis (5/11/2015)So the following (hopefully I mapped everything correctly using the VIEW definition) didn't help:
CREATE NONCLUSTERED INDEX [Test] ON [dbo].[T387]
(
[C6]...
May 11, 2015 at 2:29 pm
Raymond van Laake (5/11/2015)
RTRIM(([dbo].[fx_formatTelnr]([project],[user_tel])))
I still get the error.
What strikes me is the following:I am trying to persist the field...
May 11, 2015 at 2:06 pm
New Born DBA (5/11/2015)
Lynn Pettis (5/11/2015)So the following (hopefully I mapped everything correctly using the VIEW definition) didn't help:
CREATE NONCLUSTERED INDEX [Test] ON [dbo].[T387]
(
[C6] ASC
)
INCLUDE
(
C1,
...
May 11, 2015 at 2:02 pm
New Born DBA (5/11/2015)
Lynn Pettis (5/11/2015)Show us that index that you had created.
ALTER TABLE [dbo].[T387] ADD PRIMARY KEY CLUSTERED
(
[C6] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB...
May 11, 2015 at 1:32 pm
New Born DBA (5/11/2015)
CKX (5/11/2015)
I think you may find this particular response from Lynn probably explains what is going on here.
You can experiment by "including" the other columns in your...
May 11, 2015 at 12:47 pm
TomThomson (5/8/2015)
Lynn Pettis (5/8/2015)
Jeff Moden (5/8/2015)
SQLRNNR (5/8/2015)
Lynn Pettis (5/8/2015)
Geez, now someone doesn't even understand that the code they are running generates and runs dynamic SQL.What is dynamic sql?
Who is John...
May 8, 2015 at 4:59 pm
Viewing 15 posts - 5,251 through 5,265 (of 26,490 total)