Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. apply xsl on xml to generate sql

apply xsl on xml to generate sql

Scheduled Pinned Locked Moved XML / XSL
xmldatabase
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AndieDu
    wrote on last edited by
    #1

    Hi All, I have this XML files here: CCCRM Adrian 2008-09-15 2008-09-15 2008-09-21 2008-09-15 14:10:00 15:44:00 16:44:00 22:50:00 And I applied this XSL: Declare @TimeCardID int set @TimeCardID = exec spCreateTimeCard ' ', ' ' exec spCreateTimeCardSession @TimeCardID, ' ', ' ' It generate this sql statement: Declare @TimeCardID int set @TimeCardID = exec spCreateTimeCard '2008-09-15', 'Adrian' exec spCreateTimeCardSession @TimeCardID, ' 14:10:00', '15:44:00' exec spCreateTimeCardSession @TimeCardID, '16:44:00', '22:50:00' but this is not what i want, is there a way that i can generate this statement like this: Declare @TimeCardID int set @TimeCardID = exec spCreateTimeCard '2008-09-15', 'Adrian' exec spCreateTimeCardSession @TimeCardID, '14:10:00', '15:44:00' exec spCreateTimeCardSession @TimeCardID, '16:44:00', '22:50:00' Thanks in advance

    A 1 Reply Last reply
    0
    • A AndieDu

      Hi All, I have this XML files here: CCCRM Adrian 2008-09-15 2008-09-15 2008-09-21 2008-09-15 14:10:00 15:44:00 16:44:00 22:50:00 And I applied this XSL: Declare @TimeCardID int set @TimeCardID = exec spCreateTimeCard ' ', ' ' exec spCreateTimeCardSession @TimeCardID, ' ', ' ' It generate this sql statement: Declare @TimeCardID int set @TimeCardID = exec spCreateTimeCard '2008-09-15', 'Adrian' exec spCreateTimeCardSession @TimeCardID, ' 14:10:00', '15:44:00' exec spCreateTimeCardSession @TimeCardID, '16:44:00', '22:50:00' but this is not what i want, is there a way that i can generate this statement like this: Declare @TimeCardID int set @TimeCardID = exec spCreateTimeCard '2008-09-15', 'Adrian' exec spCreateTimeCardSession @TimeCardID, '14:10:00', '15:44:00' exec spCreateTimeCardSession @TimeCardID, '16:44:00', '22:50:00' Thanks in advance

      A Offline
      A Offline
      AndieDu
      wrote on last edited by
      #2

      don't worry folks, i fixed by myself. just have to put tags like this: exec spCreateTimeCardSession @TimeCardID, '

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups