How To Grab Specific Data

Aug 4, 2014

<Hello currency 988 v=""/><hello::Value v="0"/><Arrival Code v="ABC"/>
<Hello currency 988 v=""/><hello::Value v="0"/><Arrival Code v="KJHKH"/>
<Hello currency 988 v=""/><hello::Value v="0"/><Arrival Code v="POJ"/>
<Hello currency 988 v=""/><hello::Value v="0"/><Arrival Code v="AKJFISM"/>
<Hello currency 988 v=""/><hello::Value v="0"/><Arrival Code v="PM"/>

how can i only grab the arrival code?

newColumnArrivalCode
ABC
KJHKH
POJ
AKJFISM
'
'
'
'

View 4 Replies


ADVERTISEMENT

How To Grab In Between Data

Mar 25, 2014

I have a list of data sample as below:

MYDATA
2/26/2014 19:35:0 2/26/2014 19:35:0 2/26/2014 22:25:0 UK AUS start end
3/1/2014 9:20:0 3/1/2014 9:20:0 3/1/2014 10:5:0 AUS UK start end

How can I only grab as below:

newColumn
UK AUS
AUS UK

View 8 Replies View Related

Is It Possible To Grab Data From 2 Different Databases

Jan 28, 2004

Hello-

I have a chart I am producing in .net and I need to values. The problem is the values (sums) i need are on 2 different servers. Is there any where to combine the query using two databases? Does anyone have any suggestions?


thanks

View 5 Replies View Related

VB Programaticlly Grab Data From A DB Noob

Mar 6, 2008

  Hi, I am very new to the .net framework, but I have a lot of experince in php/mysql applications. So this is this is proboly going to seem like a nwebie question.
I am trying to pull a single item out of the database programaticlly, take the value of that item and set it to a varible so I can work with it in other areas.
Here is basically what I have this is on the vb page in a sub I have the varible MonthlyPrice Defined earlier in the pageDim connString As String = _ConfigurationManager.ConnectionStrings("ConnectioString").ConnectionString'Create a SqlConnection instanceUsing myConnection As New SqlConnection(connString)'Specify the SQL queryConst sql As String = "SELECT Price FROM Plans Where PlainID='" & PlanId & "'"'Create a SqlCommand instanceDim myCommand As New SqlCommand(sql, myConnection)'Get back a DataSetDim myDataSet As New DataSet'Create a SqlDataAdapter instanceDim ReadData As New SqlDataReader(myCommand) 'Bind the DataSet to the GridViewMonthlyPrice = ReadData("Price")'Close the connectionmyConnection.Close()End Using
I just want to get the price of the plan where planID is equal to the value of my varible planID. I want to set that equal to MonthlyPrice which is a decimal so I can add it into some calculations and return a value. I don't really want to bind the data to anything but everytime I search google I can't find anything excpet for binding data to grideview and things like that.
I have tried several diffrent approaches that I have found out there but have gotten errors or and things I am not understanding.
I originally was trying to access a datasource I already have defined that is on the aspx page.<asp:SqlDataSource ID="SQLSelectPlan" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT * FROM [Plans] WHERE ([PlanID] = @PlanID2)">
<SelectParameters>
<asp:FormParameter FormField="grSelectPlan" Name="PlanID2" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
 Is there a way for me to grab this datasource which works and is tied to a detailed view, take the value in the price collom and stick it in the MonthlyPrice varible on my vb page? That is the approach that seems the most logical to me.
If someone has better way I would really like to know.
 
Thanks

View 12 Replies View Related

Create Another Column To Grab In Between Data

Apr 28, 2014

ColumnA
<Dcc::Applicable v="False"/><Dcc::DccData v="0"/><DESC v="DataReceived- 8769 datas, 9.20USD cash"/>
<Dcc::Applicable v="False"/><Dcc::DccData v="0"/><DESC v="DataReceived- 1000 datas, 14.40USD cash"/>

I have a list of data as above.How can i create another new column just to grab the data?

NewColumn
8769
1000

View 5 Replies View Related

SQL Select Statement (Textbox Used To Grab Data From Database)

Sep 21, 2007

I have a problem....SOMEONE PLEASE HELP!


Here is the setup.
Text Box: User enters in customer transaction number
Button: User clicks button to display information about the customer

Now the database has a lot of unique customer numbers. What I am trying to do is take what the user enters so it can search the database and pull out that customers information. I am having a hard time getting that information from the textbox. Any suggestions! Here is what I have so far.



Private Sub btnViewFlow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnViewFlow.Click

Try



Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection

Me.SqlDataAdapter1 = New System.Data.SqlClient.SqlDataAdapter

Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand

Me.DataSet11 = New links.DataSet1

CType(Me.DataSet11, System.ComponentModel.ISupportInitialize).BeginInit()

'

'SqlConnection1

'

Me.SqlConnection1.ConnectionString = "workstation id=<14852>;packet size=4096;user id=<userID>;password=<Strong Password>;data source=ZRTPD0WB;p" & _

"ersist security info=False;initial catalog=DTR"

'

'SqlDataAdapter1

'

Me.SqlDataAdapter1.SelectCommand = Me.SqlSelectCommand1

Me.SqlDataAdapter1.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "DTR_Document_Summary", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("DocumentId", "DocumentId"), New System.Data.Common.DataColumnMapping("PartnerId", "PartnerId"), New System.Data.Common.DataColumnMapping("PartnerName", "PartnerName"), New System.Data.Common.DataColumnMapping("Direction", "Direction"), New System.Data.Common.DataColumnMapping("TranSet", "TranSet")})})

'

'SqlSelectCommand1

'

Me.SqlSelectCommand1.CommandText = "SELECT DocumentId, PartnerId, PartnerName, Direction, TranSet FROM DTR_Document_S" & _

"ummary "

'WHERE (DTR_Document_Summary.PartnerId = 'txtPartnerId.text.toString')"
'THE STATEMENT ABOVE DOESNT WORK

Me.SqlSelectCommand1.Connection = Me.SqlConnection1

'

'DataSet11

'

Me.DataSet11.DataSetName = "DataSet1"

Me.DataSet11.Locale = New System.Globalization.CultureInfo("en-US")

CType(Me.DataSet11, System.ComponentModel.ISupportInitialize).EndInit()



'Open the connection

SqlConnection1.Open()

TextBox1.Text = "Connection Open"




'Populate DataSet11

SqlDataAdapter1.Fill(DataSet11)

TextBox1.Text = "DataSet11 has been filled!"


'Display Data

DataGrid1.DataBind()

TextBox1.Text = "Here is your requested information"



Catch ex As Exception

TextBox1.Text = ex.Message


End Try
'Close the connection

SqlConnection1.Close()


End Sub

View 6 Replies View Related

SQL Server 2008 :: Replicate Only Specific Data To Specific Subscriber?

Jun 30, 2015

We have a "main" SQL 2014 server who imports XML files using SSIS in a datacenter. In remote sites (which are warehouses), there is an instance of SQL 2014 Express. A merge replication is setup, as every operations done on each site must be "forwared" to the main database, as some XML files are generated as output for an ERP system.

Now, the merge replication replicate all the data to the server on each sites. But a specific site don't need the data of every other sites, only the data relevant to itself (which is the warehouse code). Is there a way to replicate only the data relevant to each individual sites to the subscribers? Or is there a better way than replication to accomplish this?

View 2 Replies View Related

Assign Specific Data To Specific Users

Mar 21, 2008

I am very early on in developing a website to track issues with projects which is tied to a SQL database.  I have my Projects Table, my Users Table, and am creating a third table to track issues.  I'm wondering what is the best way to assign specific users to specific data/projects.  The user should only be able to view & update the projects assigned to him.  He should not be able to see other projects.  What is the best way to assign projects/data to the users to make sure they are only viewing their data?

View 1 Replies View Related

Grab Last Word

Sep 2, 2013

how can i only grab the last 4 ID:

data
19Jul hello ID UKAU
9Jul hello ID UJKO
7Jul hello ID POJP

View 2 Replies View Related

How To Grab User Name Into The Table

Aug 21, 2001

I want to include the name of the user whom so ever has changed the record.
I want to insert the name of the user in the column.
How to grab the name of the user from the action...?

Thanks,
Harish

View 1 Replies View Related

Table Name Changes - How To Grab Last 24 Hours

May 30, 2014

My DB saves it's data into a table at the end of each day like:

'e4_event_20140530' where the last bit changes according to the date. So 30th May 2014 in this case.

What I am trying to do is query the last 24 hours. I know i can grab from 2 tables and do a 'between' with times but it means having to change table name and times in the query every time i run it. I'd just like to run it and for it to just fetch the last 24 hours at any point in time.

My DB outputs time like '2014-05-30 08:54:23'

View 2 Replies View Related

Inserting New Row, Need To Grab Key From Another Table Thats Just Inserted

Oct 11, 2004

i have 2 tables right now, po and notes...

the notes table contain the note_id and notetext, so example of a row would be:
1 this is the note for the first row
2 this is the note for computer parts

etc..

the po table has item info, description, po_id, and note_id, heres an example:

po_id item desc note_id
1 215-33 computer parts 2

the problem is, is there a way where say i insert the note row into the notes table first and then get the note_id of that, so that i can then insert the row into the po table which includes the note_id from the notes table?

would i have to use two separate inserts or can i use one? i was going to just insert the notes row first, and then use a query using the LIKE() function on the note text to get the note_id, but some notes may be the same as others, so the note_id wouldn't be the correct one :( and i think just getting the last row of the notes table would be bad too incase someone happens to insert a row into that table at the same time

any ideas please?

thanks!

View 1 Replies View Related

How Can I Grab A Notification Email Address From A Job?

Dec 9, 2004

Is there a handy-dandy way for me to be able, from a stored procedure, to capture the notification email address for a user associated with a job?

I need to send an email out from a stored procedure, and I want it to be set up to send to the same user that is set up in the job that calls the stored procedure.

the same notification stored proc will be used in multiple jobs, but the jobs are already set up with a notification email to be sent to the defined users "on completion" (error or not). I want a separate email to be sent, but I want to use xp_Sendmail because I have to perform a select who's output I want to appear in the body of the email (and unless I am missing something, I have no control over the body of the standard "job completion" email).

I would prefer to NOT have to "hard code" the user email address in the stored proc that calls xp_sendmail, OR to put it in some user table in the database, when the user I want to send it to will always be the same one defined in at the JOB level in Enterprise Manager.

Any thoughts? Thanks in advance for your instantaneous and informative answer-packed responses! ;)

View 2 Replies View Related

Grab Output Of Dynamic Sql And Use As Variable

May 5, 2008

hello,

I'd like to know how I can grab the output of the following code and use it as variable:

declare @sql nvarchar(25)
set @sql = 'SELECT CURRENT_TIMESTAMP'
EXEC(@sql)

Thank you.

View 2 Replies View Related

Want To Grab A List Of Available Databases On A Given Server

Jul 23, 2005

I have MSDE running on my system and I want to get a list of databasesfor that server programmatically. I'm using vb.net and I want to view,add, delete and modify databases on a server from within a class.I'm aware I can use the "Server Explorer" feature in Visual Studio, butthat isn't what I'm looking for. Any references or suggestions on whereto start are appreciated.TIARalf

View 7 Replies View Related

Finding Code That Will Automatically Grab 3 Digits Before Dash?

Jan 6, 2014

I have the following table with two columns:

SEQ_NUM STATUS_CODE
101 D12
102 DWI - REGULAR DWW - EXPIRED
103 WRW - REG WRT - FUTURE

I would like to output the following:

SEQ_NUM STATUS_CODE
101 D12
102 DWI
102 DWW
103 WRW
103 WRT

The Status code column in the source table will have a single 3 DIGIT alphanumeric code, and sometimes a longer string. I need a code that will automatically grab the 3 digit code before the dash.

View 8 Replies View Related

String Parsing - Grab Some Key Value Pairs From Text In Column

Jul 21, 2014

I want to grab some key value pairs from the text in sql column

e.g.

some text[Key1=Val1]some text[Key2=Val2][Key3=Val3]some text

I want a function which takes Keyname as input & returns the value related with it if found.

GetValueFmKey('Key1') should return Val1 and like on.

View 1 Replies View Related

How Do You Grab Keys From Dimensions And Store Them Back Into Your Table

Nov 16, 2006

I have run into an issue that seems very simple but I am new to SSIS and DBs in general and therefore cannot solve it. I would like to take data from a SQL Server table, lookup a key from a dimension table and update the same SQL Server table with this data. Is there anyway to do an update using SSIS?

Thanks,

Curtis

View 1 Replies View Related

Transact SQL :: Select Specific Values From All Rows Where Value Of A Specific Column Is (Active)

May 23, 2015

I need to select specific values from all rows where the value of a specific column is "Active"

This part works: SELECT LastName, FirstName, MiddleInit, ClientId FROM dbo.Client

But I want to add: WHERE StatusType = (Active) and how to do this.

View 4 Replies View Related

Can Logging Be Turned Off On Inserts To A Specific Temp Table From A Specific Sp?

Oct 10, 2007

I want to ship 500,000 aged transactions each night to an archive table and delete them from their source table in one or more logical units of work (LUW). Each row is approx 60 bytes and there is only one non clustered index on the source table presently.

I'm trying to weigh the pros and cons of 3 alternatives. One of them would basically insert the non-aged rows into tempdb, ship the aged records, truncate the table and then insert the tempdb records back into their source all in the same LUW.

For this alternative, I'd at least like to turn off logging when the records get inserted into tempdb as I dont see any value in logging that part of the activity. Is this possible?

View 4 Replies View Related

Command Line Printing To Specific Printers, And Specific Trays

Jan 23, 2007

Hi All,

Could you guys please help me with printing reports invoked thru command line/ URL access to print automatically to specific printers and specific trays and also is it possible to set the specific printer and tray as parameters.

Any suggestions is appreciated

Thanks A lot in advance

e,g :

http://localhost/reportserver?/testreports/employee sales&UserID='ABC'&LName=Lastname='victor'&rs:Command=Render

View 1 Replies View Related

Please Help Displaying Specific Data

Mar 10, 2008

Hi I have used the create user wizard to create a registration page my table stores the user details and user id. I am also using the login wizard to create a log in page . I now want to display the details of the currently logged in user usind details view and allow them to view and edit their details. where and how do i create the session varible anh how do I wtire the sql select statement say select first name from table1 where (the userid I stored earlier in a table when the user registered ) = (this should be the currently logged in user'id). I am a novice so I would appreciate code snippets
My code in asp page for the details looks like this
 asp:DetailsView ID="DetailsView1" runat="server" DataSourceID="SqlDataSource1"
Height="50px" Width="125px">
<EditRowStyle BackColor="#CCFF99" />
<AlternatingRowStyle BackColor="#FFCCFF" />
</asp:DetailsView><asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString1 %>"
SelectCommand="SELECT [FirstName], [LastName], [City], [Listing] FROM [UserDetails] WHERE ([UserId] = @UserId)">
</asp:SqlDataSource>
 
novice This shows no data when I test it. I have tried the folling in the .vb page no luck.
 Protected Sub DetailsView1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles DetailsView1.DataBound
Dim UserId As Integer = Me.DetailsView1.DataItem("userID")Session("_UserID") = UserId
End Sub

View 5 Replies View Related

Data To Their Specific Column

Oct 11, 2005

hi there

i'm using this code

DECLARE @strComma VARCHAR(1000)
SET @strComma = 'cmpnt_name,ASC,1,2'
SELECT CAST(RIGHT(LEFT(@strComma,Number-1), CHARINDEX(',',REVERSE(LEFT(','+@strComma,Number-1)))) AS CHAR(30))
FROM master..spt_values
WHERE Type = 'P' AND Number BETWEEN 1 AND LEN(@strComma)+1 AND (SUBSTRING(@strComma,Number,1) = ','
OR SUBSTRING(@strComma,Number,1) = '')

however i getting the data in one field which is like

cmpnt_name
ASC
1
2

i would like them to be in their specific column that is 4 different field

Name-----------Char----------Length---------Order
cmpnt_name-----1--------------2-------------ASC

thx u

View 4 Replies View Related

Picking The Specific Data

May 16, 2007

I have in my table something like this
Col1 Col2
6 O
6 O
6 C
6 C
6 C
5 O
5 O

i want the value as 6 iff all the corresponding
records in col2 are C
similarly, since for 5 there are no C it should
not pick record 5

Please suggest me a query for this

View 10 Replies View Related

Getting The Data In Specific Order

Jan 8, 2008

This is related to SQL Server 2005
I have a table named BranchDetails having a column named branchnumber.

The data in the branch is in the following order
2007-90
2006-9
2007-67
2006-8
2007-98
2007-56
2006-1
Null

I want to write a T SQL query that will bring the result in the following descending order
with null at the top
Null
2007-98
2007-90
2007-67
2007-56
2006-9
2006-8
2006-1

Can someone show me the T sql statement?
Thanks.



View 9 Replies View Related

How Do I Grab A Simple List Of SQL Server Views, Tables Or Sprocs?

Jul 20, 2005

I need just the names of tables, views and sprocs within a SQL Serverdatabase. What's the easiest way to do this?

View 3 Replies View Related

How To Select A Specific Value From Dataset To Fill A Specific Cell ?

Mar 27, 2007

Hi there !

Thanks for taking the time to read this thread.

I don't know whether anyone has this problem, but I am definitely not using the right keywords to search for a thread.

My situation is this...

I have a dataset that has values to fill cells to multiple tables in a report.
However, I only want to select specific data from the dataset to fill textboxes and others.
I cannot change the stored procedure, but the sample of the data is shown below:-


Row Stat Val
0 dtRpt1 02/01/2005
1 Value1 1
2 Value2 2000
3 dtMailSent 02/28/2005
4 Value3 0
5 Value4 5
6 Value5 658

I know it looks weird, but the row really represents which "row" or textbox is it to fill with the Val. The Stat Column is just a way to make sure that I am filling the right values.

so my new report would have multiple tables to denote different categories.
In my first table, I tried putting the cells as follows:-
(expressions are highlighted in italics and bold)

TextBox1 =IIF(Fields!Row.Value =0, Fields!Val.Value,"")

Table1
Column1
DetailRow1 =IIF(Fields!Row.Value =1, Fields!Val.Value,"")
DetailRow2 =IIF(Fields!Row.Value =2, Fields!Val.Value,"")


Table2
Column1
DetailRow1 =IIF(Fields!Row.Value =3, Fields!Val.Value,"")
DetailRow2 =IIF(Fields!Row.Value =4, Fields!Val.Value,"")
DetailRow3 =IIF(Fields!Row.Value =5, Fields!Val.Value,"")
DetailRow4 =IIF(Fields!Row.Value =6, Fields!Val.Value,"")


I only expect this report to print out one page holding the previous values.

However, it ended up printing like this

----------------------------------------------------------

Table1
Column1
DetailRow1 1
DetailRow2

Column1
DetailRow1
DetailRow2 2000


Table2
Column1
DetailRow1 02/28/2005
DetailRow2
DetailRow3
DetailRow4

Table2
Column1
DetailRow1
DetailRow2 0
DetailRow3
DetailRow4

Table2
Column1
DetailRow1
DetailRow2
DetailRow3 5
DetailRow4

Table2
Column1
DetailRow1
DetailRow2
DetailRow3
DetailRow4 658

------------------------------------------------------

I tried putting it into the headerrows instead of DetailRows, and it ended up printing the last value.
Is there anyway to do this ? print all the values out in one table ? I tried using textboxes, but I think I got my expression wrong.

Is this the correct expression ?

=IIF((Fields!Row.Value,"Dataset") =1, (Fields!Val.value, "Dataset"), "")

and it give me an error
The value expression for the textbox €˜textbox5€™ contains an error: [BC30455] Argument not specified for parameter 'FalsePart' of 'Public Function IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As Object'.

Appreciate any advice or suggestion for this scenario !

Thanks!

Bernard

View 3 Replies View Related

Get Data Back In A Specific Order

Nov 9, 2007

 i have a table Animals with column names id and Name  eg1 Tiger2 Lion3 Elephant4 Cheetah5 Zebra i want the order to be anything of my chossing when i select from it. eg how could i get it to display results in this order (when i do select * from Animals): CheetahElephantZebraTiger Lion   Thanks  

View 4 Replies View Related

Need A Way To Switch Specific Data From Columns

Jul 13, 2005

Basically I have 635k records in a table with a person's first name, and date of birth (other stuff but it's not relavent). I imported all the data from excel files, but somehow a bunch of records got the first name and date of birth mixed up, so I'm trying to write a stored procedure that would switch the first name with the date of birth wherever the firstname is purely numeric, or something of the sort. Now records are in fact repeated so another possible but more time taking solution is to write a stored procedure that I give the date of birth and it does the switching around for the respective date of birth when it's found inside the First name. Any suggestions? All the code I've written has proved useless :/

View 1 Replies View Related

Sql - Pulling Data From Specific Rows

Nov 12, 2006

I have a table, multiple columns, thousands of rows.

Six of the columns is the data that i need to work with...

col1, col2, col3, col4, col5, col6

col1 and col2 - go together - example. col1 = amount col2 = description
col3 and col4 - go together col3 = amount col4 description
col5 and col6 - go together col5 amount and 6 description

i need to pull search the table based on an auto number "id" and pull in the necessary two columns that correspond with a set value in the description.

example:

if col4 has "fee applied" in the description i need to pull the amount.

Please help...

Thank you in advance

View 3 Replies View Related

Modify All Data Within A Specific Column

Aug 15, 2007

I have a column (PERIMAGE_PATH) in my table. The data in this column is imported from a fixed width text file and looks like the following:

07J06274
05J03254
04J11245

I need to modify the data in the column to look like this:

..images7J06274.jpg
..images5J03254.jpg
..images4J11245.jpg

How can I do this?

Thanks for all your guys' help. This is the last question for the day. I promise

View 8 Replies View Related

Exporting Sql Data To Specific Cells

Apr 21, 2006

Tools: SQL Server 2K, Excel 2000Hi,I have an Excel report worksheet with formatted headings. What I wantto do is to export data from the SQL server into a specific cell of theexcel file. Is this doable? Can somebody give me some direction on howto accomplish this?I appreciate any suggestions.Edgar J.

View 8 Replies View Related

Reading Data At Specific Interval

Nov 29, 2006

Hello there

I'm having data store in database at interval of 2sec.

hence if i read data for 1 week(7days) it returns me huge amount of data

so what i want to do is to read data at some varying intervals e.g 30 sec or 50 sec for perticular datetime range

Please tell me suitable query to have such selected data base

Thanks in advance

AVD

View 1 Replies View Related







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