Viewing 15 posts - 6,451 through 6,465 (of 8,731 total)
hisakimatama (5/16/2014)
For this reason, it's strongly recommended to always qualify your subquery column names, lest a highly-confusing error crop up at some point 🙂
+1000
May 16, 2014 at 3:49 pm
I would go with SSIS as well, but if you want to do it with Powershell, there are plenty of examples in the web.
A search on google for "powershell export...
May 16, 2014 at 3:40 pm
I would suggest to restrict your query to only find those 2 values.
Select distinct
Case when P.Dept_Value = 'Accounting' Then 'AccountingPerson'
When P.Dept_Value = 'ITServices' Then 'ITPerson'
End Type
From PesonDept P
WHERE P.Dept_Value IN(...
May 16, 2014 at 3:10 pm
Put the query and file between double quotes and it should work.
bcp "select * from TRAFICO1.dbo.HECHOS_TRAFICO_DATOS_PREPAGO_201308_5338_5347" queryout "\\trafico\Historicos_Tablas\PLANOS_TRAFICO\HECHOS_TRAFICO_DATOSPREPAGO_201308_5338_5347.txt" -c -t"|" -Strafico\traficosql -T
May 16, 2014 at 1:50 pm
viresh29 (5/16/2014)
Here is the script to copy table structure from temp to target.CREATE TABLE TagetTableName
AS
SELECT TOP 0 * FROM TempTableName.
That's a bad design solution as no one should have a...
May 16, 2014 at 1:08 pm
I never spoke about a real temp table (#table), I just followed the description that you used.
I must not have explained myself clearly. I made an example to show you...
May 16, 2014 at 1:05 pm
Here's another option. It works with the sample data and I would expect it to work with real data as well. The only difference is with det_YY column which you...
May 16, 2014 at 12:14 pm
You need DDL for your target table. And use some code like this:
SELECT *
FROM Temp_Table
WHERE LEN( string_column1) > length of string_column1 in target table
OR LEN( string_column2) > length of string_column2...
May 16, 2014 at 12:00 pm
You should be aware that if you use a varchar(MAX) column a input to the DelimitedSplit8K function, you can have silent truncation.
Other than that, it's a great function.
May 16, 2014 at 8:25 am
Jeff Moden (5/15/2014)
Luis Cazares (5/15/2014)
crmitchell (5/15/2014)
farooq.hbs (5/14/2014)
I found the solution..LEFT([field], CHARINDEX(',', [field]) - 1)
:):):)
Thanks:-):-):-):-)
That will work if you are certain that your source string will ALWAYS contain at least...
May 15, 2014 at 6:08 pm
I thought that it was clear that I posted an example of a bad design just to show you how to include the BETWEEN on 3 different tables as you...
May 15, 2014 at 12:09 pm
You might want to check this article as well. 😉
http://www.sqlservercentral.com/articles/T-SQL/103343/
It will explain how does this work.
DECLARE @StartDT DATETIME
,@EndDT DATETIME
;
...
May 15, 2014 at 10:08 am
CELKO (5/14/2014)
May 15, 2014 at 8:48 am
crmitchell (5/15/2014)
farooq.hbs (5/14/2014)
I found the solution..LEFT([field], CHARINDEX(',', [field]) - 1)
:):):)
Thanks:-):-):-):-)
That will work if you are certain that your source string will ALWAYS contain at least one comma. If you...
May 15, 2014 at 8:06 am
Maybe the DelimitedSplit8K can help you with this. You could split, change the emails and rejoin the string.
Here's an example:
CREATE TABLE #Test(Somestring varchar(8000))
INSERT #Test VALUES('<set type="TomAgingAlertProperties"><TomAgingAlertProperties><properties><USE_AGING_CALENDAR value="true"/><CALENDAR_INT value="206"/><AGE_PRE_PAYMENTS value="true"/><AGE_AS_APPLIED value="true"/><OTHER_LIST...
May 14, 2014 at 6:42 pm
Viewing 15 posts - 6,451 through 6,465 (of 8,731 total)