Haidong Ji

I was a developer, working with VB, SQL Server, Access and lots of other Microsoft stuff.

I am currently a SQL Server DBA in my company in the Chicago area.

I am MCSD and MCDBA certified. In my spare time, if I have any, I like to do Linux, C and other open source project.

I can be reached at Happy_Haidong@yahoo.com

SQLServerCentral Article

Code Generation: Using SQL to Generate SQL and Other Code

SQL Server is a great platform against which to develop, but it can also be used as a code generation tool with a little creativity. Haidong Ji brings us a few techniques that can be used to automatically build T-SQL code and bcp code for importing and exporting data.

You rated this post out of 5. Change rating

2005-02-14

17,930 reads

Blogs

FIRST_VALUE vs. Min: #SQLNewBlogger

By

I had mentioned some new T-SQL functions for SQL Server 2022 and a commenter...

AI Step 1

By

As this is an Artificial Intelligence (AI) World, things are changing. We can see that...

Read the latest Blogs

Forums

Networking Devices in Ellington, CT | Legacy Technology, Inc

By shashanice662

In today’s connected world, a reliable network is the backbone of any successful business....

Cannot install development version.

By dunjoan

A while into install I get a Microsoft OLE DB Driver for SQL Server....

More Funny SELECTs

By Steve Jones - SSC Editor

Comments posted to this topic are about the item More Funny SELECTs

Visit the forum

Question of the Day

More Funny SELECTs

What does this code return?

SELECT
  ( SELECT COUNT (*), MAX(soh.OrderDate) AS latestorder
    FROM Sales.SalesOrderHeader AS soh
    WHERE
      soh.OrderDate     > '01/01/2011'
      AND soh.OrderDate < '01/01/2012') AS OrdersIn2000
, ( SELECT COUNT (*), MAX(soh.OrderDate) AS latestorder
    FROM Sales.SalesOrderHeader AS soh
    WHERE
      soh.OrderDate     > '01/01/2012'
      AND soh.OrderDate < '01/01/2013') AS OrdersIn2001
, ( SELECT COUNT (*), MAX(soh.OrderDate) AS latestorder
    FROM Sales.SalesOrderHeader AS soh
    WHERE
      soh.OrderDate     > '01/01/2013'
      AND soh.OrderDate < '01/01/2014') AS OrdersIn2002;
GO

See possible answers