Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
srinivasdasari
Starting Member
1 Post |
Posted - 2010-09-18 : 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: EDI20100918A00001same like up to EDI20100918A00100condition 1:if their is no data in my table.condition 2:if their is some data based on today date like EDI20100918A001 to EDI20100918A00100take the max column from table and generate the data from that column.I mean EDI20100918A00101 - EDI20100918A00200 How to generate Through Query..Plz help me..Regardsvasucnuvas |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|