Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

how to generate Record using In-DB

ADocDork
5 - Atom

Hi All!

I have a question that I could not find an answer to.

 

What is the IN-DB formula used to generate a RecordID field starting at a specific number?

 

Thanks!

5 REPLIES 5
Thableaus
17 - Castor
17 - Castor

Hi @ADocDork 

 

All In-DB functions are related to your database functions.

 

So it really depends on your database. In SQL Server, I think you can use ROW NUMBER or RANK.


Cheers,

ADocDork
5 - Atom

This would be in SQL Server

ADocDork
5 - Atom

Thanks! what would the actual formula be in SQL server to start at lets say 10000 and generate a recordID

Also- I need a straight RecordID not a rank

Thableaus
17 - Castor
17 - Castor

@ADocDork 

 

ROW_NUMBER() OVER(ORDER BY [Field]) + 9999

 

Try something like this.

 

[Field] being the field you have your dataset sorted by.

 

I can't test it here right now, but at least this is the idea.


Cheers,

ADocDork
5 - Atom

You Sir,

 

Rock.

 

Thank you so much

Labels
Top Solution Authors