SQL Queries - Kristen - In Plain English.

Oct 16, 2007

Good Morning Kristen:

Thank You, You are the first person, that has given me a clear answer. I am going to explain in plain English What this SP is suppose to do.

I have to find any station_nbr that has more than one group_code and that the current date = (DATEADD(mm,DATEDIFF(mm,0,dateadd(mm,-0-datepart(day,0),getdate())),0) The current date starts with the first day of the previous month.
Example today is October 10, 2007 I need September 01, 2007 for this query.
To insert the record it needs to be active meaning that the current date is in between Beg_eff_date and end_eff_date, and the end_eff_date is = ‘12/31/3000’


I need to write SP(cursor) that reads line by line this table and that insert the answer: INSERT INTO #TP_TIES_OVerlaping_Dates.

Example:
Current_date: 09/01/2007


Group_Code Station_nbr beg_eff_date end_eff_date
0000003 00371101 03/12/2006 12/31/3000
0000016 00371101 07/08/2007 12/31/3000


The above explanation is for the first type of Error.

The second Type of Error:
If the Group Code ends with "W" and the End_effective_date = '12/31/3000' and the W_Beg_date is Part of the Temp Table(I to create the W_Beg_Date Column) -- is GREATER than the End_eff_date. I want to Insert this Record into the Table. I need to set sometype of Record Control to make the different between one error to another one.

I thank you so much for your help.....I hope this is clear to understand for everybody.

End

View 7 Replies


ADVERTISEMENT

Generate Db Script In Plain Sql

Apr 26, 2007

Hello. I am really new to sql server. I have a db in the server that I use for testing. i want to export it in plain sql so as to import it in another db system. How can I do it?

thank you a lot.

View 8 Replies View Related

Sp_password In Plain Text

Oct 1, 2007

Greetings all.
I am currently working to improve the security on a legacy application we have at my company. The app was written in vb6 years ago. We now have the app running against a sql 2005 server. One of the function/screens in the application is used to administrate users. (each user has a sql user id) and one of the functions is to reset the password. The vb code uses a call to sp_password. Here is the problem. We setup a network sniffer and found the command being in plain text. While the user logon is encrypted ( SSL Fallback) the sp_password commands issued by the app are plan text. Anyone know of a way to make this encrypted?
Leif

View 3 Replies View Related

Convert RTF To Plain Text

Jul 23, 2005

I have a SQL Server 2000 table with a few fields of "text" data typethat contain rich text. I have to downstream this data and therecipient cannot handle rich text. I need to figure out a way toconvert it back to plain text. Any suggetions?TIA

View 4 Replies View Related

Plain Text Mails

Apr 19, 2007

How can I set the default body_format in database mail. I would like to send a warning with plain text format (from the alerts), that i'll get on my mobile phone, but the message's format is html... always...and I don't get the sms-s.

View 5 Replies View Related

Plain Text Rendering - Again!

Nov 29, 2007

Hello List,



sorry to raise this again here. I have seen a lot of posts on this board about plain text rendering but never really a satisfactory answer. So my question is: Has anyone succeeded in developing a custom rendering extension which is able to render a report as plain text?

I am a Technical Lead in a project to convert and migrate reporting from Unix/C to Reporting Services 2005. One requirement is, to render the reports in plain text for archiving purposes. I know that there are a million options out there to archive in PDF and whatever. Well, we need plain text. No way around it! It is a governmental requirement!

I am about to pull the plug on SSRS 2005 just because we are not able to fulfill this requirement. And we are talking about a big project converting >700 reports!


Challenges we are facing:


Reporting components are rendered as they appear in a compnent list, one after each other. If you now have two multiline components side by side, i.e. two lists, the first list component in the array gets rendered and then the other. This makes it almost impossible to render the lines in those two components side by side. In the sample below, the Report Header would be rendered, then the Address block, then the Other Data block, then the Order History Table and then the Account Statement table.

Positioning of text boxes is almost impossible. We are able to find out how many centimeters/inches/millimeters/points a control is located from the left border. But how can we translate this into i.e. how many spaces will we need to add for padding?

The column width can't be determined. SSRS adds a line break if the cell text is longer than the column width.


We have reports which look something like this:



Code Block


Code Block

REPORT NAME

MANAGER NAME


ACCOUNT
REPORT DATE






First Name: XXXXXXXXXXXX Other Data: XXXXXXXXXXXXXX
Last Name: XXXXXXXXXXXX More Data: XXXXXXXXXXXXXX
Address: XXXXXXXXXXXX More Data: XXXXXXXXXXXXXX
City: XXXXXXXXXXXX

Order History Account Statement

XXXXXXXXXXX XXXXXXX XXXXXX XXXXXXXXXXXXX XXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXX XXXXXXX XXXXXX XXXXXXXXXXXXX XXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXX XXXXXXX XXXXXX XXXXXXXXXXXXX XXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXX XXXXXXX XXXXXX XXXXXXXXXXXXX XXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXX XXXXXXX XXXXXX XXXXXXXXXXXXX XXXXXXXX XXXXXXXXXXXXX




I also got some advice that SSRS is probably the wrong tool. And I also read this in some of the "Plain Text" posts here. And I am actually surprised about this. People suggest to look for some other tool and not use i.e. email subscrptions, other rendering formats, SSRS security model, snapshot history, report models and all the other goodies only because we can't render in simple text?

If anyone has any information to share, I would very much appreciate it. We also looked at third party tools and plug ins but couldn't find any! If anyone knows of a company who would be able to help us, let me know!

I really would love to pull this project off with SSRS 2005 because I Iike the technology and SSRS provides a lot of functionality we want to leverage. I believe SSRS is the right tool for us and it covers 95% of our business requirements! But at this stage it doesn't look very rosy! Because of the Plain Text rendering!

Cheers

Peter

View 6 Replies View Related

Copy Within A Table - Plain SQL

Aug 9, 2006

Hi.



I'm quit new into SQL - have a problem - and hope someone here ca n help me.

I have a table TABLE1 with different fields. A part of it looks like this:

FIELD1 FIELD2 FIELD3

111111 121212 0

111111 121212 91

222222 232323 0

222222 232323 73

etc. etc.

I want to "copy"/write over '0' in FIELD3 with the number in FIELD3 from the line that has the same numbers (and unique for these two lines) in FIELD1 and FIELD2. The table will then look like this:

FIELD1 FIELD2 FIELD3

111111 121212 91

111111 121212 91

222222 232323 73

222222 232323 73

I can make a temporary table or a new field if necessary. I just don't know how to write the right SQL.

Thankful if anyone can help me.

View 5 Replies View Related

T-SQL (SS2K8) :: CLR / RTF To Plain Text Not Working?

Sep 23, 2014

Trying to troubleshoot an CLR/ RTF to Plain Text issue I am having.

I have 3 instances on one SQL server. Only one of the Instances is not working. Even tried deleting everything and resetting it up.

Here is the code I am testing with:

USE Test_Database
GO
DECLARE @RTF varchar(max)
SET @RTF = '{
tfansiansicpg1252uc1deff0deflang1033{fonttbl{f0 Calibri;}{f1 Arial;}}{colortbl
ed0green0blue0 ;
ed255green255blue255 ;}viewkind4paperw12240paperh15840margl1425margr1425margt1425margb1425sectdpgwsxn12240pghsxn15840
marglsxn1425margrsxn1425margtsxn1425margbsxn1425pardfs21sl276slmult1sa180{f1fs21
Test New Progress Notes - Praveen}par}';
SELECT dbo.clr_fn_ConvertRTF2PlainText(@RTF)

Here is what I am getting back:

The operation completed successfully

Not sure what to check as the other two instances are working fine.

I have CLR enabled in sp_Configure

clr enabled 0 1 11

View 2 Replies View Related

Limit Joins (or Plain Improve Qry)

Jun 3, 2008

Hi,

I got a qry that takes 10s. This is off course too long.
As I described in my earlier posts, I'm no sql hero, but I'm on a neverending quest to improve.
Currently I need a select statement over several (7) tables and return fields from almost all of them.
Furthermore I have optional restrictions on fields spread over all those tables, based on a set of parameters.
What I initially do is inner join all my tables and then have a big where clause that adds where-rules depending on the arguments given.

Like so:
select c.clr_id, n.clr_nm, co.long_nm, p.paint_cd, a.appl_desc, m.modl_nm, y.yr_num
from CLR c
inner join paint_cd p
on c.clr_id = p.clr_id
inner join clr_use_yr y
on y.clr_id = c.clr_id
inner join co
on co.co_id = c.co_id
inner join modl m
on y.modl_id = m.modl_id
inner join clr_appl ca
on c.clr_id = ca.clr_id
inner join appl a
on ca.appl_cd = a.appl_cd
inner join clr_nm n
on c.clr_id = n.clr_id
WHERE
(CASE @regn when '' THEN '' ELSE n.regn_cd END) like (CASE @regn when '' THEN '' ELSE @regn END)
AND (CASE @co when '' THEN '' ELSE co.long_nm END) like (CASE @co when '' THEN '' ELSE @co END)
AND (CASE @clrNm when '' THEN '' ELSE n.clr_nm END) like (CASE @clrNm when '' THEN '' ELSE @clrNm END)
AND (CASE @paintCd when '' THEN '' ELSE p.paint_cd END) like (CASE @paintCd when '' THEN '' ELSE @paintCd END)
AND (CASE @applDc when '' THEN '' ELSE a.appl_desc END) like (CASE @applDc when '' THEN '' ELSE @applDc END)
AND (CASE @useYear when '' THEN '' ELSE cast(y.yr_num as varchar(4)) end) like (CASE @useYear when '' THEN '' else @useYear END)
AND (CASE @modlNm when '' THEN '' ELSE m.modl_Nm END) like (CASE @modlNm when '' THEN '' ELSE @modlNm END)

It appeared to me that by getting those where clauses in the join, I would limit the calculations. So the joins where similar to this:
inner join paint_cd p
on c.clr_id = p.clr_id
AND (CASE @paintCd when '' THEN '' ELSE p.paint_cd END) like (CASE @paintCd when '' THEN '' ELSE @paintCd END)

The result though, was exactly the same.
So, where in my thinking am I wrong and what is the correct way to go about this?

View 9 Replies View Related

SQL Function To Convert RTF To Plain Text

Jul 23, 2005

Does anyone have the logic to convert RTF formatted data in a textcolumn into plain ascii text that I can use in a varchar variable orfield?We have an app that allows formatted comments/notes to be stored in aSQL 2000 text column. Ideally, I would like a trigger that would copyany inserted comments into a seperate table, varchar field so thatthese are viewable in other apps that can not display formatted RTF.I would really like the logic to be all SQL based and not have to use aclient app to read/convert/insert the data in a batch mode.

View 1 Replies View Related

Xp_smtp_sendmail Html+plain Text

Jul 20, 2005

Hi all. Iv'e tryed out xp_smtp_sendmail, and I like what I can see sofar. The thing I wonder about is if the xp supports sending both htmlAND plain text in the same mail. I'm on a sql2000 sp3 and I have noproblem with the xp when i either send plain text or html, but asstated above I need to send with both formats in one mail......For use when one does not know if the receiver uses a mail-client thatsupports html or not. If not does anyone know of a good way to attackthis problem?thanks in advanceKarl B

View 1 Replies View Related

Calling Stored Procedures Using Plain ADO In C#

Sep 7, 2006

Hello All,

We are trying to figure out how to make a stored procedure call and pass some inputs using C# and plain ADO. We are able to call an empty stored procedure but cannot pass parameters into a stored procedure.

Does anyone have sample code in C# whereby we can open a connection and pass inputs into a stored procedure? The following is a sample code we are using:


ADODB.Parameter param = new ADODB.Parameter();

param=cmd.CreateParameter("@StoreID", ADODB.DataTypeEnum.adInteger, ADODB.ParameterDirectionEnum.adParamInput,sizeof(int) , 9);

cmd.Parameters.Append(param);

          ADODB.Recordset rsInv = cmd.Execute(out objAffected, ref objAffected,-1 );

In the above example, we create a parameter of type integer and try to add it to the ADO Command object. It is supposed to return a recordset. It returns a recordset with record count -1.

 

Sincerely,

Dwight Kulkarni

View 3 Replies View Related

Microsoft Great Plain Integration Application And New Tables On Sql

Jul 28, 2006

In dexterity iam using table_compare() function to check if tables in datasource and dictionary are same but its not picking up the primary key change but it does pick up the column change

any suggestion

thanks

View 1 Replies View Related

Is It Possible To Import Data From Plain Text File In Integration Services

Feb 21, 2008



hi,


I am new to Integration services.I have one query ,Is it possible to import the data from text file in integration services.
I know that we can import the data from excel sheet and we can export it to table.But my question is whether we can do the same thing from the text file.If anyone come acroos the same thing send u r possible answers.Your help is much appreciated.



Thanks in advance.

View 1 Replies View Related

Non-English Char

Nov 2, 2000

Would the char or varchar datatype fieldname accept non-english letters like Japanees, Chinees, Russian..etc.

Or should I use nchar or nvarchar?

Thanks

View 2 Replies View Related

One SQL In Spanish Another In English

Apr 19, 2004

Hi, Im installing a software which use SQL Server 2000 in english, but currently I have in all computers another program that use a ODBC for SQL 2000 in Spanish.If I install the components for the client of SQL in English then the another application got an error ODBC somehting related with the driver.

So there are any way to have a client for use SQL in spanish and english at the same time.So I mean I got two server one in spanish one in english, and just one computer client with twwo applications.

regards
and thank you

View 2 Replies View Related

Non-English Characters

Feb 11, 2006

Hello all,We are developing an add-on for GoldMine, however my problem is ageneric SQL Server problem. The situation is this; we have a database,with collation set to SQL Latin. When we connect to database viaGoldmine, Enterprise Manager or Delphi (through ADO) we cannot seeTurkish characters. When I set SQL Server machine's "Language ForNon-Unicode Programs" setting to Turkish, GoldMine works fine, howeverthere is still problem in EM and Delphi.Does anybody know how to solve this issue?

View 7 Replies View Related

Non English Characters

Sep 27, 2006

Hi,We are developing a small web interface to a local ERP software, whichuses SQL Server 2000 as database. The database uses SQL_Latin1_CP1collation, and the fields are varchar (not nvarchar), however, the mainprogram inserts and reads non-English (Turkish) characters into thesecolumns. However, when we connect to database with ADO.NET, thesecharacters are not read correctly. (The situation is same when I checktables with Enterprise Manager and Query Analyzer)In a past situation (which was about a Win32 application), I have heardabout character conversion behaviour of ADO (and many other DBlibraries) and solved that problem using BDE instead of ADO, so thatthe connection is made via DB-Library instead of OLEDB.But this way cannot be applied to my ASP.NET situation, and there is NOway to change database collation. Must I use a ADO.NET property, or useanother provider, or maybe another library? Any advices? Thanks...

View 4 Replies View Related

English And German Collations

Apr 10, 2007

I have developed a tool to allow project developers to easily re-create the entire schema for our base product. The current issue involves setting the correct collation for the customers' region. Our brother company in Germany uses the same db creation tool and scripts, and we here in the US also have customers in South America. My ultimate question is "what subset of collation names would be necessary to provide the project developer?" I could query the database to get all the collation names, but I think it was around 1000 names. Can I query to get a smaller subset of the most relevant collation names?

Ed

View 3 Replies View Related

Cannot Save English Dates!

Aug 20, 2006

Hi All,

I have this dumb problem with dates in my mobile application. The problem is when saving a short date in English format ex 20/08/2006 the sql server 200 windows CE Edition display an error stating

THERE IS AN ERROR IN THE DATEPART FORMAT. [,,,Expression,,]

When changing the date in American format the problem is solved ex 08/20/2006

The problem is that I require the dates in English Format only!



Is there anyway of solving my problem ?



Thanks



Matt

View 1 Replies View Related

Reg Windows Svr Ent 2003 R2 English MVL

Mar 30, 2007

Hi,



I have purchased windows Srv Ent 2003 R2 English MVL license is it 32 bit or 64 bit? will it run on HP DL580 G4/(1) Dual-Core 64-bit Intel® Xeon„¢ 7110M Processor (2.60 GHz, 95 Watts, 800MHz FSB) ?



Pls reply urgently.



Thanks

View 4 Replies View Related

Inserting Non English Values Using Jdbc

Jan 21, 2006

I am fetching values from a table containing non english characters and inserting the values in another table. Both the tables have the same structure and the column datatype is nvarchar. I am using jdbc jtdc.jar with default parameters. When I query my inserted values, they are junk characters. when I insert values using Query Analyzer the characters are proper. But when i insert using jdbc junk values are stored.

any help would be greatly received.

View 1 Replies View Related

Deletion Of Data Other Than English Language

May 23, 2006

Anil Chauhan writes "Hello experts,

I have a table in sql server 2000 which has over 94000 records.
I have to delete a record from table ,which record having a language other than english .
I need to clean the table by removing all the data which are in other language .
My main table has 12 fields .

Thanks in advance."

View 1 Replies View Related

How To Select Non English Values From A Table?

Apr 21, 2007

CREATE TABLE product
( product_id integer
, translated_name NVARCHAR2(50) );

insert into product values(1,N'kenenisa')
insert into product values(2,N'Ethiopia')
Note that i have used N becuase it is unicode data
then
select * from product; this works fine.
select * from product where product_id=1; this also works fine,
but
select * from product where translated_name=N'kenenisa'; this doesnot work correctly, so how can i fix this problem ?

View 3 Replies View Related

Help: Inserting Non-english(Hebrew) Characters

Mar 31, 2008

Hi Friends,
I am trying to insert Hebrew string into my database from my Java based tool. I am using SQL Server 2005 and the latest MS SQL jdbc driver. After i insert the string, all the Hebrew characters are in an unreadable format (some junk basically).
My requirement is to download the rows of that particular table of the database (containing Hebrew) into an EXCEL sheet, give the corresponding english translation and upload it back. But since i am getting junk characters in the excel sheet, i am unable to translate
I have tried changing the COLLATE parameter of the database and tables while creating the database, but still the issue persists.
Please help me.
Thanks in advance!

View 2 Replies View Related

Support For Spanish And English Language

Feb 20, 2007

Hi,I have a database and want to store data in Spanish and English. Toaccompish this:1. Do i need to create separate tables for both the languages likeitems_en and items_sp?2. If I opt for the UTF16 charset what single collation setting can Iuse?Thanks and RegardsJackal Hunt

View 1 Replies View Related

Sql Server 2005 Express In English

Dec 6, 2007



Hi all.
I am in Italy, but I want to download Sql server 2005 Express with advanced services, BOL and Management Studio in English. Is It possible?


Thank you in advance.
Renzo.

View 4 Replies View Related

In What Forum I Can Put A Question About MS English Query ?

Dec 5, 2007

There was a tool some time ago called Microsoft English Query, it was part of MS SQL Server 2000. However, as I read recently they discontinued it and new SQL Servers 2005/08 don't have it.

Does anybody have a information about that tool, whether it is offered by Microsoft as stand-alone tool, or maybe a part of some other software ?

I tried to search this site but could not find anything about it.

Thanks

View 1 Replies View Related

Converting From Chinese To English In Reports

Oct 22, 2007



hi,

I got some data in both chinese and english ,but while executing my Report i want to c all my data only in english

Is there any way do so ?

View 1 Replies View Related

Storing And Retrieving Info In Non-English Languages

Sep 1, 2006

Hi,I am tasked with creating a site in two languages: English and Farsi (Persian), which is a right-to-left language.I am having problems with the Faris version when it comes to stroing and retrieving data. I can use Farsi fonts and type data into tables, but when I try to retrieve them they are displayed as ?????. I check the table and it says there were problems retriving data and asks to run the query again. When I click on "Execute SQL", the content of the fields that were in Farsi change to ?????.I am new to MS-SQL and would appreciate it if you could tell me how to set up non-English database.TIA.

View 16 Replies View Related

Exporting Simple English Data Into FoxPro 2.6 Dbf

Mar 9, 2008

Could any one help me in

Writing code/query to export simple English text data from MSSQL Sever2000 to FoxPro2.6 dbf


aamir_net68@yahoo.com

View 1 Replies View Related

HELP: Inserting Non-english(Hebrew) Characters In MS SQL SERVER

Mar 30, 2008

Hi Friends,
I am trying to insert Hebrew string into my database from my Java based tool. I am using SQL Server 2005 and the latest MS SQL jdbc driver. After i insert the string, all the Hebrew characters are in an unreadable format (some junk basically).
My requirement is to download the rows of that particular table of the database (containing Hebrew) into an EXCEL sheet, give the corresponding english translation and upload it back. But since i am getting junk characters in the excel sheet, i am unable to translate :(
I have tried changing the COLLATE parameter of the database and tables while creating the database, but still the issue persists.
Please help me.
Thanks in advance!

View 4 Replies View Related

English Query + Dragon Naturally Speaking????

Mar 9, 2001

I was just wondering if anyone had any advice to offer regarding the feasibility of interfacing SQL's English Query Language with Dragon or some other speech recognition software in order to query data?? It seems like an interesting application but is it worth pursing or am I just dreaming...

Thanks in advance

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved