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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Replace specific characters in an entire table

Author  Topic 

ianfrater
Starting Member

6 Posts

Posted - 2010-01-29 : 07:01:38
Hi,

I have an issue where I want to loop through a table and remove every 0 (zero) to make the output more readable for the user.

Name Shift 01-04-2010 02-04-2010 03-04-2010 (Con't to year end)
Ian Ext 0 0 1
Dave Con 0 0 0
Paul Con 0 1 0
(70 rows)


The Table is essentially a shop floor leave calendar with just over 365 columns and 70 rows, the table is generated by a crosstab function in a stored Porcedure every time the calendar is viewed the stored procedure drops and creates the table view new data.


Many Thanks
Ian

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-01-29 : 07:36:05
If there is a front end application to show the content of your table then do a format from 0 to whatever you want to display in that front end.
If that is not possible then we need to see:
table structure (with data types)
the stored procedure


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

ianfrater
Starting Member

6 Posts

Posted - 2010-01-29 : 07:57:37
quote:
Originally posted by webfred

If there is a front end application to show the content of your table then do a format from 0 to whatever you want to display in that front end.
If that is not possible then we need to see:
table structure (with data types)
the stored procedure


No, you're never too old to Yak'n'Roll if you're too young to die.



Thanks for the reply.

I tried to output to an access report and also excel but hit limitaions on the column counts

The SP is a monster I downloaded from http://www.simple-talk.com/code/CrossTab/sys_CrossTab.txt

the calc fields (0 & 1) are integer, 1 indcates the day is booked as leave.

Ian

Go to Top of Page
   

- Advertisement -