US / CANADA States Organized For DropDown--HELP????

Oct 30, 2004

I feel real bad asking this...but I have a state table...ordered by State ASC


and it mixes US and Canada, of course. I want to set up a table and a


stproc to produce a dropdownlist that looks like this (as I've seen in many


websites' state tables):





United States --


Alabama


Arizona


...


Canada --


Alberta


...





...and so on, so that the country is listed as a heading with no state code value


and the states each appear in asc order under the country heading. I don't know


how to do this. Does anyone have a good example of how to do this?





Thx much,


reid C.

View 2 Replies


ADVERTISEMENT

Daylight Saving Time Changes For US And Canada

Jan 12, 2007

I thought I would post this just in case you are not aware of the change of the Daylight Saving Time start and end dates in 2007. This is really an OS problem, not a SQL Server problem, but it could have a big impact on your applicaitons if you are not prepared. The first change is less that 2 months away, so it's not a bad time to give it some thought.


Here are some articles about preparing systems for the 2007 daylight savings time changes that you might find of interest.

Preparing for daylight saving time changes in 2007:
“Starting in the spring of 2007, daylight saving time (DST) start and end dates for the United States will transition to comply with the Energy Policy Act of 2005. DST dates in the United States will start three weeks earlier (2:00 A.M. on the second Sunday in March) and will end one week later (2:00 A.M. on the first Sunday in November).

Microsoft will be producing an update for Microsoft products affected by the new United States daylight saving time transition dates. These updates will be released through a combination of channels including Microsoft Customer Support Services (CSS), hotfixes incorporated in Knowledge Base articles, Windows Update, Microsoft Update, Windows Server Update Services (WSUS), and the Microsoft Download Center.?
http://www.microsoft.com/windows/timezone/dst2007.mspx


How to configure daylight saving time for the United States in 2007:
http://support.microsoft.com/?kbid=914387


Daylight Saving Time in Canada:
The article in the link below indicates that all Canadian provinces except for Nunavut have decided to follow the US daylight savings changes in 2007. The article contains links to news articles with official announcements of the changes.
http://en.wikipedia.org/wiki/Time_in_Canada












CODO ERGO SUM

View 2 Replies View Related

Transact SQL :: How Data Will Be Organized In MDF And NDF Files

Jun 30, 2015

If possible how data will be organized in MDF and NDF files. Because we have a MDF file and 11 ndf files. when we are loading the data into one table, it is using all the files in equal ratio. Is there any address reference of ndf files in MDF file?

View 5 Replies View Related

Table With Multiple Serviced States

Mar 8, 2008

I'm creating a database of truckers, which has company name, address, etc. I also want to include which states that they service.

For example:
Trucker A, services California, Nevada, and Oregon
Trucker B, services Nevada and Oregon
Trucker C, services Oregon
Trucker D, services New Mexico

When searching, if I'm looking for a trucking company that services Oregon, I run a search for Oregon, only Trucker A, B, and C will show up, but not Trucker D.

I created a table called truckers, with a primary key of Trucker_ID, put in columns, for company name, address, etc.

Next I create a table for the states, what’s the best way of creating that table?

Would I create a table with 50 different columns, putting in a State_Id column, and then relating Trucker_ID with State_ID, or is there a better way of going about that?

Thanks,

marly

View 3 Replies View Related

Service Broker Transaction States

Mar 16, 2007

WHILE (1 = 1)

BEGIN

BEGIN TRANSACTION ;

DECLARE @ErrorM NVARCHAR(4000),@ErrorNumber INT, @ErrorSeverity INT,@ErrorState INT,@ErrorProcedure NVARCHAR(200);

declare @messageTypeName sysname

declare @ConversationHandle uniqueidentifier

declare @MessageBody xml

declare @ErrorMessage varchar(8000)

SAVE TRANSACTION UndoReceive ;

WAITFOR ( RECEIVE TOP(1) @messageTypeName = message_type_name,

@messageBody = message_body,

@conversationHandle = conversation_handle

FROM [Queue]), TIMEOUT 500 ;

IF @@ROWCOUNT = 0

BEGIN

ROLLBACK TRANSACTION ;

BREAK ;

END ;

IF (@messageTypeName = 'RMIS_IBT_Msg')

BEGIN

BEGIN TRY

EXEC Eur_SYS_ImportTillIBTFromXML @MessageBody

END TRY

BEGIN CATCH

ROLLBACK TRANSACTION UndoReceive ;

SELECT @ErrorMessage = 'XML Failed to process with errorNO:' + CAST(ERROR_NUMBER() as VARCHAR(10)) + ' SEVERITY:' + cast(ERROR_SEVERITY() as varchar(10)) + ' State:' + Cast(ERROR_STATE() AS Varchar(10)) + ' Procedure:' + ISNULL(ERROR_PROCEDURE(), '-') + ' Message:' + ERROR_MESSAGE()

INSERT INTO SB_ERRORMSG (conversation_handle,MSG_Type,msg_data,date_created,ErrorTxt)

VALUES (@ConversationHandle,@messageTypeName,@MessageBody,GETDATE(),@ErrorMessage)

END CONVERSATION @conversationHandle WITH ERROR = 500 DESCRIPTION = 'Unable to process message.'

END CATCH ;

END

The above code is an example of my que handling procedure. i.e mark transaction call an sp to process the message if it errors rollback to the mark and put in a table for valuation. the problem i am having is the message handling sp can call another sp (i have put transction marks and error handling in) but they still fail and do an entire roll back i.e get this error

Msg 3931, Level 16, State 1, Line 10

The current transaction cannot be committed and cannot be rolled back to a savepoint. Roll back the entire transaction.

This then rolls back the entire transactiom and does not take the message of the queue thus it becoming a poison message.I would like to know is if any dequeing procedures fail (nested and at any level) how can i get the xml into an error table and message off the que without it disabling my queue.

View 6 Replies View Related

CLR_Auto_Event And CLR_Manual_Event Wait States

Mar 10, 2008

Hello,

I'm hoping someone can clarify what I am seeing below:

I have a SQL Server which the 2nd top wait state according to the SQL Server 2005 SP2 dashboard is "CLR_Auto_Event" and "CLR_Manual_Event". This server dosen't have CLR Integration enabled in "Surface Area Configuration", and we do not have any CLR applications. I've checked this dashboard many times and CLR never appeared before, and nothing has changed on the server interms of new databases, and we don't host any applications on the server. I ran a short profiler trace and didn't see any CLR Assembly Loads.

Is there something I'm missing....?

View 6 Replies View Related

SQL 2012 :: Bringing Up A List Of States From Three Columns

Nov 13, 2014

Supposing there are three Columns: Countries, Provinces and States.Then when the user enters “USA” for country, it will bring up a list of states, if they enter “Canada” for country, it will bring up a list of provinces, if they enter another country, it will not bring up any list?

View 2 Replies View Related

MSDE Install && Connection OK - Icon States Not Connected

May 22, 2004

Hi All

I installed the following in order:

1. .NET Framework Version 1.1 Redistributable
2. .NET Framework Version 1.1 Software Development Kit (SDK)
3. MSDE 2000 Rel A

In the command window I changed to the directory where MSDE 2000 Rel A was installed and typed in this:

setup.exe INSTANCENAME=MyDb DISABLENETWORKPROTOCOLS=1 SAPWD=<My SA PASSWORD>

MSDE installed successfully and the little icon appeared in the system tray, next to the clock. However, there was no little green arrow/triangle showing on the icon to show connection status as Connected.

4. ASP.NET Commerce Starter Kit

During the Starter Kit install a Connect to Database window opened - Connect to SQL or MSDE.

In the 'Server' field the following was automatically displayed:

STEVE-HOME/MyDb

Where STEVE-HOME is the name of my computer (changed from 'localhost') and MyDb is the instance name.

Thw 'Windows Authentication' radio button was selected by default. I left this unchanged, then clicked OK.

A window opened asking to test the connection. I clicked OK and the connection was successful.

(I didn't select the SQL Server authentication or enter a username, password or select a Database.)

The Starter Kit installed successfully and works fine. However, the SQL Server Service Manager icon states it is not connected when I mouse over it.

I opened the SQL Server Service Manager window and the Server and Services fields are blank.

Surely the Starter Kit wouldn't work if MSDE wasn't connected.

Can anyone advise on how to get the icon to show it is connected

Your help would be greatly appreciated.

View 1 Replies View Related

Make A Check Constraint That States First 3 Characters Of CustomerID Field

May 5, 2015

I have a table where i have to make a check constraint that states the first 3 characters of the customerid field must be the first 3 characters of the company name I am so lost I looked everywhere.

View 2 Replies View Related

PMML: One Node In A Decision Tree Containing Two States Of An Attribute As The Rule For Splitting?

Sep 22, 2006

Hi,
is there a way to import a decision tree-model from pmml where a node contains two or more states of an attribute as the split-rule?


Example:

...
<Node recordCount="600">
<CompoundPredicate booleanOperator="or">
<SimplePredicate field="color" operator="equal" value="red" />
<SimplePredicate field="color" operator="equal" value="green" />
</CompoundPredicate>
<ScoreDistribution value="true" recordCount="200"/>
<ScoreDistribution value="false" recordCount="400"/>
</Node>
...

This node shoud contain all cases, whose color is red or green (The Microsoft DecisionTree-Algorithm would build a model with two steps like red/ not red and then green / not green). According to the DMG, this is valid PMML 2.1, but when trying to import the server complains about an unexpected value in the SimplePredicate-tag.

How can i import such a node in SqlServer 2005?

Thank you in advance for any help

Chris

View 8 Replies View Related

Selected Value Of Dropdown

Feb 20, 2007

How would I reference the selected value of a dropdown parameter in SSRS using VS2005?

For instance, the city Miami is selected I want to find out if both dropdowns match eachother...

iif(dropdown1.selected.value = dropdown2.selected.value,false,true)

View 9 Replies View Related

Dropdown List Values

Apr 28, 2007

Dear Readers of this post,
 
I have a dropdownlist that is populated with an sqldatasource as follows:
 
SELECT [Project_ID], [Title] FROM [Projects] WHERE [Username] = @Username AND Hide ='false'
 
The Datavalue vield of the DDL is populated with the [Title].
 
When the user submits the form [including the value of the of the drop down list] i want to be able to add the Project ID and the Title Values into another database table.
 
any ideas
 
Sat

View 3 Replies View Related

Ndinakar - Third Dropdown Has Me Beat

Oct 23, 2007

Hi Folks,
 Trying to setup a Third dropdownlist now to feed from the selection of my second dropdownlist which feeds off my first dropdown if that makes sense
 Do i need to somehow put in some code to add the first and second dropdownlist values to make the third
 How do i add two Dropdownlists values to create the third?
I'm new to all of this so please go easy. Much appreciated.
Thanks,
Sully
 

View 1 Replies View Related

Populate Dropdown Box From SQL In Web Matrix?

Jan 22, 2004

I have been attempting to populate a dropdown (combo) box from a SQL query (SQLConnector) in Web Matrix and I have so far been unsuccessful. I have been able to populate a DataGrid just fine from the query, so then I limited it down to one colum (so itd be in the dropdown box) and set all the properties I could find (DataSource, DataMember, DataTextField, DataValueField) (and in all possible combinations) for that dropdown box to the SQL stuff (SQLConnector for the DataSource and then used the dropdowns for the others), and nothing shows up in my dropdown box. How can I make this populate off of my SQL query properly?

Additionally I will need to do the same thing for a Checkbox List so if it is the same and you know how to do that and could let me know for that too that'd be great.

Thanks a million in advance!

View 1 Replies View Related

DropDown List Values

Nov 22, 2005

For a controlParameter in the ASP code, how do I retreive the selectedValue of the drop down list?Would this work?
<asp:controlParameter Name="InvoiceNumber" Type="String" ControlID="ddAdSize.Value" />

View 1 Replies View Related

Dropdown Other Options..how To Store?

Jun 2, 2005

Hi
Often we come across a form with a dropdown list (populated from a lookup table) with "Other" option as well. When user selected "Other" option a textbox appears where he can specify new option(This option is not to be added to master lookup table).

What is the best way to store it in database?
I have 2 columns (A and B). 'A' contains Lookup ID if some option other than "Other" is selected, else 'A' has NULL and 'B' field contains the text of Textbox.

But while reporting I face problems as in a report the selected option text (either 'A' or 'B') has to be shown under one column only but SELECT A,B results in 2 columns.

View 1 Replies View Related

Dropdown List Issue

Dec 26, 2007

Hi All,

I am having the following issue with one of my reports using Reporting Services 2005. When you chose a value from dropdown list , the page reloads but the dropdown list does not keep the value selected. It always display the first item from the dropdown list.

Any idea?

Thanks!
Gonzalo

View 1 Replies View Related

Dropdown Menu In Sql Reporting

Jan 22, 2007

Is it possible in SQL Reporting 2005 to have dropdown menu(eg..on mouseover list of static menu appears from which i can navigate to other rdl files while passing all parameters) ..



View 4 Replies View Related

What Does Data Region Dropdown Do?

Jan 30, 2008

Hi,

I have a table1 which points to a dataset1

I was wondering how I use the 'data region' dropdown selection which is present when i click the properties of a cell in table1, it always appear to be blank.

I would like to know how this works as i feel it will be useful in specifying various data regions within a table, I cant seem to find any relevant information on it, can someone tell me how this works ?



View 3 Replies View Related

Dropdown List Width

May 11, 2007

Hi everybody,

I created a multivalue parameter in SSRS 2005 SP2, but the problem is that the width of the dropdown list is too small to fit my data (I'd like to avoid scrolling horizontally).

Is there any way to configure this?

Thanks in advance for your help.
Zoz

View 3 Replies View Related

If Textbox Is Null Post From Dropdown Box

Jul 21, 2007

I've got two tables, the first is a list of locations and the second is where i would enter new information (ie name and chosen location).  Could some help me straighten out my code so that when button is clicked name and either the location text box is stored or if the location text box is empty the chosen location from the drop down box is stored.  Here is my code and thanks for the help.
 
<%@ Page Language="VB" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">Protected Sub submit_Button_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Try
'declare a connection to database
Dim sqlCn As New Data.SqlClient.SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Database.mdf;Integrated Security=True;User Instance=True") 'connection string for sql server 2005
'open connection
sqlCn.Open()
'declare a command to fire against databaseDim sqlCmd As New Data.SqlClient.SqlCommand("Insert Into Locations (Locations) VALUES (@Locations)", sqlCn)
Dim sqlCmd2 As New Data.SqlClient.SqlCommand("Insert Into Results (Results) VALUES (@Results)", sqlCn)
'add the parameters to sql commandsqlCmd.Parameters.Add(New Data.SqlClient.SqlParameter("@Locations", newlocation_TextBox.Text.Trim))sqlCmd2.Parameters.Add(New Data.SqlClient.SqlParameter("@Results", name_TextBox.Text.Trim))
 
'execute the command
sqlCmd.ExecuteNonQuery()Catch ex As Exception
'error occured
Response.Write(ex.Message)
Exit Sub
End TryEnd Sub
</script><html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server"><title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
Please choose a location <asp:DropDownList ID="locationDropDownList" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource1" DataTextField="Locations"
DataValueField="Locations">
</asp:DropDownList>
 
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DatabaseConnectionString %>"
SelectCommand="SELECT DISTINCT [Locations] FROM [Locations] ORDER BY [Locations]">
</asp:SqlDataSource>
..or add a new one:
<asp:TextBox ID="newlocation_TextBox" runat="server"></asp:TextBox>
<br />
Enter your name:
<asp:TextBox ID="name_TextBox" runat="server"></asp:TextBox>
<br />
<asp:Button ID="submit_Button" runat="server" Text="Submit" OnClick="submit_Button_Click" /></div></form>
</body>
</html>

View 3 Replies View Related

How To Populate A Dropdown Box Based On SQL Data?

Dec 16, 2003

How can I populate options in a dropdown (combo?) box based on data pulled from a SQL database compared against certain paramaters (if it is not equal to x, equal to y, etc)?

Thanks.

View 2 Replies View Related

Dropdown List And Data From A Table

Feb 2, 2004

Hi masters

well got a SQL server 7 and a table

and got drop down list in my asp page

what I want to do is that the content and value of the drop down list will be grabbed from the database, when page loads.

can you please guide me

many thanks

S

View 1 Replies View Related

How To Populate Table From Dropdown List?

Oct 18, 2005

Hi,I have table (tbl_a) that get it values form three Dropdown List and the PK of this table is FK in different table(tbl_b).Since tbl_a get its values from three Dropdown List the number of rows in this table is limited to the number of combinations the three Dropdown List is offer (in any case the number of raws in that table will be final).Assuming tbl_a and tbl_b are both empty.
The problem is that if i want to insert row to tbl_b i have to check first if there is a row that holds the values (or combination of values) i am getting from the Dropdown List in tbl_a .Then, if such row is exist i have to get the PK of that raw and insert it to tbl_b (as FK),if such row does not exist, i have to insert it and then get the PK of this row and insert it to tbl_b (as FK).
In the end, tbl_a will have all the combination the three Dropdown List can offer so checking if raw exist in this table will not be necessary.
In my opinion this is not effective way to do that.Can someone offer me better way to do it?
Thanks

View 6 Replies View Related

Select Statement For Dropdown List

Apr 4, 2006

I have a dropdown list that is populated by two columns in a database.select (firstname+surname) AS Fullname from table where id = 'id';
It works fine but i want to know how i would get a space between the firstname and the surname because at the moment all the values come back as JoeBloggs....without any spaces

View 1 Replies View Related

How To Populate Table From Dropdown List?

Oct 18, 2005

Hi,
I have table (tbl_a) that get it values form three Dropdown List and the PK of this table is FK in different table(tbl_b).
Since tbl_a get its values from three Dropdown List the number of rows in this table
is limited to the number of combinations the three Dropdown List is offer (in any case the number of raws in that table will be final).
Assuming tbl_a and tbl_b are both empty.

The problem is that if i want to insert row to tbl_b i have to check first if there is a row that holds the
values (or combination of values) i am getting from the Dropdown List in tbl_a .
Then, if such row is exist i have to get the PK of that raw and insert it to tbl_b (as FK),
if such row does not exist, i have to insert it and then get the PK of this row and insert it to tbl_b (as FK).

In the end, tbl_a will have all the combination the three Dropdown List can offer so checking if raw exist in this table will not be necessary.

In my opinion this is not effective way to do that.
Can someone offer me better way to do it?

Thanks

View 5 Replies View Related

DBs Not Appearing In Query Analyer Dropdown

Jul 23, 2005

A couple of databases on one of our SQL Servers is missing in the dbdropdown in query analyzer.Does anyone know what I need to update to sync this with the actualdatabases?Thanks,Burt

View 1 Replies View Related

Adjusting Parameter Dropdown Width

Oct 25, 2007

Hi there,
May be a kind of dumb question, but I have a multi-value parameter that I would like to give users the ability to select from in a SSRS 2005 Report and I was wondering if there was a way to adjust the width of the drop down so the user wouldn't have to scroll horizontally to see a full parameter item. It looks like it cuts off after about 30 characters.

Any help here would be appreciated.

Thanks!
Rich

View 1 Replies View Related

DropDown Filter In Report Builder

Jan 10, 2008



Guys,
In my report builder when I drag the SKU in the filter area, its doesnt give me the dropdown and show me the distinct values, it just gives me a text box and expects me to type in the SKU.
I have other attributes whcih have the same property as SKU but they all work fine when I drag them into Filter area.

Is there a limitation in reporting svcs where if the Field has more than "n" number of distinct records it will not populate the dropdown, instead just present you with a text box?

My DataModel Table has around 110K records and roughly 7K distinct SKU's

I compared the SKU field to other fields in the Report Model Designer and also DataSource View and nothing seems to be out of normal to not show the dropdown with distinct values except for the # of distinct records.

Appreciate your help in advance



View 4 Replies View Related

Width On Multivalued Dropdown Menu

Nov 28, 2007

I have a multivalued drop down menu that isn't wide enough to display the entire label. It only displays about half of the label. The text it is trying to display should look like "Global Zone 1 - Global Zone 2 - Global Zone 3 - Global Zone 4", and the only visible text is "Global Zone 1 - Global Zone2". It does have a scroll bar at the bottom, but it is ridiculous.

When I set it to not be multivalued, the drop down menu grows to the size of my label. The menu has plenty of space to grow, it is only taking up a very small amount of the screen.

Is there any way to correct this issue?

Thanks

View 1 Replies View Related

Parameter DropDown List Grayed-out

Dec 12, 2007



I am building a report with several search parameters; three of which are dropdown boxes each populated by a data set. I wanted something more user-friendly than the default "(Null)" in the dropdown, so for each data set, it returns a result set UNIONed with " N/A" to show up first as the default.

For some reason, when the report loads, the first dropdown populates just fine and does indeed have the default value " N/A" but the other two dropdowns are grayed-out. Until you change the first dropdown (to anything, apparently it doesn't matter what you change it to) the other two stay grayed-out. When the first is changed, the other two are populated and default to the desired " N/A" default value.

Why would it do this, when it didn't do it before; i.e. when the default for all of them was simply null. The dropdowns are not dependent on each other; they don't depend on other parameters for their values. Any help would be appreciated.

View 2 Replies View Related

Special Characters In A Dropdown List

Nov 2, 2006

I have a web form that needs to be bilingual. It contains several dropdown lists. The "text" and "value" for each item in the dropdown list is retrieved from a database. The logic reads the database and then populates the various dropdowns with logic such as:

dim newItem as new ListItem(textString, valueString)

theDropDown.items.add(newItem)

The problem that I am having occurs when the textString needs to contains special characters such as accented vowels or an "n" with a tilde. I have tried populating the database with HTML-formatted strings such as "Avi&oacute;n", hoping that this would display "Avion" with an accute accent over the "o". Unfortunately it displays "Avi&oacute;n".

How do I get dynamically-created dropdowns to display special characters? If the answer is to simply store the special characters directly in the database, then the question becomes how do I get the special characters into the database? I tried to figure out how to write a T-SQL command such as

update tablex set SpanishName = 'Avion' where id=999

but I can't figure out the syntax to insert an accented 'o' into the string.

Thanks.

View 4 Replies View Related

Analysis :: Dimension Errors In Dropdown

Sep 1, 2015

I am getting the dropdown of the dimension folder twice, as i took printshot from client tool. In SSMS/bids also its showing this error. How to resolve it.

View 9 Replies View Related







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