Viewing 15 posts - 91 through 105 (of 112 total)
Yeah i know, i managed to find a solution. i split the #DATABASE table into a #FILEGROUP table and a #FILES table
CREATE TABLE #DATABASE (FILES VARCHAR(100), FILEGROUP VARCHAR(100))
CREATE TABLE #FILEGROUP...
--
Thiago Dantas
@DantHimself
November 20, 2009 at 8:22 am
--PREPARE
CREATE FUNCTION dbo.fn_CleanUp(@FooString VARCHAR(max))
RETURNS VARCHAR(max)
BEGIN
WHILE CHARINDEX(' ',@FooString) > 0
...
--
Thiago Dantas
@DantHimself
November 16, 2009 at 8:49 am
dhananjay.n.kulkarni (11/16/2009)
declare @str_having_multiplespaces varchar(200)
set @str_having_multiplespaces = 'hi onespace 2spaces ...
--
Thiago Dantas
@DantHimself
November 16, 2009 at 7:41 am
Richard Briggs (11/16/2009)
I cant understand why REPLACE has that 6 char limit though?
ALTER FUNCTION dbo.fn_CleanUp(@FooString VARCHAR(max))
RETURNS VARCHAR(max)
BEGIN
WHILE CHARINDEX('...
--
Thiago Dantas
@DantHimself
November 16, 2009 at 5:54 am
Richard Briggs (11/16/2009)
Does this simple replace not work then?
REPLACE(@SomeText, ' ',' ')
which is actually :
REPLACE(@SomeText, '[space][space]','[space]')
i.e. replace two spaces with one..
This seams to work fine for me, but I...
--
Thiago Dantas
@DantHimself
November 16, 2009 at 3:13 am
im not the one that clicks the "Import" button on the app
im the one responsible for what the "Import" button will do
the company i work for has a credit recovery...
--
Thiago Dantas
@DantHimself
November 13, 2009 at 3:17 am
SELECT
[ORD_NBR],
[1ST_NME],
[LST_NME] ,...
--
Thiago Dantas
@DantHimself
November 10, 2009 at 3:11 am
as a crappy solution, i created 5 tables with the correct amount of columns, exported 5 new files from the main table, re-imported the files to the correct tables and...
--
Thiago Dantas
@DantHimself
November 9, 2009 at 3:19 pm
by standard our app always use full dates such as
select * from table where date between '2009-01-01 00:00:00' and '2009-01-31 23:59:59'
as others said, try droping the convert and let...
--
Thiago Dantas
@DantHimself
November 9, 2009 at 2:56 pm
if DBCC inputbuffer only shows something like "exec USP_SOMETHING"
and you have some execs or other procs called from the USP you could try
SELECT TEXT
FROM MASTER..SYSPROCESSES
CROSS APPLY ::FN_GET_SQL(SQL_HANDLE)
WHERE SPID...
--
Thiago Dantas
@DantHimself
November 9, 2009 at 2:44 pm
you really should get rid of the ole automation and jump into SQLCLR, not only it will give you more liberty it might already be common ground for you.
if you...
--
Thiago Dantas
@DantHimself
November 9, 2009 at 2:36 pm
no because the subscriber (second server) would be doing the data importing and that data would need to be relayed back to the main server
--
Thiago Dantas
@DantHimself
November 9, 2009 at 1:37 pm
i think i know what your going for, you want to differentiate terminal services logins using the sql server. don't think its possible through T-SQL
--
Thiago Dantas
@DantHimself
November 9, 2009 at 9:18 am
i think the best you can get from inside sql server is the NT Username as provided from original_login()
check the sysprocesses table to see if something in there interests you
select...
--
Thiago Dantas
@DantHimself
November 9, 2009 at 8:15 am
CREATE TABLE TEMP_IMPORT (DATA VARCHAR(8000), ID INT IDENTITY(1,1) PRIMARY KEY)
GO
INSERT INTO TEMP_IMPORT
SELECT 'Id_Contacto'+CHAR(9)+'IdOperacion_SIR'+CHAR(9)+'Apellido_RazonSocial'+CHAR(9)+'Tipo_Doc'+CHAR(9)+'Nro_Doc'+CHAR(9)+'Cuil_Cuit'+CHAR(9)+'Tipo_Persona'+CHAR(9)+'Relacion'+CHAR(9)+'Sexo'+CHAR(9)+'Estado_Civil'+CHAR(9)+'Fecha_Nacimiento'+CHAR(9)+'Profesion'+CHAR(9)+'Categoria_IVA'+CHAR(9)+'Actividad'+CHAR(9)+'Caracteristica_de_la_Actividad'+CHAR(9)+'Tipo_Sociedad'+CHAR(9)+'Estado'+CHAR(9)+'Fecha_Verificacion'+CHAR(9)+'Usuario_Verificador' UNION ALL
SELECT '647247'+CHAR(9)+'2690693'+CHAR(9)+'AARAO PEREIRA DE SOUZA'+CHAR(9)+'CPF'+CHAR(9)+'62965930744'+CHAR(9)+''+CHAR(9)+'Física'+CHAR(9)+'Titular'+CHAR(9)+'2'+CHAR(9)+''+CHAR(9)+'15/06/1959'+CHAR(9)+'PROPRIETARIO DE ESTABELECIMENTO COMERCIAL'+CHAR(9)+'Sin Datos'+CHAR(9)+''+CHAR(9)+''+CHAR(9)+''+CHAR(9)+'Contatado'+CHAR(9)+''+CHAR(9)+'' UNION ALL
SELECT '647251'+CHAR(9)+'2672875'+CHAR(9)+'ABADIA BARBARA AMANCIO DE SOUSA'+CHAR(9)+'CPF'+CHAR(9)+'44689799687'+CHAR(9)+''+CHAR(9)+'Física'+CHAR(9)+'Titular'+CHAR(9)+'1'+CHAR(9)+''+CHAR(9)+'25/05/1957'+CHAR(9)+'OUTROS...
--
Thiago Dantas
@DantHimself
November 9, 2009 at 5:12 am
Viewing 15 posts - 91 through 105 (of 112 total)