Devide 1 Feild Into 3 Feilds!

Oct 22, 2004

Hi there!

There is a feild in my table that contains the city, state and zip, all in the same feild. I was wondering how would be the best way to devide all that info up into 3 feilds? i really don't know how I would go about it since there are cities that can be comosed of 2 or more words. Here is some sample data. I hope someone can help.

SOUTH EL MONTE CA91733617
BOSSIER LA71172
GARDENA CA90249107
MILWAUKEE WI53216
PARIS IL61944
DUQUOIN IL62832
REDWOOD FALLS MN56283
AUBURN ME04210

IRWINDALE CA91706048
PORTLAND OR97202901
PORTLAND OR972028901
ANAHEIM CA928071735
KENT WA98032
CRYSTAL LAKE IL60014611

View 2 Replies


ADVERTISEMENT

Max Number Of Feilds

Apr 28, 2004

hi all

having worked with access in the past and getting stumped by the fact a table could only hold 256 feilds....... does sql server have any such limit????

thanks

cq

View 7 Replies View Related

How To Get Relation Between Two Feilds Of Same Table

Apr 18, 2007

Hi,
I am new to sql and is working with sql server managment 2005 +c# 2005.

My application needs to create a blockdiagram sort of thing say
if in my database i got a table 'Addition' with 'a', 'b', 'c',and the primary key addition_id, and c is related to a and b as c = a+ b.

there is stored procedure name usp_addition which contains this relation. Each time any insert or update is done this sp is executed and all the values are updated for accordingly.
My problem starts in the front end where i need to draw the graphical representation of table addition.

In this graphical representation, I need to draw the labels a, b, c and the arrows from a and b which will connect to c, showing that c has a, b as inputs.

I got the label using dataset and datacolumns but hte problem is how to create the arrows the name of labels (i.e my column names from which the arrow should start and end)

How does I get the information that c as two inputs a, b. I dont need the values since i just want to view the columns in table and which column is input to another column.


Since I need to do this dynamically because my tablename, and the number and name of column would differ does any body knows how to do this.


Priyadarshini

View 1 Replies View Related

SQL Query Multiple/Optional Feilds

Dec 3, 2004

Hello Group
I am having a little trouble with a search. I have 12 checkbox controls and 12 textbox controls. I want to be able to choose which textbox to query from. Most of the time the search may be from one or a couple of textboxes. My problem is I can get the SQL String right. Below is what I have for a string. I know I could write an SQL string for every possible combination and put in all 144 in a SELECT CASE, but I would think there is an easier way to do this. Is there anything that would let me build a SQL string depending what checkbox are checked true?


Dim SQL_SL As String = "SELECT * FROM BuildZone" & _
" WHERE Parcel = '" & strPercelS & "'" & _
" ORDER BY Parcel Asc" & _
" SQL_SL As String = SELECT * FROM BuildZone" & _
" WHERE fldNameLast = '" & strNameLastS & "'" & _
" UNION" & _
" SQL_SL As String = SELECT * FROM BuildZone" & _
" WHERE fldDateMonth = " & intDateYearS & "" & _
" AND fldDateYear = " & intDateYearS & "" & _
" UNION" & _
" SQL_SL As String = SELECT * FROM BuildZone" & _
" WHERE fldNameLast = '" & strNameLastS & "'" & _
" UNION" & _
" SQL_SL As String = SELECT * FROM BuildZone" & _
" WHERE fldPermitNum = " & intPermitS & "" & _
" UNION" & _
" SQL_SL As String = SELECT * FROM BuildZone" & _
" WHERE fldStructureType = " & intStructureTypeS & "" & _
" UNION" & _
" SQL_SL As String = SELECT * FROM BuildZone" & _
" WHERE fldConstructionCost >= " & intCCost1S & "" & _
" AND fldConstructionCost <= " & intCCost2S & "" & _
" UNION" & _
" SQL_SL As String = SELECT * FROM BuildZone" & _
" WHERE fldRange = " & intRangeS & "" & _
" AND fldTownship = " & intTownshipS & "" & _
" AND fldSection = " & intSectionS & "" & _
" UNION" & _
" SQL_SL As String = SELECT * FROM BuildZone" & _
" WHERE fldZoningDistricts = " & intZoneS & "" & _
" UNION" & _
" SQL_SL As String = SELECT * FROM BuildZone" & _
" WHERE fldTwsp = " & intTwspS & "" & _
" UNION" & _
" SQL_SL As String = SELECT * FROM BuildZone" & _
" WHERE fldRWD = " & intRWDS & "" & _
" UNION" & _
" SQL_SL As String = SELECT * FROM BuildZone" & _
" WHERE fldWW = " & intWWS & "" & _
" UNION" & _
" SQL_SL As String = SELECT * FROM BuildZone" & _
" WHERE fldAccessApplic = " & intAccessAppS & ""

Thanks

View 2 Replies View Related

Sorting Based On Foreign Key Feilds

Dec 1, 2006

shibu writes "I have a table 'manage_user_types' and its primary key is 'Category_ID'. There is another field 'Category_Parent_ID' which refers the 'Category_ID' in the same table. And one more field is 'Category_Name' which is related to 'Category_ID'. ie.when displaying the table in front end, 'Category_Name' is displayed under 'Category_Parent_ID'. I want to sort the table with 'Category_Name' when clicking the 'Category_Parent_ID' to sort. What should i do?"

View 1 Replies View Related

Default Value For A Feild

Nov 19, 2006

I would like have the default value for a feild to be the result of a call to
System.Web.Security.Membership.GeneratePassword(12,4)
How do I implement this?
In a trigger? Do you have sample code?
Thank you very much

View 2 Replies View Related

Select Distinct One Some Fields, But Return All Feilds

Jul 23, 2005

I was curious...Is there a way to select distinct on a combination of some fields andthe for each record returned also get the other fields of anarbitrarily chosen record matching the fields in the distinct record.For example, if I have a select distinct on say three fields:SELECT DISTINCT Code1, Code2, Code3but the table also has other fields, maybe Foo1 and Foo2, and I wantFoo1 and Foo2 to also be displayed. Since there may be multiplerecords that match a particular Code1, Code2, Code3, then I just wantone of those to be arbitrarily chosen.

View 3 Replies View Related

Password Feild As Passwordchar

Jun 5, 2007

Hi,I want to put passwords in my sql table not in clear text  but in password char.  Pls help me

View 2 Replies View Related

Taking The First 100 Characters From A Feild.

Jul 2, 2007

 I dont know what this is called in the technical world. But you know when you do a search on amazon or play.com and the search results contain the first sentance or so of the items describtion rather than the whole thing. How is this done? thanks si!

View 6 Replies View Related

Text Feild In SQL Server

Jan 12, 2004

when i inserted a large amount of text into a text type field through asp.net form but only some of it shows up in SQL server.
can u please help me how to handle this problem? so all the text entered in text feilt can be handled.

View 9 Replies View Related

Creating A Feild When Selecting

Mar 25, 2008

I have a database with tables with the following schema...

Articles) ArticleID, Version
ArticlesVersions)ArticleID Version Title Body etc...

I use the articles table to simply map to a version. This allows for me to revert the article to a earliar version.

I want to cache all the articles including the versions, but with another feild that needs to be created durring the select to determine wether the article version is the active version. The feild needs to be a bit (boolean).

I was thinking maybe SELECT (IF test = test THEN 1 ELSE 0 END) as IsCurrent.

I've tried doing this but I can't get it to work.

Any help would be appreciated!


SELECT dbo.mw_Articles.ArticleID, dbo.mw_ArticlesVersions.Version, dbo.mw_ArticlesVersions.Body, dbo.mw_ArticlesVersions.Title, dbo.mw_ArticlesVersions.ParentID,

dbo.mw_ArticlesVersions.Approved, dbo.mw_ArticlesVersions.UserName, dbo.mw_ArticlesVersions.UserID, dbo.mw_ArticlesVersions.Importance, dbo.mw_ArticlesVersions.EditNotes, dbo.mw_ArticlesVersions.TIME

FROM dbo.mw_Articles INNER JOIN

dbo.mw_ArticlesVersions ON dbo.mw_Articles.ArticleID = dbo.mw_ArticlesVersions.ArticleID AND

dbo.mw_ArticlesVersions.Approved = 1



View 3 Replies View Related

Index Question In Date Feild

Feb 26, 2003

Hi,
I have a stored procedure and using various where condition and all have proper index(clustered).
All columns are doing clustered index seek but only the date column doing index scan.
If I forcing(hint) the index and getting better performance but still that doing cluster index scan.

Why I am having problem whith this date field?
and How can able to make it index seek instead of clustered index scan?.

View 6 Replies View Related

When A Feild Is Null I Do Not Want To See The Empty Cell And Titel In A Report?

Mar 29, 2007

Let's say I have three fields in a table like this...



Name

Tell us about cats

Tell us about dogs



Now I have two records.



Name Billy Bob

Tell us about cats I do not have any Cats

Tell us about dogs "null"





Name Joe Slick

Tell us about cats "null"

Tell us about dogs they sure chase Cats a lot.


I want my report to generate like this:



Name Billy Bob

Tell us about cats I do not have any cats



Name Joe Slick

Tell us about dogs they sure chase cats allot.



How do I omit null fields in a report including the field description? I am pretty flexible and I am willing to explore using ASP.Net, asp, html, VS2005 ? Or please tell me a program to use. I have a lot of reports to create. The data base is MS SQL 2005. The reports need to be published to the web. Can anyone suggest the best method?

View 3 Replies View Related







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