Counting rows on table with TEXTIMAGE_ON

For many-columned fixed length files I created and loaded this table:

CREATE TABLE [dbo].[Fixed_Length_Text_Files](
 [Line] [text] NULL,
 [Text_File_Id] [bigint] NULL,
 [ID] [int] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [Fixed_Length_Text_Files_ID] PRIMARY KEY CLUSTERED
(
 [ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

Any way to get a row count on this table for a specific text_file_id?

Because of the text column, the result is always 0.

Thanks,

Jnana

February 17th, 2015 2:05pm

Which column are you counting? Try:

SELECT COUNT(*)
  FROM Fixed_Length_Text_Files

Free Windows Admin Tool Kit Click here and download it now
February 17th, 2015 2:21pm

Select text_file_id, count(*) cnt
from [dbo].[Fixed_Length_Text_Files]
Group by  text_file_id


February 17th, 2015 4:05pm

Select count(*) just gets 0, filtered or not.

Someone suggested Select count(1).

I'm going to try that.

Thanks,

Jnana

Free Windows Admin Tool Kit Click here and download it now
February 17th, 2015 8:24pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics