---
title: "Discussion on \"T-SQL to print A00 to Z99 and 0A0 to 9Z9 and 00A to 99Z\" | Hashnode"
description: "Discussion on \"T-SQL to print A00 to Z99 and 0A0 to 9Z9 and 00A to 99Z\". with abc as (\nSELECT a= ascii('A')\nUNION ALL\nSELECT a=a+1 \nFROM abc WHERE a < ascii('Z')\n), \nnum\nAS\n( \nSELECT c=0 \nUNION ALL\nSELECT c=c+1 \nFROM num WHERE c < 9\n)  \nSELECT char(a) +  str(n1.c,1) +  str(n2.c,1) FROM abc cross join num n1 cross join num..."
url: "https://hashnode.com/posts/t-sql-to-print-a00-to-z99-and-0a0-to-9z9-and-00a-to-99z/60354c1abc9bf67747fdca74"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [T-SQL to print A00 to Z99 and 0A0 to 9Z9 and 00A to 99Z](https://cwizsoftware.com/t-sql-to-print-a00-to-z99-and-0a0-to-9z9-and-00a-to-99z?utm_source=hashnode&utm_medium=feed)

with abc as ( SELECT a= ascii('A') UNION ALL SELECT a=a+1 FROM abc WHERE a < ascii('Z') ), num AS ( SELECT c=0 UNION ALL SELECT c=c+1 FROM num WHERE c < 9 ) SELECT char(a) + str(n1.c,1) + str(n2.c,1) FROM abc cross join num n1 cross join num...

Feb 6, 2015 · 1 min read · cwizsoftware.com  
Read the article

-   [#sql](https://hashnode.com/tag/sql)

## Written by

[Xavier](https://hashnode.com/@xavier2021)

@xavier2021

  
[View profile](https://hashnode.com/@xavier2021)

C#

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
