Separate Dropdown List Selectedvalue Into Two Fields

Aug 1, 2006

i have two columns in a "release" table that i concatenate on my aspx page into one value for my dropdown list.  for example, my database columns might look like

Major: 3 | 3 | 4 | 4 | 5
Minor: 1 | 2 | 1 | 2 | 1

and my drop down list text like
3.1 | 3.2 | 4.1 | 4.2 | 5.1

my question comes when trying to take the drop down list's selected value and splitting it back into two fields so that i can use it for another query.  how can i split my "major" and "minor" version numbers back up so that i can run a query similar to:

SELECT * FROM [Version] WHERE (([Major] = @Major) AND ([Minor] = @Minor))

but only having the one parameter of: <asp:ControlParameter ControlID="ddlVersion" Name="Version" PropertyName="Text" Type="String" /> where the selected value has a string of "<major>.<minor>" (where the numbers are separated by a period)?

View 6 Replies


ADVERTISEMENT

Subreports: Parameter Value Dropdown Shows Sum And Count Fields But Not The Actual Data Fields.

Jan 28, 2008


I have just started using SQL Server reporting services and am stuck with creating subreports.

I have a added a sub report to the main report. When I right click on the sub report, go to properties -> Parameters, and click on the dropdown for Parameter Value, I see all Sum and Count fields but not the data fields.

For example, In the dropdownlist for the Parameter value, I see Sum(Fields!TASK_ID.Value, "AppTest"), Count(Fields!TASK_NAME.Value, "CammpTest") but not Fields!TASK_NAME.Value, Fields!TASK_ID.Value which are the fields retrieved from the dataset assigned to the subreport.

When I manually change the parameter value to Fields!TASK_ID.Value, and try to preview the report, I get Error: Subreport could not be shown. I have no idea what the underlying issue is but am guessing that it's because the field - Fields!TASK_ID.Value is not in the dropdown but am trying to link the main report and sub report with this field.

Am I missing something here? Any help is appreciated.

Thanks,
Sirisha

View 3 Replies View Related

SQL 2012 :: List All Different Values That Go With Single CAS ID To Appear As Comma Separate List

Jun 15, 2015

So at the moment, I don't have a function by the name CONCATENATE. What I like to do is to list all those different values that go with a single CASE_ID to appear as a a comma separate list. You might have a better way of doing without even writing a function

So the output would look like :

CASE_ID VARIABLE
=====================
1 [ABC],[HDR],[GHHHHH]
2 [ABCSS],[CCHDR],[XXGHHVVVHHH],[KKKJU],[KLK]

SELECT
preop.Case_ID,
dbo.Concatenate( '[' + CAST(preop.value_text AS VARCHAR) + ']' ) as variable
FROM
dbo.TBL_Preop preop
WHERE
preop.Deleted_CD = 0

GROUP BY
preop.Case_ID

View 8 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

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 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 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

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

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

Trying To Populate Dropdown List From SQL Data Source

Apr 8, 2008

I am trying to populate a dropdownlist from a sql data source in my codebehind using c#.  I thought I had the code correct but I keep getting the following error and I am stuck:  "Only assignment, call, increment, decrement,  and new object expressions can be used as a statement"
 Here is the code:protected void populateOppNameList(){
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);SqlCommand cmd = new SqlCommand("SELECT empname FROM opportunity WHERE (username = " + userName + ")", conn);
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
try
{
conn.Open();DataSet ds = new DataSet();DropDownList ddl_OppNames = (DropDownList)FormView1.FindControl("dropdownlist1");
ddl_OppNames.DataSource = ds;
ddl_OppNames.DataBind;}catch (Exception e)
{
}
finally
{if (conn != null) { conn.Close(); }
}
 
}

View 11 Replies View Related

Oleddb Dropdown List Is Empty In Excel

Sep 27, 2006

Hello,

I have an issue with connecting Excel to an analysis Services 2005 database. The computer is running Windows XP Sp2 and Office XP. I installed the oledb driver 9.0 but when I tried to connect with the pivot table and I want to create the connection, the dropdown list of the data provider is empty. I tried on another computer with Excel XP and the system is working fine.
Is there somebody that could help?

Thank you

View 2 Replies View Related

Populate Dropdown List With Dimension Hierarchies

Dec 17, 2006

Hi,

I am currently trying to develop an application which would help in retrieving data from cubes (Microsoft Analysis Services)! The user would not be accessing the Business Intelligence Studio, etc. but would be viewing the data from a custom made application developed in VB.Net2005.

While implementing this, I want to populate the drop-down-list in the VB(.Net) Form, by retrieving the various hierarchies in the dimensions of the cubes (along with dimensions if possible). This should be done dynamically and in real-time!

Can you please help in implementing this? Any code/method, etc would be highly appreciated!

Thanks in advance.

Best wishes!

(Software : SQL Server 2005 Enterprise Edition (with Analysis Services and BI Studio), VS.Net 2005 Enterprise Edition, ADOMD.Net)

View 1 Replies View Related

Without Checkbox Leftside Of The Dropdown Value List Of The Parameter

Feb 5, 2007

Hi,

I believe somebody know the reason. Please help me on it!

I plan to pass a multivalued parameter from my web application to the server report, and let user select the value(s) from the value set. But when I run the report, there's no checkbox leftside of the values, that means user has no choice on this parameter.

Is there any way to do it?

Thanks,

Jone

View 2 Replies View Related

ForEach File In Folder - Missing From Dropdown List

Jun 28, 2007

I'm working through the SSIS tutorial, and am on lesson 2.
This says
"Double-click Foreach File in Folder to reopen the Foreach Loop Editor.

Click Collection.

On the Collection page, select Foreach File Enumerator."

The drop down only contains

foreach ado enumerator
foreach ado.net schema_rowset.enumerator
foreach from variable.enumerator
foreach nodelist.enumerator
foreach smo.enumerator


How do I get the "foreach file in folder" to appear in the drop down list?

Gary

View 3 Replies View Related

Transact SQL :: Get Query By Selecting Month From Dropdown List And Display Records?

Oct 8, 2015

Im trying to get query by selecting the month from dropdownlist and display the records .by using the below query I need to enter the date in tecxtboc then it will show the output

select Standard, Total, MonthName
from (SELECT Standard, COUNT(Standard) AS Total,
datename(month, ReportDate) as [MonthName]
FROM CPTable where
ReportDate >= @ReportDate

[Code] .....

View 5 Replies View Related

Report Designer: Need To List Fields From Multiple Result Rows As Comma Seperated List (like A JOIN On Parameters)

Apr 9, 2008



I know I can do a JOIN(parameter, "some seperator") and it will build me a list/string of all the values in the multiselect parameter.

However, I want to do the same thing with all the occurances of a field in my result set (each row being an occurance).

For example say I have a form that is being printed which will pull in all the medications a patient is currently listed as having perscriptions for. I want to return all those values (say 8) and display them on a single line (or wrap onto additional lines as needed).

Something like:
List of current perscriptions: Allegra, Allegra-D, Clariton, Nasalcort, Sudafed, Zantac


How can I accomplish this?

I was playing with the list box, but that only lets me repeat on a new line, I couldn't find any way to get it to repeate side by side (repeat left to right instead of top to bottom). I played with the orientation options, but that really just lets me adjust how multiple columns are displayed as best I can tell.

Could a custom function of some sort be written to take all the values and spit them out one by one into a comma seperated string?

View 21 Replies View Related

Firefox In Mac Fails To Render Scrollbar In The Multi-value Parameter Dropdown List Generated By ReportViewer.

Mar 10, 2008

Our clients working with the Firefox browser on a Mac are unable to use the Multi-Value parameter drop down lists that the Report Viewer control generates. Of course I realize that the multi-select dropdown lists are not really dropdown option lists using the standard HTML select tag, but are rather tables within div tags with cells that contain spans, inputs, and labels.

Originally the report viewer displayed these lists in the wrong position within Firefox on any platform (Mac or PC). Furthermore, there were other visibility problems with those lists that made it virtually impossible to select a checkbox within the list. Fortunately, Microsoft fixed this problem with the latest version of Report Viewer, which we downloaded from the following link:
http://207.46.19.190/downloads/details.aspx?FamilyID=cc96c246-61e5-4d9e-bb5f-416d75a1b9ef&displaylang=en

So currently we have SQL Reporting Services Report Viewer 9.0.21022.8 installed on our web server. And the dropdown lists do appear as expected, and they work properly in Firefox on a PC.

But, when the control is rendered in Firefox on a Mac, the list is not scrollable. The scroll bar that should appear on the right-hand side of the dropdown list, which would enable users to select values toward the bottom of the list, does not appear. That scrollbar is missing in Firefox.

This is likely related to a Firefox rendering issue with the overflow:auto style. There are numerous entries on the web that indicate Firefox for Mac has a problem with overflow:auto. For example:
http://www.webdeveloper.com/forum/archive/index.php/t-96958.html
http://www.daniweb.com/forums/thread44144.html
http://iamthewalr.us/blog/2007/04/20/firefox-on-the-mac/#comment-2321
http://www.errorforum.com/mozilla-firefox-error/3503-will-float-mac-firefox-scrollbars-floating-pop-up-windows.html
https://bugzilla.mozilla.org/show_bug.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&id=187435


That being the case, it seems that there should be some workaround to address this, either via a style or through some alternate control. Or perhaps there is a property that we can apply to the ReportViewer control that I'm unaware of which addresses this.

If you know of a workaround, or can suggest an alternate approach that we could implement quickly, please respond. Thanks.

View 1 Replies View Related

Separate Fields Into Rows

Sep 18, 2006

I have a table with accountid and labtype
However inside of the labtype is data separated by semicolons like below

GIV;APS;LSL. What would be the best way to return this data as multiple rows such as

acctid lab
100 GIV
100 APS
100 LSL

Thee may be from 1-10 values in the labtype field

View 1 Replies View Related

Separate Email List For Errors

Apr 4, 2008

Hello All,
I have an email subscription set up in Report Manager. Sometimes, when report execution fails, is there a way to sent the failure notification to a separate email list? Something like:
on errror, send to abc@abc.com
on success send to xyz@xyz.com?

Thanks
Phewa

View 1 Replies View Related

BETWEEN With Date/Time In Separate Fields

Apr 22, 2008

My group is working on a project for school and neither of us have much experience with SQL or ASP. We are pretty much just writing an SQL query to get the data in a certain date range and using ASP to write the tables with the data in it.

Our problem is the SQL database has separate fields for date and time. There is nothing we can do about this because the VB.NET program that populates the tables automatically does this. We can't figure out how to do the BETWEEN statement when they are separate fields. We can do it for a date range and it works fine. An example of what we want to do is show the data from 11:00 am on 04/01/2008 until 4:00pm 04/03/2008.

Does anyone have any idea what we can do? I really want to learn this but it's frustrating because we can't seem to get much help at school.

View 5 Replies View Related

How To Create Two Separate Fields From The Data?

Aug 2, 2007

Can anyone please help me with the following:


I have a table which has fields called defid, datavalue, pid etc.
I have to create a new table which should have fields:
CustID, datavalue[SocSec]{note:this is the value in d.datavalue when defid is 1004), datavalue[FirstName]{note: this is the value in d.datavalue when defid is 1006}, datavalue[LastName]{note: this is the value in d.datavalue when defid is 1007}, [FullName] {note: this is the value I should get by joining the datavalues (lastname and firstname) when defifis 1006 and 1007) ie. ex: FirstNameLastName.

COULD ANYONE PLEASE HELP ME ON THIS. DATA QUERY is as follows:
Thank you in advance.

SELECT DISTINCT c.CustID, d.datavalue, f.name
FROM dbo.Customers c
INNER JOIN dbo.Date7 d ON d.pid = c.root
INNER JOIN dbo.fielddisc f ON f.defid = d.defid
WHERE c.separatedate BETWEEN @StartDate AND @EndDate
AND c.DateTab = 7 AND d.defid IN (1004, 1006, 1007, 1009) AND c.CustID = 10 AND c.root = 8472
ORDER BY c.root

View 3 Replies View Related

Transact SQL :: Get Check Time From Separate Fields

Oct 14, 2015

I am using aloha POS and they have the date for every check in separate fields and now I want to calculate the total time for the checks but unable to get the how of it..

The date is DOB and it's datetime but I just need to extra the getdate() from it.The open time is OPENHOUR and OPENMINThe close time is CLOSEHOUR and CLOSEMIN

so basically the open time for the check will be the DATE FROM DOB + OPENHOUR + OPENMIN

And the close time will be DATE FROM DOB + CLOSEHOUR + CLOSEMIN

How can I get the total minutes for the check?

View 2 Replies View Related

How To Separate The DateTime Field Into Two Fields In View

Jun 21, 2006

Hi ,

I've a DateTime field in a table and I want to separate it into two fields in an SQL Server 2005 view one for Date and the other for Time so What is the function I can use to do this process?

Best Regards,

View 4 Replies View Related

SQL Server Admin 2014 :: Separate Max Fields From The Others To Another Filegroup?

Jan 18, 2015

we have many max fields in our database .

A role in performance says : It's better to separate this fields to another FileGroup with separate file.

Is the result good for performance? and what are the risks?

View 9 Replies View Related

Combine Separate Date && Time Fields Into One Datetime Field?

Dec 26, 2006

Good morning.I am importing an XLS file into one of my tables. The fields are:Date Id Time IO12/22/2006 2 12:48:45 PM 912/22/2006 16 5:40:55 AM 112/22/2006 16 12:03:59 PM 2When I do the import, I get the following:Date Id Time IO12/22/2006 12:00:00AM 2 12/30/1899 12:48:45 PM 212/22/2006 12:00:00AM 16 12/30/1899 5:40:55 AM 112/22/2006 12:00:00AM 16 12/30/1899 12:03:59 PM 2Here are my doubts:1. Would it be better to combine the Date & Time fields into onecolumn? If so, how?2. What issues or problems might I have when I program SQL reports, ifI leave the fields as they are?Any comments or suggestions will be very much welcomed.Cheers mates.

View 2 Replies View Related

Combine Separate Date &&amp; Time Fields Into One Datetime Field?

Dec 26, 2006

Good morning.

I am importing an XLS file into one of my tables. The fields are:

Date Id Time IO







12/22/2006
2
12:48:45 PM
9


12/22/2006
16
5:40:55 AM
1


12/22/2006
16
12:03:59 PM
2


When I do the import, I get the following:

Date Id Time IO
12/22/2006 12:00:00AM 2 12/30/1899 12:48:45 PM 2
12/22/2006 12:00:00AM 16 12/30/1899 5:40:55 AM 1
12/22/2006 12:00:00AM 16 12/30/1899 12:03:59 PM 2

Here are my doubts:

1. Is it be better to combine the Date & Time fields into one column? Advantages/Disadvantages?
2. If I don't combine them, should I use varchar or datetime data type?
2. What issues or problems might I have when I program SQL reports, if I leave the fields as they are?

Any comments or suggestions will be very much welcomed.

Cheers mates.

View 3 Replies View Related

NVarchar And SelectedValue And InsertCommand

Dec 19, 2007

Hi guys,I've got a  problem  inserting data into my db.I've created a NVARCHAR column and I'm using SelectedValue Parameters.I only have a problem in the INSERT mode.The UPDATE and DELETE are working fine.All the fields can be updated or deleted, but I can't insert new data inside my db.I've changed one column to NVARCHAR :   "reference"I use NVARCHAR because I have some Arabic Fields (unicode) into my db.But I've copy-pasted everything about the SqlDataSource.10x a lot anyway !  ASP.NET using MS Visual Studio 2005 :.... <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"        OldValuesParameterFormatString="original_{0}"        OnDeleted="SqlDataSource2_Deleted"        OnUpdated="SqlDataSource2_Updated"        OnInserted="SqlDataSource2_Inserted"        SelectCommand=            "SELECT [reference], [ddf], [description], [quantity], [pru], [supname], [catname]                FROM [Products]                WHERE ([reference] = @reference)"        InsertCommand="INSERT INTO [Products]                ([reference], [ddf], [description], [quantity], [pru], [supname], [catname])                VALUES (@reference, @ddf, @description, @quantity, @pru, @supname, @catname)"        UpdateCommand="UPDATE [Products]                SET [ddf] = @ddf,                    [description] = @description,                    [quantity] = @quantity,                    [pru] = @pru,                    [supname] = @supname,                    [catname] = @catname               WHERE [reference] = @original_reference"               DeleteCommand="DELETE FROM [Products] WHERE [reference] = @original_reference">                <SelectParameters>            <asp:ControlParameter ControlID="GridView1" Name="reference" PropertyName="SelectedValue" Type="String" />              </SelectParameters>                <InsertParameters>            <asp:Parameter Name="reference"                Type="String" />            <asp:Parameter Name="ddf"                Type="DateTime" />             <asp:Parameter Name="description"                Type="String" />            <asp:Parameter Name="quantity"                Type="String" />            <asp:Parameter Name="pru"                Type="Decimal" />              <asp:Parameter Name="supname"                Type="String" />              <asp:Parameter Name="catname"                Type="String" />        </InsertParameters>                <UpdateParameters>            <asp:Parameter Name="ddf"                Type="DateTime" />             <asp:Parameter Name="description"                Type="String" />            <asp:Parameter Name="quantity"                Type="String" />            <asp:Parameter Name="pru"                 Type="Decimal" />              <asp:Parameter Name="supname"                Type="String" />              <asp:Parameter Name="catname"                Type="String" />            <asp:Parameter Name="original_reference"                Type="String" />           </UpdateParameters>                <DeleteParameters>            <asp:Parameter Name="original_reference"                Type="String" />        </DeleteParameters>            </asp:SqlDataSource>SQL SERVER 2005 : Create Database FileUSE masterGOIF EXISTS(SELECT * FROM sysdatabases        WHERE name='Products')    DROP DATABASE ProductsGOCREATE DATABASE ProductsON (    NAME=Product,    FILENAME = 'C:WebAppApp_DataProducts.mdf',    SIZE=10 )GOUSE ProductsGOCREATE TABLE Categories (    catname         VARCHAR(25)     NOT NULL,    PRIMARY KEY (catname) )GOCREATE TABLE Suppliers (    supname        VARCHAR(25)    NOT NULL,    tel            VARCHAR(50)    ,    cell        VARCHAR(50)    ,    fax            VARCHAR(50)    ,    pob            VARCHAR(25)    ,    address        VARCHAR(300)    ,    nearby        VARCHAR(100)    ,    website        VARCHAR(100)    ,    email        VARCHAR(100)    ,    skypephone    VARCHAR(100)    ,    PRIMARY KEY (supname) )GOCREATE TABLE Products (    reference     NVARCHAR(25)     NOT NULL,    ddf         DATETIME        NOT NULL,    description VARCHAR(50)     NOT NULL,    quantity     VARCHAR(10)     NOT NULL,    pru         MONEY             NOT NULL,    supname        VARCHAR(25)    NOT NULL,    catname        VARCHAR(25)        NOT NULL,    pv            MONEY            NOT NULL,    PRIMARY KEY(reference),    FOREIGN KEY(catname) REFERENCES Categories(catname),    FOREIGN KEY(supname) REFERENCES Suppliers(supname) )GO 

View 3 Replies View Related

TSQL - Trim String Containing Both Data And Value Into 2 Separate Data Fields

Aug 20, 2007

Hi!
Need help with this one:
I have a column with a string composed by several data. After using REPLACE several times, I get something like the data below, which has (in most of cases) a value and a date.








378 9/05

388 9/05

4/05

1/06 606

1/06 646

76 5/05

100 1/05

118 8/05

129 8/05

9/05 342

05/3 123

1/07

4/06 164
The problem is that I need to get each value alone (to separate columns), in example:
Value Date
378 09/2005
388 09/2005
0 04/2005
...
606 01/2006

and so on...
In addittion you can see that sometimes the Value come first or alone, and sometimes the Date come first or alone.

I will appreciate any good ideas,
Thanks in advance,
Aldo.


View 3 Replies View Related

List With Locations And How Many Fields Have This As Their Location

Jun 18, 2008

Hello
I have a table with inventory where each item has a field called location. What i would like to do is to get a summry with how many items there are in in each location. All the data is stored in one single table named article. inside this table i have Counter (PK), Artnr, location, type and some other things. 2 other importent columns are date and interval. Date is the last time the item was inspected and interval is an integer saying how many months untill the next inspection. So i guess Counter, location, date and interval, are the ones i need to use in my query to do the following.
Wo what i would like to do is to present a short list with all locations and then a number that says how many items need inspection in 3 months or less (and even items that have apssed their date). Im somewhat new to sql so iv only been doing the regular insert, delete and update here and there but i have a feeling this query is a bit more complicated. The list does not need to say what items needs inspection. I only need to know how many.
Could anyone help me out with constructing this query?

View 2 Replies View Related







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