Viewing 15 posts - 1,201 through 1,215 (of 1,424 total)
Is this really sql 2008?
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 29, 2020 at 11:14 pm
Nevermind
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 29, 2020 at 11:14 pm
Thanks Phil I'm a big fan of your articles. I completely agree JSON can be a key element of efficient application data access. As far as data validation goes tho... ...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 27, 2020 at 2:24 pm
with
other_parts_cte as (
select
p.PartId, t.maskId, t.chemicalid
from
#temp t
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 26, 2020 at 2:39 pm
I need when user write any formate different from dd/mm/yyyy
like mm/dd/yyyy or yyyy/mm/dd
convert to dd/mm/yyyy
How to do that please ?
To insert into a column of type DATE in SQL...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 25, 2020 at 1:58 pm
The 2nd item in the select list is not included in the GROUP BY clause. Shouldn't it be? The tables which are nested inside the STUFF function join to the...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 24, 2020 at 10:13 pm
select substring(@text, len(@text)-11, 8);
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 24, 2020 at 8:52 pm
You marked your own answer as the answer? Nicely done!
declare
@text ...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 24, 2020 at 7:35 pm
Nicely done Mark Cowne. My attempt avoids the inequality on date (which makes me nervous) but is otherwise the same.
with
t_rn_cte(person_from, person_to, kind, pctg_new, eff_date, row_num) as (
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 24, 2020 at 6:17 pm
Here's an article from SSC:
https://www.sqlservercentral.com/articles/8-ways-to-export-sql-results-to-a-text-file
If it were me I'd use BCP, the Bulk Copy Program that comes with SQL Server.
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 24, 2020 at 12:53 pm
What happens if you add TOP(1)? Will any row convert or does every row fail?
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 23, 2020 at 1:30 pm
drop function if exists dbo.test_name_chopper;
go
create function dbo.test_name_chopper(
@PREFX VARCHAR(10),
@DELIM VARCHAR(30),
@AD_STR VARCHAR(500))
returns table as
return
select
IIF(PATINDEX(@DELIM,@AD_STR collate Latin1_General_CS_AS)<=0,
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 22, 2020 at 4:08 pm
Well in my opinion just looking for a comma is risky. Trying to comma parse the entire string multiplies the risk! So that seems unnecessary imo. Here's a safer way...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 22, 2020 at 3:20 pm
Give it a try and see! 🙂 Yes it should work like:
select
substring(@test, 4, charindex(N',OU=' collate Latin1_General_CS_AS, st.some_column, 4)-4) some_name
from
some_table st;
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 22, 2020 at 2:15 pm
The safest way to do this imo is to look for the first occurrence of ',OU=' in a case-sensitive way.
declare @testnvarchar(max)=N'CN=Some Person,OU=Sales,OU=Some Company - SK,OU=Companies - Some...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
January 22, 2020 at 2:07 pm
Viewing 15 posts - 1,201 through 1,215 (of 1,424 total)