Posted - 09/18/2010 : 01:58:16
| Hi All,
Im not much of gud in sql.My question is how to generate data based on today date from 1 - 100 based on two conditions.
I mean My Sample Query Is
-- select 'EDI' + CONVERT(nvarchar(20),getdate(),112) + 'A00001' AS DCN_NO
Output is: EDI20100918A00001
same like up to EDI20100918A00100
if their is no data in my table.
if their is some data based on today date like EDI20100918A001 to EDI20100918A00100
take the max column from table and generate the data from that column.I mean EDI20100918A00101 - EDI20100918A00200
How to generate Through Query..Plz help me..