Forum Replies Created

Viewing 15 posts - 1 through 15 (of 37 total)

  • RE: set a local variable

    Used this SET @SQL3 = 'INSERT INTO ' + '2009' + '.dbo.ALLFILENAMES(WHICHFILE) EXEC Master..xp_cmdShell ''' + @cmd1 + ''''

    Its working now thank you

  • RE: set a local variable

    tried using this

    declare @sql varchar(1000)

    select @sql = 'INSERT dbo.mytest SELECT 'insert sales select ''test'' '

    getting an error unclosed quoataion marks

  • RE: Need to load 4 different csv files into 4 diffrent tables using t sql in one sql can't use ssis

    Thank you , This really helped me for loading

  • RE: Need to load 4 different csv files into 4 diffrent tables using t sql in one sql can't use ssis

    The folder name and file name changes everytime

    Folder name would be - posted 2015-01-16

    Sub Folder - Hospital

    sub sub folder- HOSPFY2010

    Files -

    hosp_2010_A.CSV

    hosp_2010_R.CSV

    hosp_2010_V.CSV

    hosp_2010_D.CSV

    All file go to different tables

    like...

  • RE: Load the latest csv files from file server using t sql automatically

    Thank you for the reply

    We get the files quaterly , and delete the old files after the import as we a create a table and are kept in database...

  • RE: xml PARSING

    R:-)

  • RE: xml PARSING

    got it was using the wrong node

    SELECT

    HEADER.DATA.value('@CLM_ID', 'nvarchar(max)') AS CODE,

    LINE.DATA.value('@CLM_ID','NVARCHAR(MAX)') AS CLM_IDLine,

    DIAG.DATA.value('@CODE','DECIMAL(18,1)') as DX

    FROM @x.nodes('CLAIM/INPUT') AS INPUT(DATA)

    OUTER APPLY INPUT.DATA.nodes('HEADER') AS HEADER(DATA)

    outer APPLY HEADER.DATA.nodes('DIAG_CODES/DX') AS DIAG(DATA)

    OUTER APPLY INPUT.DATA.nodes('LINES/LINE') AS LINE(DATA)

    Thnaks...

  • RE: xml PARSING

    SELECT

    HEADER.DATA.value('@CLM_ID', 'NVARCHAR(max)') AS CODE,

    LINE.DATA.value('@CLM_ID','NVARCHAR(MAX)') AS CLM_IDLine,

    DIAG.DATA.value('@CODE','NVARCHAR(MAX)') as DX

    FROM @x.nodes('CLAIM/INPUT') AS INPUT(DATA)

    OUTER APPLY INPUT.DATA.nodes('HEADER') AS HEADER(DATA)

    OUTER APPLY INPUT.DATA.nodes('DIAG_CODES/DX') AS DIAG(DATA)

    OUTER APPLY INPUT.DATA.nodes('LINES/LINE') AS LINE(DATA)

    but still gives me DX as NUll...

  • RE: xml PARSING

    how do i get through the diag codes was working like this but shows null value

    SELECT

    HEADER.DATA.value('@CLM_ID', 'NVARCHAR(max)') AS CODE,

    LINE.DATA.value('@CLM_ID','NVARCHAR(MAX)') AS CLM_IDLine,

    DIAG.DATA.value('@DX_code','NVARCHAR(MAX)') as DX

    FROM ...

  • RE: xml PARSING

    Hi

    Got an other issue how do i get to the node Line , use d a OUTERAPPLY but the data is showing null

    SELECT

    x.item.value('@CLM_ID', 'NVARCHAR(max)') AS CODE,

    g.line.value('@CLM_ID','NVARCHAR(MAX)') as CLM_IDLine

    FROM...

  • RE: xml PARSING

    Fund the solution used this

    SELECT

    header.value('@CLM_ID', 'NVARCHAR(MAX)') as CLM_ID,

    header.value('@PROV_TYPE', 'VARCHAR(20)') as PROV_TYPE,

    header.value('@ICD_VER', 'INT') as ICD_VERSION,

    ...

  • RE: xml PARSING

    I changed it to

    SELECT

    x.item.value('@clm_id[1]', 'NVARCHAR(max)') AS CODE

    FROM @x.nodes('//INPUT/HEADER') AS x(item)

    But getting data as NULL

  • RE: excel formula function to sql server

    We have excel with 4 colums

    5 nth select columa column b

    10 5.16 ...

  • RE: exec sp error

    Now i get this error

    Msg 241, Level 16, State 1, Procedure SP_SOAC_REPORT_SUMMARY, Line 7

    Conversion failed when converting datetime from character string.

  • RE: faliover

    It says it cannot find sqlwb .

Viewing 15 posts - 1 through 15 (of 37 total)