Showing posts with label type. Show all posts
Showing posts with label type. Show all posts

Monday, March 26, 2012

How to apply For loop here

Problem Description:

I have 5 fields in my report.
4 string type and 1 Date.
4 String type are : Unit , Periods , Grade and Demand
and 1 is Date

I would like to apply a loop which eventually sum up the value of the last field.
Before I explain it furthur I would like to add that all the string type has
multiple value in it.

Description :

I would like sum up Demand for each Grade per period per Unit.

For Example

Unit 1
Date ( monthly)1
Grade 1
Period 1 Total Demand
Period 2 Total Demand
Period 3 Total Demand

Date2
Grade 2
Period 1 Total Demand
Period 2 Total Demand
Period 3 Total Demand

I think this involves couple of For loops , Sorry but not familier with
Syntax that much.

Thanks

AbhisarDo you want to sum the field Demand which is of String type?|||Yes ,
I want to sum field demand. of string type.
so it looks like.

For loop unit ...select one unit in that string array.
then Start for loop to select the date from the Date array ( which in monthly format)
Then for loop to select the grade (string array)....
and then for each period( 3 in it ) it will show me total demand..

The actual data looks like...

Unit date grade period demand
------------------
ew 333 rrr Day 44
ew 333 rrr Eve 55
ew 333 rrr Night 22
...
...
...
ew 645 rrr Day 43
ew 645 rrr Eve 33
ew 645 rrr Night 21

Like wise
diff date .....

I would like to see

for
unit (ew) date(333) for grade(rrr)
on period (Day) total demand
(Eve) total demand
(Night) Total demand

because there are lot of person works on the same date, same unit, same grade
same three period but different demand.
I want to sum up all the demand and write a summary.

I hope I am able to explain my problem to all of u this time.

Thanks|||You can try this in the formula

numbervar eveCount;
numbervar DayCount;
whilePringtingRecords;
if {period}="Day"
DayCount:=DayCount+tonumber({Demand})
else if {period}="Eve"
EveCount:=EveCount+tonumber({Demand});|||Sorry Guys bot not working at all.

Ok , Let me reframe it to one more example.

there are 5 fields , the values in 4 of the fields are not changing at all , only in the 5th field is changing.
For example

1st field 2nd Field 3rd Field 4rth Field 5th Field

xxx rrrr tttt cccc 33
xxx rrrr tttt cccc 44
xxx rrrr tttt cccc 55

I just want to see

xxx rrrr tttt cccc 132 (total)

just in one line.

any ideas now.

Thanks|||If so, then why dont you try to write a query

Select field1,field2,field3,field4,sum(convert(numeric,field5)) from table group by
field1,field2,field3,field4
and design the report using this query

How to append a header row in SELECT

Hi All,

When calling my SELECT statement, I would like to have Column name and Data type as the first record. Is this possible to do?
I would like to make a SP that would select all data from any table(with a header row) with just:

_sp_getData ' table_name'

I looked at sysobjects, and syscolumns tables, but was unable to put it all together. I have over 200+ tables, so creating variables for every column is very cumbersome.

Something like this:


select 0 AS SortCol ,
cast(min(case ordinal_position when 1 then column_name end) as varchar) as col1,
cast(min(case ordinal_position when 2 then column_name end) as varchar) as col2,
cast(min(case ordinal_position when 3 then column_name end) as varchar) as col3,
cast(min(case ordinal_position when 4 then column_name end) as varchar) as col4,
cast(min(case ordinal_position when 5 then column_name end) as varchar) as col5,
cast(min(case ordinal_position when 6 then column_name end) as varchar) as col6,
cast(min(case ordinal_position when 7 then column_name end) as varchar) as col7,
cast(min(case ordinal_position when 8 then column_name end) as varchar) as col8,
cast(min(case ordinal_position when 9 then column_name end) as varchar) as col9
from information_schema.columns where table_name = 'authors'
union all
select 1 , au_id, au_lname, au_fname, phone, address, city, state, zip,
cast(contract as varchar)
from authors


Is not an option.

Thank you very much in advance,
Vla OrlovskyJust an advice: do not do it. THis is not SQL. You add an additional non-data row int data. VERY bad style.

Especially as you then go on and say the one way to do it (union) is not an option.|||Hi Tom,

Thanks for reply.

In my case, I just want to export data into a VB RecordSet and into a CSV text file.
My co-workers want to have the data to be imported into other places.
I just want to create a simple GUI that allows them to get the data without involving me.

Sincerely,
Vlad Orlovsky|||So what?

Before exposrint to a CSV file, write the first line with the names of the columns.

Interesting enough, the information is in the VB recordset.|||If I understand correctly, before you output the actual data to CSV, you can just loop through the fields collection on the first row of your recordset and output the Name and Type property like below:

For intCounter = 0 To oRS.Fields.Count - 1
strName = oRS.Fields(intCounter).Name
strType = oRS.Fields(intCounter).Type
Next|||Hi,

I wanted to get the data the most fastest way posible.(with very little IIS processing)

Sincerely,
Vlad Orlovsky

Friday, March 23, 2012

How to alter the data type of a field

I want to change the filed type form nvarchar(5) to varchar(10)
There is no need to reserve the data in the filed.
How can I do with SQL command?
Use the ALTER TABLE command:
ALTER TABLE my_table
ALTER COLUMN my_column varchar(10)
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"ad" <flying@.wfes.tcc.edu.tw> wrote in message
news:umBJWlAGHHA.4652@.TK2MSFTNGP04.phx.gbl...
>I want to change the filed type form nvarchar(5) to varchar(10)
> There is no need to reserve the data in the filed.
> How can I do with SQL command?
>
|||Thank,
Can I determinate if the data type varchar before ater it.
Like
if type(my_table.my_column) <>varchar(10)
ALTER TABLE my_table ALTER COLUMN my_column varchar(10)
"Kalen Delaney" <replies@.public_newsgroups.com> glsD:O30DznAGHHA.2128@.TK2MSFTNGP03.phx.g bl...
> Use the ALTER TABLE command:
> ALTER TABLE my_table
> ALTER COLUMN my_column varchar(10)
> --
> HTH
> Kalen Delaney, SQL Server MVP
> http://sqlblog.com
>
> "ad" <flying@.wfes.tcc.edu.tw> wrote in message
> news:umBJWlAGHHA.4652@.TK2MSFTNGP04.phx.gbl...
>
|||What version?
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"ad" <flying@.wfes.tcc.edu.tw> wrote in message
news:OD2cMPBGHHA.5104@.TK2MSFTNGP03.phx.gbl...
> Thank,
> Can I determinate if the data type varchar before ater it.
> Like
> if type(my_table.my_column) <>varchar(10)
> ALTER TABLE my_table ALTER COLUMN my_column varchar(10)
>
>
> "Kalen Delaney" <replies@.public_newsgroups.com>
> glsD:O30DznAGHHA.2128@.TK2MSFTNGP03.phx.g bl...
>
|||my version is SQLServer 2005 Express
"Kalen Delaney" <replies@.public_newsgroups.com> glsD:ORvLXDCGHHA.4804@.TK2MSFTNGP03.phx.g bl...
> What version?
> --
> HTH
> Kalen Delaney, SQL Server MVP
> http://sqlblog.com
>
> "ad" <flying@.wfes.tcc.edu.tw> wrote in message
> news:OD2cMPBGHHA.5104@.TK2MSFTNGP03.phx.gbl...
>
|||This query returns all the datatypes and lengths for columns in a given
table. You should be able to figure out how to write your IF statement from
this information:
SELECT object_name(object_id) as [object_name], c.name as column_name,
t.name as type_name, c.max_length
FROM sys.types t join sys.columns c
ON t.user_type_id = c.system_type_id
WHERE object_name(object_id) = 'my_table'
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"ad" <flying@.wfes.tcc.edu.tw> wrote in message
news:eoktgyCGHHA.2456@.TK2MSFTNGP06.phx.gbl...
> my version is SQLServer 2005 Express
> "Kalen Delaney" <replies@.public_newsgroups.com>
> glsD:ORvLXDCGHHA.4804@.TK2MSFTNGP03.phx.g bl...
>

How to alter the data type of a field

I want to change the filed type form nvarchar(5) to varchar(10)
There is no need to reserve the data in the filed.
How can I do with SQL command?Use the ALTER TABLE command:
ALTER TABLE my_table
ALTER COLUMN my_column varchar(10)
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"ad" <flying@.wfes.tcc.edu.tw> wrote in message
news:umBJWlAGHHA.4652@.TK2MSFTNGP04.phx.gbl...
>I want to change the filed type form nvarchar(5) to varchar(10)
> There is no need to reserve the data in the filed.
> How can I do with SQL command?
>|||Thank,
Can I determinate if the data type varchar before ater it.
Like
if type(my_table.my_column) <>varchar(10)
ALTER TABLE my_table ALTER COLUMN my_column varchar(10)
"Kalen Delaney" <replies@.public_newsgroups.com> glsD:O30DznAGHHA.2128@.TK2MSFTNGP03
.phx.gbl...
> Use the ALTER TABLE command:
> ALTER TABLE my_table
> ALTER COLUMN my_column varchar(10)
> --
> HTH
> Kalen Delaney, SQL Server MVP
> http://sqlblog.com
>
> "ad" <flying@.wfes.tcc.edu.tw> wrote in message
> news:umBJWlAGHHA.4652@.TK2MSFTNGP04.phx.gbl...
>|||What version?
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"ad" <flying@.wfes.tcc.edu.tw> wrote in message
news:OD2cMPBGHHA.5104@.TK2MSFTNGP03.phx.gbl...
> Thank,
> Can I determinate if the data type varchar before ater it.
> Like
> if type(my_table.my_column) <>varchar(10)
> ALTER TABLE my_table ALTER COLUMN my_column varchar(10)
>
>
> "Kalen Delaney" <replies@.public_newsgroups.com>
> glsD:O30DznAGHHA.2128@.TK2MSFTNGP03.phx.gbl...
>|||my version is SQLServer 2005 Express
"Kalen Delaney" <replies@.public_newsgroups.com> glsD:ORvLXDCGHHA.4804@.TK2MSFTNGP03
.phx.gbl...
> What version?
> --
> HTH
> Kalen Delaney, SQL Server MVP
> http://sqlblog.com
>
> "ad" <flying@.wfes.tcc.edu.tw> wrote in message
> news:OD2cMPBGHHA.5104@.TK2MSFTNGP03.phx.gbl...
>|||This query returns all the datatypes and lengths for columns in a given
table. You should be able to figure out how to write your IF statement from
this information:
SELECT object_name(object_id) as [object_name], c.name as column_name,
t.name as type_name, c.max_length
FROM sys.types t join sys.columns c
ON t.user_type_id = c.system_type_id
WHERE object_name(object_id) = 'my_table'
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"ad" <flying@.wfes.tcc.edu.tw> wrote in message
news:eoktgyCGHHA.2456@.TK2MSFTNGP06.phx.gbl...
> my version is SQLServer 2005 Express
> "Kalen Delaney" <replies@.public_newsgroups.com>
> glsD:ORvLXDCGHHA.4804@.TK2MSFTNGP03.phx.gbl...
>

How to alter the data type of a field

I want to change the filed type form nvarchar(5) to varchar(10)
There is no need to reserve the data in the filed.
How can I do with SQL command?Use the ALTER TABLE command:
ALTER TABLE my_table
ALTER COLUMN my_column varchar(10)
--
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"ad" <flying@.wfes.tcc.edu.tw> wrote in message
news:umBJWlAGHHA.4652@.TK2MSFTNGP04.phx.gbl...
>I want to change the filed type form nvarchar(5) to varchar(10)
> There is no need to reserve the data in the filed.
> How can I do with SQL command?
>|||Thank,
Can I determinate if the data type varchar before ater it.
Like
if type(my_table.my_column) <>varchar(10)
ALTER TABLE my_table ALTER COLUMN my_column varchar(10)
"Kalen Delaney" <replies@.public_newsgroups.com> ¼¶¼g©ó¶l¥ó·s»D:O30DznAGHHA.2128@.TK2MSFTNGP03.phx.gbl...
> Use the ALTER TABLE command:
> ALTER TABLE my_table
> ALTER COLUMN my_column varchar(10)
> --
> HTH
> Kalen Delaney, SQL Server MVP
> http://sqlblog.com
>
> "ad" <flying@.wfes.tcc.edu.tw> wrote in message
> news:umBJWlAGHHA.4652@.TK2MSFTNGP04.phx.gbl...
>>I want to change the filed type form nvarchar(5) to varchar(10)
>> There is no need to reserve the data in the filed.
>> How can I do with SQL command?
>|||What version?
--
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"ad" <flying@.wfes.tcc.edu.tw> wrote in message
news:OD2cMPBGHHA.5104@.TK2MSFTNGP03.phx.gbl...
> Thank,
> Can I determinate if the data type varchar before ater it.
> Like
> if type(my_table.my_column) <>varchar(10)
> ALTER TABLE my_table ALTER COLUMN my_column varchar(10)
>
>
> "Kalen Delaney" <replies@.public_newsgroups.com>
> ¼¶¼g©ó¶l¥ó·s»D:O30DznAGHHA.2128@.TK2MSFTNGP03.phx.gbl...
>> Use the ALTER TABLE command:
>> ALTER TABLE my_table
>> ALTER COLUMN my_column varchar(10)
>> --
>> HTH
>> Kalen Delaney, SQL Server MVP
>> http://sqlblog.com
>>
>> "ad" <flying@.wfes.tcc.edu.tw> wrote in message
>> news:umBJWlAGHHA.4652@.TK2MSFTNGP04.phx.gbl...
>>I want to change the filed type form nvarchar(5) to varchar(10)
>> There is no need to reserve the data in the filed.
>> How can I do with SQL command?
>>
>|||my version is SQLServer 2005 Express
"Kalen Delaney" <replies@.public_newsgroups.com> ¼¶¼g©ó¶l¥ó·s»D:ORvLXDCGHHA.4804@.TK2MSFTNGP03.phx.gbl...
> What version?
> --
> HTH
> Kalen Delaney, SQL Server MVP
> http://sqlblog.com
>
> "ad" <flying@.wfes.tcc.edu.tw> wrote in message
> news:OD2cMPBGHHA.5104@.TK2MSFTNGP03.phx.gbl...
>> Thank,
>> Can I determinate if the data type varchar before ater it.
>> Like
>> if type(my_table.my_column) <>varchar(10)
>> ALTER TABLE my_table ALTER COLUMN my_column varchar(10)
>>
>>
>> "Kalen Delaney" <replies@.public_newsgroups.com> ¼¶¼g©ó¶l¥ó·s»D:O30DznAGHHA.2128@.TK2MSFTNGP03.phx.gbl...
>> Use the ALTER TABLE command:
>> ALTER TABLE my_table
>> ALTER COLUMN my_column varchar(10)
>> --
>> HTH
>> Kalen Delaney, SQL Server MVP
>> http://sqlblog.com
>>
>> "ad" <flying@.wfes.tcc.edu.tw> wrote in message
>> news:umBJWlAGHHA.4652@.TK2MSFTNGP04.phx.gbl...
>>I want to change the filed type form nvarchar(5) to varchar(10)
>> There is no need to reserve the data in the filed.
>> How can I do with SQL command?
>>
>>
>|||This query returns all the datatypes and lengths for columns in a given
table. You should be able to figure out how to write your IF statement from
this information:
SELECT object_name(object_id) as [object_name], c.name as column_name,
t.name as type_name, c.max_length
FROM sys.types t join sys.columns c
ON t.user_type_id = c.system_type_id
WHERE object_name(object_id) = 'my_table'
--
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"ad" <flying@.wfes.tcc.edu.tw> wrote in message
news:eoktgyCGHHA.2456@.TK2MSFTNGP06.phx.gbl...
> my version is SQLServer 2005 Express
> "Kalen Delaney" <replies@.public_newsgroups.com>
> ¼¶¼g©ó¶l¥ó·s»D:ORvLXDCGHHA.4804@.TK2MSFTNGP03.phx.gbl...
>> What version?
>> --
>> HTH
>> Kalen Delaney, SQL Server MVP
>> http://sqlblog.com
>>
>> "ad" <flying@.wfes.tcc.edu.tw> wrote in message
>> news:OD2cMPBGHHA.5104@.TK2MSFTNGP03.phx.gbl...
>> Thank,
>> Can I determinate if the data type varchar before ater it.
>> Like
>> if type(my_table.my_column) <>varchar(10)
>> ALTER TABLE my_table ALTER COLUMN my_column varchar(10)
>>
>>
>> "Kalen Delaney" <replies@.public_newsgroups.com>
>> ¼¶¼g©ó¶l¥ó·s»D:O30DznAGHHA.2128@.TK2MSFTNGP03.phx.gbl...
>> Use the ALTER TABLE command:
>> ALTER TABLE my_table
>> ALTER COLUMN my_column varchar(10)
>> --
>> HTH
>> Kalen Delaney, SQL Server MVP
>> http://sqlblog.com
>>
>> "ad" <flying@.wfes.tcc.edu.tw> wrote in message
>> news:umBJWlAGHHA.4652@.TK2MSFTNGP04.phx.gbl...
>>I want to change the filed type form nvarchar(5) to varchar(10)
>> There is no need to reserve the data in the filed.
>> How can I do with SQL command?
>>
>>
>>
>

How to alter an used alias type?

If I created an alias type as followed,
CREATE TYPE SSN
FROM varchar(11) NOT NULL
For some reasons, I would like to modify this alias type to varchar(20) not
null,
How to do it?
--Frank, using SQL2005devYou can to drop it and re-create it. But you cannot drop it as long as it is
being used, so...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Frank Lee" <Reply@.to.newsgroup> wrote in message news:OI8c$X$LGHA.140@.TK2MSFTNGP12.phx.gbl
..
> If I created an alias type as followed,
> CREATE TYPE SSN
> FROM varchar(11) NOT NULL
> For some reasons, I would like to modify this alias type to varchar(20) no
t
> null,
> How to do it?
> --Frank, using SQL2005dev
>|||Frank Lee (Reply@.to.newsgroup) writes:
> If I created an alias type as followed,
> CREATE TYPE SSN
> FROM varchar(11) NOT NULL
> For some reasons, I would like to modify this alias type to varchar(20)
> not null,
> How to do it?
That's a bit of work! Rename the type (sp_rename), create the new
definition. Run ALTER TABLE ALTER COLUMN on all tables that uses
the type, and recreate all procedures that uses the type as a parameter.
Finally you can drop the old definition.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||"Erland Sommarskog" <esquel@.sommarskog.se>
'?:Xns9769A5B38E43Yazorman@.127.0.0.1...
> Frank Lee (Reply@.to.newsgroup) writes:
> That's a bit of work! Rename the type (sp_rename), create the new
> definition. Run ALTER TABLE ALTER COLUMN on all tables that uses
> the type, and recreate all procedures that uses the type as a parameter.
> Finally you can drop the old definition.
>
Oh My god!
I would like to use alias type because I thought that if one day I want to
alter the difinition of alias type, it would be more easy as it has central
difinition. However, it's not really. It's more complex. :-(
Anyway, if it's the only way to alter the used alias type, I accept.
--Frank|||Frank Lee (Reply@.to.newsgroup) writes:
> I would like to use alias type because I thought that if one day I want
> to alter the difinition of alias type, it would be more easy as it has
> central difinition. However, it's not really. It's more complex. :-(
And it's maybe just as well. For a small database with little data in it
a single ALTER TYPE may be harmless. But for a widely used type in a 1TB
database it could send the database offline for a w.
Changing table schema in a large database requires careful planning, and
even more so if you change a type.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||"Erland Sommarskog" <esquel@.sommarskog.se>
'?:Xns97695FE4BC283Yazorman@.127.0.0.1...
> And it's maybe just as well. For a small database with little data in it
> a single ALTER TYPE may be harmless. But for a widely used type in a 1TB
> database it could send the database offline for a w.
> Changing table schema in a large database requires careful planning, and
> even more so if you change a type.
>
Ya, you are right.sql

Wednesday, March 21, 2012

How to add Total to Matrx Column/Row

Hi there,
I have a report with 2 column groupings and 5 row groupings looks like
this:
+Unit
+Time
+Type +Sub_Type +Start +Result +Orig SUM(!Field1.Value)
I want to add "Total" to every column and every row and final total
like this:
+Unit
+Time
+Type +Sub_Type +Start +Result +Orig SUM(!Fieldxx) Total_of_Row
Total_of_Column Total
How can I add a column at the right end and a row at the bottom? What
kind of expression should I use?
Thanks a lot.
HenryHenry,
I'm not sure how far along you are but I found out how to add Row & column
subtotals by accident. In Layout mode, right click your "Row" or "Coumn"
field and select SubTotal. THe problem I am experiencing is you have very
limited control over the style. ie wanting the subtotals to be bolded.
Hope this helps - Glen
"Henry" wrote:
> Hi there,
> I have a report with 2 column groupings and 5 row groupings looks like
> this:
> +Unit
> +Time
> +Type +Sub_Type +Start +Result +Orig SUM(!Field1.Value)
> I want to add "Total" to every column and every row and final total
> like this:
> +Unit
> +Time
> +Type +Sub_Type +Start +Result +Orig SUM(!Fieldxx) Total_of_Row
> Total_of_Column Total
> How can I add a column at the right end and a row at the bottom? What
> kind of expression should I use?
> Thanks a lot.
> Henry
>|||It works well, Thanks a lot.
Henry
"Glen" <Glen@.discussions.microsoft.com> wrote in message news:<27B4E130-0C08-49DA-82B2-8E94B66B0216@.microsoft.com>...
> Henry,
> I'm not sure how far along you are but I found out how to add Row & column
> subtotals by accident. In Layout mode, right click your "Row" or "Coumn"
> field and select SubTotal. THe problem I am experiencing is you have very
> limited control over the style. ie wanting the subtotals to be bolded.
> Hope this helps - Glen
> "Henry" wrote:
> > Hi there,
> >
> > I have a report with 2 column groupings and 5 row groupings looks like
> > this:
> >
> > +Unit
> > +Time
> > +Type +Sub_Type +Start +Result +Orig SUM(!Field1.Value)
> >
> > I want to add "Total" to every column and every row and final total
> > like this:
> >
> > +Unit
> > +Time
> > +Type +Sub_Type +Start +Result +Orig SUM(!Fieldxx) Total_of_Row
> > Total_of_Column Total
> >
> > How can I add a column at the right end and a row at the bottom? What
> > kind of expression should I use?
> > Thanks a lot.
> >
> > Henry
> >

Monday, March 19, 2012

How to add strings to NTEXT data type

Hi, All,
First of all thanks for reading my post. I’m trying to figure out how to
add strings to a NTEXT data type column.
TABLE (
NoteID VARCHAR(10) PRIMARY KEY,
NoteOppID VARCHAR(10) FOREIGN KEY,
NoteDetails VARCHAR(1000)
)
I need to take all NoteDetails in the above table and group by NoteOppID and
insert them into a single NTEXT field…
i.e)
NoteOppID NoteDetails (VARCHAR)
----
Opp123 Matt please send this customer a prototype
Opp123 Customer wants to see the G Series
Opp123 John, I send customer prototype I'll get back to
you on their response.
Opp456 Customer is not satisfied with the 12000 Series
components.
Opp456 John - Please give me your thoughts on this
-- End result should look like
OppId Details (NTEXT)
----
Opp123 Matt please send this customer a prototype
[New Line]
Customer wants to see the MIR 900 Series
[New Line]
John, I send customer prototype I'll get back to
you on their response.
Opp456 Customer is not satisfied with the 12000 Series
Components
[New Line]
John - Please give me your thoughts on this
I cannot leave it at VARCHAR because I'll go over the 8kb constraint.
I’ve tried…
SELECT [NTEXT] + VARCHAR -- Errors
SELECT SUBSTRING([NTEXT], 0, DATALEN([NTEXT]) + VARCHAR – works but
potentially [NTEXT] will be larger than the 8kb constraint.
Thanks,
-NeilAphex3000 (Aphex3000@.discussions.microsoft.com) writes:
> First of all thanks for reading my post. I'm trying to figure out how to
> add strings to a NTEXT data type column.
You will most likely need to use WRITETEXT and UPDATETEXT. Please look
these up in Books Online.
(Or you upgrade to SQL 2005 where you can use nvarchar(MAX) instead
which is a lot easier to deal with.)
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Monday, March 12, 2012

How to add printer icon and print the report itself

Hi there,
Is there any way to add printer icon besides refresh and help icons in
Report manager?
If not exporting to any other type file, how can we print the report
itself in Report Manager when the report has more than one page? Right
now it looks like screen print when the report is bigger than one
page.
Thanks.
HenryUntil SP2 your only choice is to export to pdf and print. There are other
options is you have your own application and integrate with RS using URL
integration or web services but if you are using the portal that ships with
RS (report manager) there is nothing you can do. With SP2 they will be
shipping support for client printing (Yeah!!)
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Henry" <fanh@.tycoelectronics.com> wrote in message
news:d2a411ae.0411011251.2e423030@.posting.google.com...
> Hi there,
> Is there any way to add printer icon besides refresh and help icons in
> Report manager?
> If not exporting to any other type file, how can we print the report
> itself in Report Manager when the report has more than one page? Right
> now it looks like screen print when the report is bigger than one
> page.
> Thanks.
> Henry|||The answer everyone wants is when is SP2 being released?
"Bruce L-C [MVP]" wrote:
> Until SP2 your only choice is to export to pdf and print. There are other
> options is you have your own application and integrate with RS using URL
> integration or web services but if you are using the portal that ships with
> RS (report manager) there is nothing you can do. With SP2 they will be
> shipping support for client printing (Yeah!!)
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Henry" <fanh@.tycoelectronics.com> wrote in message
> news:d2a411ae.0411011251.2e423030@.posting.google.com...
> > Hi there,
> >
> > Is there any way to add printer icon besides refresh and help icons in
> > Report manager?
> > If not exporting to any other type file, how can we print the report
> > itself in Report Manager when the report has more than one page? Right
> > now it looks like screen print when the report is bigger than one
> > page.
> > Thanks.
> >
> > Henry
>
>|||What other options are available if i have my own app integrated wirh RS
using URL access?
Rodrigo Sanchez
Netshore Programming Corp.
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> escribió en el mensaje
news:uPkGTZFwEHA.3296@.TK2MSFTNGP10.phx.gbl...
> Until SP2 your only choice is to export to pdf and print. There are other
> options is you have your own application and integrate with RS using URL
> integration or web services but if you are using the portal that ships
with
> RS (report manager) there is nothing you can do. With SP2 they will be
> shipping support for client printing (Yeah!!)
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Henry" <fanh@.tycoelectronics.com> wrote in message
> news:d2a411ae.0411011251.2e423030@.posting.google.com...
> > Hi there,
> >
> > Is there any way to add printer icon besides refresh and help icons in
> > Report manager?
> > If not exporting to any other type file, how can we print the report
> > itself in Report Manager when the report has more than one page? Right
> > now it looks like screen print when the report is bigger than one
> > page.
> > Thanks.
> >
> > Henry
>|||Search the newsgroup, there are definitely people doing this and there has
been code shared. I have not done this so I can not help you directly.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Rodrigo Sánchez" <rodrigoss@.netshoreprogramming.com> wrote in message
news:uLbLVPIwEHA.3916@.TK2MSFTNGP10.phx.gbl...
> What other options are available if i have my own app integrated wirh RS
> using URL access?
> Rodrigo Sanchez
> Netshore Programming Corp.
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> escribió en el mensaje
> news:uPkGTZFwEHA.3296@.TK2MSFTNGP10.phx.gbl...
> > Until SP2 your only choice is to export to pdf and print. There are
other
> > options is you have your own application and integrate with RS using URL
> > integration or web services but if you are using the portal that ships
> with
> > RS (report manager) there is nothing you can do. With SP2 they will be
> > shipping support for client printing (Yeah!!)
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "Henry" <fanh@.tycoelectronics.com> wrote in message
> > news:d2a411ae.0411011251.2e423030@.posting.google.com...
> > > Hi there,
> > >
> > > Is there any way to add printer icon besides refresh and help icons in
> > > Report manager?
> > > If not exporting to any other type file, how can we print the report
> > > itself in Report Manager when the report has more than one page? Right
> > > now it looks like screen print when the report is bigger than one
> > > page.
> > > Thanks.
> > >
> > > Henry
> >
> >
>|||You and me both.
I wish I knew but I don't know either.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"SAcanuck" <SAcanuck@.discussions.microsoft.com> wrote in message
news:ED1D2E1B-F3E3-4C1D-84BE-B7DABBABDF0E@.microsoft.com...
> The answer everyone wants is when is SP2 being released?
> "Bruce L-C [MVP]" wrote:
> > Until SP2 your only choice is to export to pdf and print. There are
other
> > options is you have your own application and integrate with RS using URL
> > integration or web services but if you are using the portal that ships
with
> > RS (report manager) there is nothing you can do. With SP2 they will be
> > shipping support for client printing (Yeah!!)
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "Henry" <fanh@.tycoelectronics.com> wrote in message
> > news:d2a411ae.0411011251.2e423030@.posting.google.com...
> > > Hi there,
> > >
> > > Is there any way to add printer icon besides refresh and help icons in
> > > Report manager?
> > > If not exporting to any other type file, how can we print the report
> > > itself in Report Manager when the report has more than one page? Right
> > > now it looks like screen print when the report is bigger than one
> > > page.
> > > Thanks.
> > >
> > > Henry
> >
> >
> >

How to add newline in column of type nvarchar

Hi,
I want to add a newline in a content of sql column (using t-sql and not asp.net textbox) so when content is being rendered in a .net textbox I get separate rows, so instead
col1 col2 col3
I woule like to have
col1
col2
col3
Thanks

You can use CHAR(13) to insert a carriage return into the string. e.g.

INSERT INTO MyTable (MyStringColumn) VALUES('My name is'+CHAR(13)+'Colin Mackay')
See also SQL Server Books-On-Line:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ca-co_6xte.asp
Does this help?

|||Yes, that's it, thanks

Friday, March 9, 2012

How to add document type in full - text search (ifiter)

Dear all,
I use full-text search in SQL2005, but i discover it only support some
document types (.doc \ .xls .. , select * from sys.fulltext_document_types
),i want to it also support PDF type, well then, how i can do it?
by the way. I download a ifilter from adobe website and installed. but
also can't support the pdf type.
thanks & regards
jp ye
"jp" <yjp_it@.yahoo.com.cn> wrote in message
news:3E9576E9-041E-496E-91C4-4AD1B39360CB@.microsoft.com...
> Dear all,
> I use full-text search in SQL2005, but i discover it only support some
> document types (.doc \ .xls .. , select * from sys.fulltext_document_types
> ),i want to it also support PDF type, well then, how i can do it?
> by the way. I download a ifilter from adobe website and installed. but
> also can't support the pdf type.
You might get a faster answer if you re-post this to
microsoft.public.sqlserver.fulltext. They deal specifically with FTS
issues.

How to add document type in full - text search (ifiter)

Dear all,
I use full-text search in SQL2005, but i discover it only support some
document types (.doc \ .xls .. , select * from sys.fulltext_document_types
),i want to it also support PDF type, well then, how i can do it?
by the way. I download a ifilter from adobe website and installed. but
also can't support the pdf type.
thanks & regards
jp ye"jp" <yjp_it@.yahoo.com.cn> wrote in message
news:3E9576E9-041E-496E-91C4-4AD1B39360CB@.microsoft.com...
> Dear all,
> I use full-text search in SQL2005, but i discover it only support some
> document types (.doc \ .xls .. , select * from sys.fulltext_document_types
> ),i want to it also support PDF type, well then, how i can do it?
> by the way. I download a ifilter from adobe website and installed. but
> also can't support the pdf type.
You might get a faster answer if you re-post this to
microsoft.public.sqlserver.fulltext. They deal specifically with FTS
issues.

How to add document type in full - text search (ifiter)

Dear all,
I use full-text search in SQL2005, but i discover it only support some
document types (.doc \ .xls .. , select * from sys.fulltext_document_types
),i want to it also support PDF type, well then, how i can do it?
by the way. I download a ifilter from adobe website and installed. but
also can't support the pdf type.
--
thanks & regards
jp ye"jp" <yjp_it@.yahoo.com.cn> wrote in message
news:3E9576E9-041E-496E-91C4-4AD1B39360CB@.microsoft.com...
> Dear all,
> I use full-text search in SQL2005, but i discover it only support some
> document types (.doc \ .xls .. , select * from sys.fulltext_document_types
> ),i want to it also support PDF type, well then, how i can do it?
> by the way. I download a ifilter from adobe website and installed. but
> also can't support the pdf type.
You might get a faster answer if you re-post this to
microsoft.public.sqlserver.fulltext. They deal specifically with FTS
issues.

Wednesday, March 7, 2012

How to add an image to an SQL Server database

Hi all,

I have a field in the SQL Server database, with 'Image' ad field type.

How can I add a jpeg fiel to it so that I can view it and also access it through a program?

Thanks

Tomy

here

http://www.beansoftware.com/ASP.NET-Tutorials/Images-Database.aspx