Friday, March 30, 2012
Saving Time in 12 hour format
By default in SQL Server, when I store a time in an Datetime field, it
stores in 24 hour format. but I want to store in 12 hours format with AM/PM
also being stored.
Can anyone help me in this.
Thanks & Regards
Sudhakara.T.P.Its is not important how the data is stored in the database. all that
metters is how u retreive the data.
if u want to retrive with AM and PM format: u can use
CONVERT(varchar(20), getdate(), 100)
please let me know if u have any questions
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.SQLResource.com/
---
"Sudhakara.T.P." wrote:
> Hi,
> By default in SQL Server, when I store a time in an Datetime field, it
> stores in 24 hour format. but I want to store in 12 hours format with AM/P
M
> also being stored.
> Can anyone help me in this.
> Thanks & Regards
> Sudhakara.T.P.|||Hi,
I am very much aware of the fact of retreiving the records in the format
that I want, but I am very much interested in storing the time data in 12
hour format itself as this is one of my prime requirement.
"Chandra" wrote:
> Its is not important how the data is stored in the database. all that
> metters is how u retreive the data.
> if u want to retrive with AM and PM format: u can use
> CONVERT(varchar(20), getdate(), 100)
> please let me know if u have any questions
>
> --
> best Regards,
> Chandra
> http://chanduas.blogspot.com/
> http://www.SQLResource.com/
> ---
>
> "Sudhakara.T.P." wrote:
>|||SQL Server does not store datetime values in any user specified format,
but in an internal format.
So showing the AM/PM is basically a formatting issue.
You can use the CONVERT function to do the same.
Have a look at
http://www.karaszi.com/sqlserver/info_datetime.asp
Roji. P. Thomas
Net Asset Management
http://toponewithties.blogspot.com
"Sudhakara.T.P." <SudhakaraTP@.discussions.microsoft.com> wrote in message
news:BB0D056C-CA8C-4D59-9B97-EDB5B3CBE88E@.microsoft.com...
> Hi,
> By default in SQL Server, when I store a time in an Datetime field, it
> stores in 24 hour format. but I want to store in 12 hours format with
> AM/PM
> also being stored.
> Can anyone help me in this.
> Thanks & Regards
> Sudhakara.T.P.|||then create a varchar field for this instead of datetime field. hope this
can solve the purpose.
may i know the prime reason behind storing as that format. probably i can
give u a suggestion
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.SQLResource.com/
---
"Sudhakara.T.P." wrote:
> Hi,
> I am very much aware of the fact of retreiving the records in the format
> that I want, but I am very much interested in storing the time data in 12
> hour format itself as this is one of my prime requirement.
> "Chandra" wrote:
>|||Hi Chandra,
thanks for the reply.
Well for one of the project that we are developing for the client, it is his
prime requirement to see the datetime record saved in the database in 12 hou
r
format as the db administrator is the client himself and he needs to open th
e
database and check the records frequently for some of his purposes[which he
has not revealed the reason].
I am freelance programmer and this is his first requirement/condition in the
project.
Regards
Sudhakara.T.P.|||then for this purpose, i prefer using a view and those who want to check can
use a view instead of referrig directly to a table
pleas let me know if u have any questions
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.SQLResource.com/
---
"Sudhakara.T.P." wrote:
> Hi Chandra,
> thanks for the reply.
> Well for one of the project that we are developing for the client, it is h
is
> prime requirement to see the datetime record saved in the database in 12 h
our
> format as the db administrator is the client himself and he needs to open
the
> database and check the records frequently for some of his purposes[which h
e
> has not revealed the reason].
> I am freelance programmer and this is his first requirement/condition in t
he
> project.
> Regards
> Sudhakara.T.P.|||>> By default in SQL Server, when I store a time in an Datetime field [sic], it s
tores in 24 hour format. but I want to store in 12 hours format with AM/PM a
lso being stored. <<
Take your hands off the keyboard. Step away from the database. You
are dangerously ignorant.
Let's get back to the basics of an RDBMS. Rows are not records; fields
are not columns; tables are not files. One of the *many* differences in
a field and column is that a column has an abstract datatype and
meaning in and of itself. A field gets its meaning from the program
that reads it. This kind of question is the result of not knowing
these differences.
How a column is displayed in done in the host program and has nothing
WHATSOEVER to do with the internal format in the RDBMS. In the case of
T-SQL, it is a "floating point number" that counts clock ticks. To
display it as a string, you use CONVERT() and a format parameter.
Now, if you are a good SQL programmer who respects ISO standards you
use ISO-8601 formats only to avoid data exchange problems, ambigous
dates and other problems so you would never have AM/PM times in your
front end.
Saving Time Format in SQL
I have a table in which I have a field of type datetime.
If I insert a time value through a SP, SQL adds automatically a default
date.(instead of '8:30 AM' it inserts '1/1/1900 8:30 AM')
and if I manually edit/insert a value from the result pane, the data is
'8:30 AM' as I want it.
My question is: How to save only the time in the table via SP?
Thanks in advance.
jouj.> My question is: How to save only the time in the table via SP?
Impossible in the datetime datatype. EM is fooling you and will put in date
1899-12-31 (I think) and
for some curious reason not display that date. Do a SELECT from Query Analyz
er and you will see. I
suggest you read this article to de-mystify the datetime datatypes in SQL Se
rver:
http://www.karaszi.com/SQLServer/info_datetime.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"jouj" <jouj@.discussions.microsoft.com> wrote in message
news:E8F456B7-C962-4B6F-A321-43852876E0F3@.microsoft.com...
> Dear all,
> I have a table in which I have a field of type datetime.
> If I insert a time value through a SP, SQL adds automatically a default
> date.(instead of '8:30 AM' it inserts '1/1/1900 8:30 AM')
> and if I manually edit/insert a value from the result pane, the data is
> '8:30 AM' as I want it.
> My question is: How to save only the time in the table via SP?
> Thanks in advance.
> jouj.
>|||Thank you Mr. Karaszi.
jouj
"Tibor Karaszi" wrote:
> Impossible in the datetime datatype. EM is fooling you and will put in dat
e 1899-12-31 (I think) and
> for some curious reason not display that date. Do a SELECT from Query Anal
yzer and you will see. I
> suggest you read this article to de-mystify the datetime datatypes in SQL
Server:
> http://www.karaszi.com/SQLServer/info_datetime.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "jouj" <jouj@.discussions.microsoft.com> wrote in message
> news:E8F456B7-C962-4B6F-A321-43852876E0F3@.microsoft.com...
>
Saving Time Format in SQL
I have a table in which I have a field of type datetime.
If I insert a time value through a SP, SQL adds automatically a default
date.(instead of '8:30 AM' it inserts '1/1/1900 8:30 AM')
and if I manually edit/insert a value from the result pane, the data is
'8:30 AM' as I want it.
My question is: How to save only the time in the table via SP?
Thanks in advance.
jouj.> My question is: How to save only the time in the table via SP?
Impossible in the datetime datatype. EM is fooling you and will put in date 1899-12-31 (I think) and
for some curious reason not display that date. Do a SELECT from Query Analyzer and you will see. I
suggest you read this article to de-mystify the datetime datatypes in SQL Server:
http://www.karaszi.com/SQLServer/info_datetime.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"jouj" <jouj@.discussions.microsoft.com> wrote in message
news:E8F456B7-C962-4B6F-A321-43852876E0F3@.microsoft.com...
> Dear all,
> I have a table in which I have a field of type datetime.
> If I insert a time value through a SP, SQL adds automatically a default
> date.(instead of '8:30 AM' it inserts '1/1/1900 8:30 AM')
> and if I manually edit/insert a value from the result pane, the data is
> '8:30 AM' as I want it.
> My question is: How to save only the time in the table via SP?
> Thanks in advance.
> jouj.
>|||Thank you Mr. Karaszi.
jouj
"Tibor Karaszi" wrote:
> > My question is: How to save only the time in the table via SP?
> Impossible in the datetime datatype. EM is fooling you and will put in date 1899-12-31 (I think) and
> for some curious reason not display that date. Do a SELECT from Query Analyzer and you will see. I
> suggest you read this article to de-mystify the datetime datatypes in SQL Server:
> http://www.karaszi.com/SQLServer/info_datetime.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "jouj" <jouj@.discussions.microsoft.com> wrote in message
> news:E8F456B7-C962-4B6F-A321-43852876E0F3@.microsoft.com...
> > Dear all,
> > I have a table in which I have a field of type datetime.
> > If I insert a time value through a SP, SQL adds automatically a default
> > date.(instead of '8:30 AM' it inserts '1/1/1900 8:30 AM')
> > and if I manually edit/insert a value from the result pane, the data is
> > '8:30 AM' as I want it.
> > My question is: How to save only the time in the table via SP?
> >
> > Thanks in advance.
> > jouj.
> >
>
Saving Time Format in SQL
I have a table in which I have a field of type datetime.
If I insert a time value through a SP, SQL adds automatically a default
date.(instead of '8:30 AM' it inserts '1/1/1900 8:30 AM')
and if I manually edit/insert a value from the result pane, the data is
'8:30 AM' as I want it.
My question is: How to save only the time in the table via SP?
Thanks in advance.
jouj.
> My question is: How to save only the time in the table via SP?
Impossible in the datetime datatype. EM is fooling you and will put in date 1899-12-31 (I think) and
for some curious reason not display that date. Do a SELECT from Query Analyzer and you will see. I
suggest you read this article to de-mystify the datetime datatypes in SQL Server:
http://www.karaszi.com/SQLServer/info_datetime.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"jouj" <jouj@.discussions.microsoft.com> wrote in message
news:E8F456B7-C962-4B6F-A321-43852876E0F3@.microsoft.com...
> Dear all,
> I have a table in which I have a field of type datetime.
> If I insert a time value through a SP, SQL adds automatically a default
> date.(instead of '8:30 AM' it inserts '1/1/1900 8:30 AM')
> and if I manually edit/insert a value from the result pane, the data is
> '8:30 AM' as I want it.
> My question is: How to save only the time in the table via SP?
> Thanks in advance.
> jouj.
>
|||Thank you Mr. Karaszi.
jouj
"Tibor Karaszi" wrote:
> Impossible in the datetime datatype. EM is fooling you and will put in date 1899-12-31 (I think) and
> for some curious reason not display that date. Do a SELECT from Query Analyzer and you will see. I
> suggest you read this article to de-mystify the datetime datatypes in SQL Server:
> http://www.karaszi.com/SQLServer/info_datetime.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "jouj" <jouj@.discussions.microsoft.com> wrote in message
> news:E8F456B7-C962-4B6F-A321-43852876E0F3@.microsoft.com...
>
Saving SQL 2000 Databases in SQL 7 format
I understand 2000 databases are not backward compatible
but is there any way to save 2000 databases in 7 format?
Is there an option?
Thanks
Tony
Hi,
You can set the user databases to SQL 7.0 compatible in SQL2000. You can do
that using Enterprise manager as well as Query Analyzer.
Enterprise manager:
1.Expand databases -- Right click and select properties
2. Choose option tab -- In the compatibility combo box select "Database
compatibilty level 70"
3. Click ok
Query ANalyzer:
1. Execute the below script.
EXEC sp_dbcmptlevel 'pubs', 70
Thanks
Hari
MCDBA
"Tony" <anonymous@.discussions.microsoft.com> wrote in message
news:298601c4709c$5dc1af40$a401280a@.phx.gbl...
> Hi
> I understand 2000 databases are not backward compatible
> but is there any way to save 2000 databases in 7 format?
> Is there an option?
> Thanks
> Tony
|||What exactly do you mean by "Save"? Do you want to know how to get it into
a 7.0 db or did Hari address your issue?
Andrew J. Kelly SQL MVP
"Tony" <anonymous@.discussions.microsoft.com> wrote in message
news:298601c4709c$5dc1af40$a401280a@.phx.gbl...
> Hi
> I understand 2000 databases are not backward compatible
> but is there any way to save 2000 databases in 7 format?
> Is there an option?
> Thanks
> Tony
|||Tony,
To add to Andrew's post, if you want to export data from 2000 to 7, then
you can use DTS.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Andrew J. Kelly wrote:
> What exactly do you mean by "Save"? Do you want to know how to get it into
> a 7.0 db or did Hari address your issue?
>
sql
Saving SQL 2000 Databases in SQL 7 format
I understand 2000 databases are not backward compatible
but is there any way to save 2000 databases in 7 format?
Is there an option?
Thanks
TonyHi,
You can set the user databases to SQL 7.0 compatible in SQL2000. You can do
that using Enterprise manager as well as Query Analyzer.
Enterprise manager:
1.Expand databases -- Right click and select properties
2. Choose option tab -- In the compatibility combo box select "Database
compatibilty level 70"
3. Click ok
Query ANalyzer:
1. Execute the below script.
EXEC sp_dbcmptlevel 'pubs', 70
Thanks
Hari
MCDBA
"Tony" <anonymous@.discussions.microsoft.com> wrote in message
news:298601c4709c$5dc1af40$a401280a@.phx.gbl...
> Hi
> I understand 2000 databases are not backward compatible
> but is there any way to save 2000 databases in 7 format?
> Is there an option?
> Thanks
> Tony|||What exactly do you mean by "Save"? Do you want to know how to get it into
a 7.0 db or did Hari address your issue?
--
Andrew J. Kelly SQL MVP
"Tony" <anonymous@.discussions.microsoft.com> wrote in message
news:298601c4709c$5dc1af40$a401280a@.phx.gbl...
> Hi
> I understand 2000 databases are not backward compatible
> but is there any way to save 2000 databases in 7 format?
> Is there an option?
> Thanks
> Tony|||Tony,
To add to Andrew's post, if you want to export data from 2000 to 7, then
you can use DTS.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Andrew J. Kelly wrote:
> What exactly do you mean by "Save"? Do you want to know how to get it into
> a 7.0 db or did Hari address your issue?
>
Saving SQL 2000 Databases in SQL 7 format
I understand 2000 databases are not backward compatible
but is there any way to save 2000 databases in 7 format?
Is there an option?
Thanks
TonyHi,
You can set the user databases to SQL 7.0 compatible in SQL2000. You can do
that using Enterprise manager as well as Query Analyzer.
Enterprise manager:
1.Expand databases -- Right click and select properties
2. Choose option tab -- In the compatibility combo box select "Database
compatibilty level 70"
3. Click ok
Query ANalyzer:
1. Execute the below script.
EXEC sp_dbcmptlevel 'pubs', 70
Thanks
Hari
MCDBA
"Tony" <anonymous@.discussions.microsoft.com> wrote in message
news:298601c4709c$5dc1af40$a401280a@.phx.gbl...
> Hi
> I understand 2000 databases are not backward compatible
> but is there any way to save 2000 databases in 7 format?
> Is there an option?
> Thanks
> Tony|||What exactly do you mean by "Save"? Do you want to know how to get it into
a 7.0 db or did Hari address your issue?
Andrew J. Kelly SQL MVP
"Tony" <anonymous@.discussions.microsoft.com> wrote in message
news:298601c4709c$5dc1af40$a401280a@.phx.gbl...
> Hi
> I understand 2000 databases are not backward compatible
> but is there any way to save 2000 databases in 7 format?
> Is there an option?
> Thanks
> Tony|||Tony,
To add to Andrew's post, if you want to export data from 2000 to 7, then
you can use DTS.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Andrew J. Kelly wrote:
> What exactly do you mean by "Save"? Do you want to know how to get it int
o
> a 7.0 db or did Hari address your issue?
>
Saving Report without report export pop-up window
What I want to do is to save a report in PDF format to a pre-defined location in the web server when I click a button in a webpage. I don't want the pop-up windows appear to ask for save or open the file.
Anyone can help ?
if u save your report in a temp place you can use the acrobt activex control and give it the pdf file path
it will be opened without asking
Monday, March 26, 2012
Saving images into database table
Can anyone advise me?
Quote:
Originally Posted by gyap88
I need to save images in png format into sql server database table from my documents. I have already created a column with image being the data type. I tried to copy the image from the directory but i cannot paste it in the column.
Can anyone advise me?
hi...
you are trying to insert images into table using vb.net ,asp or c# .net .tell me which one|||Actually i m using sql server management studio express
Saving documents in SQL2005
I was wondering if I can save documents e.g. pdf, word, excel or anyother format in sql2005.
If yes what datatype should I use and what would be the best way to go about it.
Thanks in advanceYou could
But you would be better of just storing the file name and path of a file server in the database and storing the documents on the file server
Look up image datatype in BOL|||Thanks for the quick reply. So your suggestion is saving the docs on file server and the path and file name in sql server which is what I am doing at this time... but I thought saving docs in sql itself would have been a better option for security and ease of use etc.
Can you please give me some reasons why would it be better if I not save files on sql e.g. lots of load etc. so I will give that explaination to my boss here :).
Thanks|||From what I understand it'a a maint nightmare, plus you have to get the data out chunks, it's not a simple operation, and then you have to put them all back together
You have BOL?
http://msdn2.microsoft.com/en-us/library/ms130214.aspx|||Oh thank you for the link there for BOL :).
And I would go with your suggestion for using file server instead of SQL for saving files now it does makes sense.
Thank you very much for the help.
Friday, March 23, 2012
saving and retreivig the files on sqlserver
Hi!
I want to save and retreive some files on sqlserver. I want to save the files in binary format on sqlserver and I want to get back them in their format.Is it possible in c#? If possible please help me to do this. I already succeeded to save a file in binary format, but i am getting problem to retreive that in its format.
Thanks in adance
Fro Exmple, to save Image Files in Sql Server...
Inserting Images to SqlServer in ASP .NET: ASP Alliance
Retrieving Images from SqlServer in ASP .NET: ASP Alliance
Excellent Tutorial regarding storing / retriving files on server as well as in database:Storing Uploaded Files in a Database or in the File System with ASP.NET 2.0
hope it helps./.
Saving and loading rendered report
file or stream or/ the xml format ?Additional info. I want to not only save the whole rendered report into a
file but also have a possibility to load the report from that file from
ReportViewer control.
What is the best way to implement it ?
"delpasso" wrote:
> Is it possible that a rendered report can be saved with rendered data in a
> file or stream or/ the xml format ?sql
Wednesday, March 21, 2012
Saving a database into an importable file format
I have come into possession of a SQL 2005 database. The problem is that the designer tried to re-invent the wheel and code a very very poor LMS back end for tracking and reporting. I would like, if possible, to save the database and as far as I am aware - should be able to import into Access and generate statistics and reports to my hearts content.
I have tried w/out success to save the database going through SQL Server Management Studio Express.
Any help or information that could be provided would be appreciated. Any additional information that I can provide, please let me know.
Thanks - Will
You can not save the database as is, you will still need the sql enine to read the information. The easiest way to store the information is to use the backup and restore functions.
To export the data to Access you will need to use SSIS (Sql Server Intergration Services), but if all you want to do is report off it using access why don't you just use the linked tables functions inside Access.
|||Thanks Glenn.Any suggested reading material on the basics operating through SQL Server Management Stuido?
Tuesday, March 20, 2012
save results in a proper format
the -o switch to output to a file, the results always appear in an
unreadable format.
Is there any way where i can view the entire row in one line as opposed to
multiple lines.. So if i have 10 rows as the output of a query , i would
like to see
10 straight lines that i can scroll from left to right in notepad along with
the column names obviously.. But everytime those 10 rows are on 100 lines
and its really unreadable...
Is there a better way to save this from QA and also other switches to be
used for osql ? Or maybe there is some options in notepad or wordpad to
make it appear better .. Please suggest..( Note that i do not have my word
wrap on ) .. But i guess you guys who saved results before know what im
talking about
Thanks
hi hassan
I dont know whats going wrong with, but i save my result in following way
using query analyzer
first i on "show result in grid" by pressing Ctrl+D
then execute the query
click on left, top corner of the grid and copy the contents
paste in notepad or excel sheet .
this work fine
Ansari
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:#4P2CqCgEHA.384@.TK2MSFTNGP10.phx.gbl...
> Whenever i save results in query analyser or even when i run osql and use
> the -o switch to output to a file, the results always appear in an
> unreadable format.
> Is there any way where i can view the entire row in one line as opposed to
> multiple lines.. So if i have 10 rows as the output of a query , i would
> like to see
> 10 straight lines that i can scroll from left to right in notepad along
with
> the column names obviously.. But everytime those 10 rows are on 100 lines
> and its really unreadable...
> Is there a better way to save this from QA and also other switches to be
> used for osql ? Or maybe there is some options in notepad or wordpad to
> make it appear better .. Please suggest..( Note that i do not have my word
> wrap on ) .. But i guess you guys who saved results before know what im
> talking about
> Thanks
>
|||Well Id like to just save it without do the cut and paste.. Also i have jobs
that use osql to output to text files that does not format right
"M.M Ansari" <mudasar_ansari@.hotmail.com> wrote in message
news:OFr4KUDgEHA.3548@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> hi hassan
> I dont know whats going wrong with, but i save my result in following way
> using query analyzer
> first i on "show result in grid" by pressing Ctrl+D
> then execute the query
> click on left, top corner of the grid and copy the contents
> paste in notepad or excel sheet .
> this work fine
> Ansari
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:#4P2CqCgEHA.384@.TK2MSFTNGP10.phx.gbl...
use[vbcol=seagreen]
to[vbcol=seagreen]
would[vbcol=seagreen]
> with
lines[vbcol=seagreen]
word
>
|||hi Hassan
Well, it was misunderstanding...You can use BCP utility to export your data.
here is the sample one
BCP "SELECT * FROM NORTHWIND.DBO.ORDERS" queryout
c:\orders.txt -c -r\n -t\t -Usa -Pansari -Smudasaransari\mma
BCP is a command line utitlity and you may see the BOL for detail of
swtiches I have used there. remmber that switches are case sensitive.
hope this will solve your problem.
Thanks
Ansari
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:ef748pIgEHA.596@.TK2MSFTNGP11.phx.gbl...
> Well Id like to just save it without do the cut and paste.. Also i have
jobs[vbcol=seagreen]
> that use osql to output to text files that does not format right
> "M.M Ansari" <mudasar_ansari@.hotmail.com> wrote in message
> news:OFr4KUDgEHA.3548@.TK2MSFTNGP09.phx.gbl...
way[vbcol=seagreen]
> use
opposed[vbcol=seagreen]
> to
> would
along[vbcol=seagreen]
> lines
be[vbcol=seagreen]
to[vbcol=seagreen]
> word
im
>
save results in a proper format
the -o switch to output to a file, the results always appear in an
unreadable format.
Is there any way where i can view the entire row in one line as opposed to
multiple lines.. So if i have 10 rows as the output of a query , i would
like to see
10 straight lines that i can scroll from left to right in notepad along with
the column names obviously.. But everytime those 10 rows are on 100 lines
and its really unreadable...
Is there a better way to save this from QA and also other switches to be
used for osql ? Or maybe there is some options in notepad or wordpad to
make it appear better .. Please suggest..( Note that i do not have my word
wrap on ) .. But i guess you guys who saved results before know what im
talking about
Thankshi hassan
I dont know whats going wrong with, but i save my result in following way
using query analyzer
first i on "show result in grid" by pressing Ctrl+D
then execute the query
click on left, top corner of the grid and copy the contents
paste in notepad or excel sheet .
this work fine
Ansari
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:#4P2CqCgEHA.384@.TK2MSFTNGP10.phx.gbl...
> Whenever i save results in query analyser or even when i run osql and use
> the -o switch to output to a file, the results always appear in an
> unreadable format.
> Is there any way where i can view the entire row in one line as opposed to
> multiple lines.. So if i have 10 rows as the output of a query , i would
> like to see
> 10 straight lines that i can scroll from left to right in notepad along
with
> the column names obviously.. But everytime those 10 rows are on 100 lines
> and its really unreadable...
> Is there a better way to save this from QA and also other switches to be
> used for osql ? Or maybe there is some options in notepad or wordpad to
> make it appear better .. Please suggest..( Note that i do not have my word
> wrap on ) .. But i guess you guys who saved results before know what im
> talking about
> Thanks
>|||Well Id like to just save it without do the cut and paste.. Also i have jobs
that use osql to output to text files that does not format right
"M.M Ansari" <mudasar_ansari@.hotmail.com> wrote in message
news:OFr4KUDgEHA.3548@.TK2MSFTNGP09.phx.gbl...
> hi hassan
> I dont know whats going wrong with, but i save my result in following way
> using query analyzer
> first i on "show result in grid" by pressing Ctrl+D
> then execute the query
> click on left, top corner of the grid and copy the contents
> paste in notepad or excel sheet .
> this work fine
> Ansari
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:#4P2CqCgEHA.384@.TK2MSFTNGP10.phx.gbl...
use[vbcol=seagreen]
to[vbcol=seagreen]
would[vbcol=seagreen]
> with
lines[vbcol=seagreen]
word[vbcol=seagreen]
>|||hi Hassan
Well, it was misunderstanding...You can use BCP utility to export your data.
here is the sample one
BCP "SELECT * FROM NORTHWIND.DBO.ORDERS" queryout
c:\orders.txt -c -r\n -t\t -Usa -Pansari -Smudasaransari\mma
BCP is a command line utitlity and you may see the BOL for detail of
swtiches I have used there. remmber that switches are case sensitive.
hope this will solve your problem.
Thanks
Ansari
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:ef748pIgEHA.596@.TK2MSFTNGP11.phx.gbl...
> Well Id like to just save it without do the cut and paste.. Also i have
jobs
> that use osql to output to text files that does not format right
> "M.M Ansari" <mudasar_ansari@.hotmail.com> wrote in message
> news:OFr4KUDgEHA.3548@.TK2MSFTNGP09.phx.gbl...
way[vbcol=seagreen]
> use
opposed[vbcol=seagreen]
> to
> would
along[vbcol=seagreen]
> lines
be[vbcol=seagreen]
to[vbcol=seagreen]
> word
im[vbcol=seagreen]
>
save results in a proper format
the -o switch to output to a file, the results always appear in an
unreadable format.
Is there any way where i can view the entire row in one line as opposed to
multiple lines.. So if i have 10 rows as the output of a query , i would
like to see
10 straight lines that i can scroll from left to right in notepad along with
the column names obviously.. But everytime those 10 rows are on 100 lines
and its really unreadable...
Is there a better way to save this from QA and also other switches to be
used for osql ? Or maybe there is some options in notepad or wordpad to
make it appear better .. Please suggest..( Note that i do not have my word
wrap on ) .. But i guess you guys who saved results before know what im
talking about
Thankshi hassan
I dont know whats going wrong with, but i save my result in following way
using query analyzer
first i on "show result in grid" by pressing Ctrl+D
then execute the query
click on left, top corner of the grid and copy the contents
paste in notepad or excel sheet .
this work fine
Ansari
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:#4P2CqCgEHA.384@.TK2MSFTNGP10.phx.gbl...
> Whenever i save results in query analyser or even when i run osql and use
> the -o switch to output to a file, the results always appear in an
> unreadable format.
> Is there any way where i can view the entire row in one line as opposed to
> multiple lines.. So if i have 10 rows as the output of a query , i would
> like to see
> 10 straight lines that i can scroll from left to right in notepad along
with
> the column names obviously.. But everytime those 10 rows are on 100 lines
> and its really unreadable...
> Is there a better way to save this from QA and also other switches to be
> used for osql ? Or maybe there is some options in notepad or wordpad to
> make it appear better .. Please suggest..( Note that i do not have my word
> wrap on ) .. But i guess you guys who saved results before know what im
> talking about
> Thanks
>|||Well Id like to just save it without do the cut and paste.. Also i have jobs
that use osql to output to text files that does not format right
"M.M Ansari" <mudasar_ansari@.hotmail.com> wrote in message
news:OFr4KUDgEHA.3548@.TK2MSFTNGP09.phx.gbl...
> hi hassan
> I dont know whats going wrong with, but i save my result in following way
> using query analyzer
> first i on "show result in grid" by pressing Ctrl+D
> then execute the query
> click on left, top corner of the grid and copy the contents
> paste in notepad or excel sheet .
> this work fine
> Ansari
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:#4P2CqCgEHA.384@.TK2MSFTNGP10.phx.gbl...
> > Whenever i save results in query analyser or even when i run osql and
use
> > the -o switch to output to a file, the results always appear in an
> > unreadable format.
> >
> > Is there any way where i can view the entire row in one line as opposed
to
> > multiple lines.. So if i have 10 rows as the output of a query , i
would
> > like to see
> >
> > 10 straight lines that i can scroll from left to right in notepad along
> with
> > the column names obviously.. But everytime those 10 rows are on 100
lines
> > and its really unreadable...
> >
> > Is there a better way to save this from QA and also other switches to be
> > used for osql ? Or maybe there is some options in notepad or wordpad to
> > make it appear better .. Please suggest..( Note that i do not have my
word
> > wrap on ) .. But i guess you guys who saved results before know what im
> > talking about
> >
> > Thanks
> >
> >
>|||hi Hassan
Well, it was misunderstanding...You can use BCP utility to export your data.
here is the sample one
BCP "SELECT * FROM NORTHWIND.DBO.ORDERS" queryout
c:\orders.txt -c -r\n -t\t -Usa -Pansari -Smudasaransari\mma
BCP is a command line utitlity and you may see the BOL for detail of
swtiches I have used there. remmber that switches are case sensitive.
hope this will solve your problem.
Thanks
Ansari
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:ef748pIgEHA.596@.TK2MSFTNGP11.phx.gbl...
> Well Id like to just save it without do the cut and paste.. Also i have
jobs
> that use osql to output to text files that does not format right
> "M.M Ansari" <mudasar_ansari@.hotmail.com> wrote in message
> news:OFr4KUDgEHA.3548@.TK2MSFTNGP09.phx.gbl...
> > hi hassan
> > I dont know whats going wrong with, but i save my result in following
way
> > using query analyzer
> >
> > first i on "show result in grid" by pressing Ctrl+D
> > then execute the query
> > click on left, top corner of the grid and copy the contents
> > paste in notepad or excel sheet .
> >
> > this work fine
> >
> > Ansari
> >
> > "Hassan" <fatima_ja@.hotmail.com> wrote in message
> > news:#4P2CqCgEHA.384@.TK2MSFTNGP10.phx.gbl...
> > > Whenever i save results in query analyser or even when i run osql and
> use
> > > the -o switch to output to a file, the results always appear in an
> > > unreadable format.
> > >
> > > Is there any way where i can view the entire row in one line as
opposed
> to
> > > multiple lines.. So if i have 10 rows as the output of a query , i
> would
> > > like to see
> > >
> > > 10 straight lines that i can scroll from left to right in notepad
along
> > with
> > > the column names obviously.. But everytime those 10 rows are on 100
> lines
> > > and its really unreadable...
> > >
> > > Is there a better way to save this from QA and also other switches to
be
> > > used for osql ? Or maybe there is some options in notepad or wordpad
to
> > > make it appear better .. Please suggest..( Note that i do not have my
> word
> > > wrap on ) .. But i guess you guys who saved results before know what
im
> > > talking about
> > >
> > > Thanks
> > >
> > >
> >
> >
>
Save Report for Mailing
I need to save a report on the server after redering it in PDF Format, so
that I can mail it to that particular user.
How to do this.
Thanks
KiranKiran,
You can use the Report Manager to schedule sending an email
subscription with a PDF attachment, or save it to a file share; not
both.
Regards,
Paul Whitaker
IUPUI .NET User Group
http://dotnet.iupui.edu
Tuesday, February 21, 2012
Samples for Calendar Style Reports
Want to see sample reports that display
the data in calendar format like outlook does.
Example ... all appointments for the next 2 weeks arranged
as a calendar.
Thank you for your help in advance.It depends on which Outlook view. Month? Week? Day? You probably could
get the day view or business week view working using tables as well as a
dataset that included all days and hours, and outer join your appointments
so you could display the entire range of data and leave the non-appointments
blank.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Rakesh" <Rakesh@.discussions.microsoft.com> wrote in message
news:EAEA54D3-82E2-44B4-8AB0-4FEC73A79266@.microsoft.com...
> newbee! question.
> Want to see sample reports that display
> the data in calendar format like outlook does.
> Example ... all appointments for the next 2 weeks arranged
> as a calendar.
> Thank you for your help in advance.
>