Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding the length of the data field on a SQL table

Status
Not open for further replies.

sivi

IS-IT--Management
Nov 27, 2002
27
GB
I am trying to find the lenth of the data field from within a query rather than using the design time literal value of the field length.

a.datafield1+replicate('0',4-len(a.datafield2))+a.datafield2

Here I have used the literal value '4'.

I would be grateful if someone could help me to get this value using an SQL function or something similar. Because this field length could be changed in the future.

Many thanks in advance

Sivi

 
Terry

Thanks for your help.

I hope to get it working.

Sivi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top