Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

PDW/SQL Scripting : Recreating values based on given intervals

$
0
0

Hi,

In my datasource I have references. But instead of having the full range I have intervals (From/To). I need in my destination to recreate the full range of references.

Ex :

Source -> From RG087TH02 To RG087TH13

Target ->

RG087TH02

RG087TH03

RG087TH04

RG087TH05

RG087TH06

RG087TH07

RG087TH08

RG087TH09

RG087TH10

RG087TH11

RG087TH12

RG087TH13

 

I have 2 issues.

The 1<sup>st</sup> is that I don’t have an exact pattern for the references. It can be of any kind. Finishing with digits (n, nn, nn, or more), finishing with non-digits (Alphabet), or worst the sequence can be anywhere in the string (Ex : RG087T01H, RG087T02H, RG087T03H, …)

My second issue is that I’m working on a PDW. Which means I can’t use most of the usual SQL functions (ex Recursive CTE, etc)

If anyone have a clue … I will be really grateful !

Regards,

Bertrand


Bertrandr


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>