Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Field LIKE Number,number,number


I am testing something in Visual Basic
that talks to a database and I want to
filter results by -> field1 like "###".
However, that 'like' and '#' is VB syntax.
How do you say that in SQL?




View Complete Forum Thread with Replies

Related Forum Messages:
How To Enter More Number Of Rows In A Table Having More Number Of Columns At A Time
Hi

I want to enter rows into a table having more number of columns
 
For example : I have one employee table having columns (name ,address,salary etc )
                     then, how can i enter 100 employees data at a time ?

Suppose i am having my data in .txt file (or ) in .xls

( SQL Server 2005)

View Replies !
Limitations In Term Of Number Of Tasks And Number Of Columns
Hi,

I am currently designing a SSIS package to integrate data into a data warehouse fact table. This fact table has about 70 columns among which 17 are foreign keys for dimension tables.

To insert data in that table, I have to make several transformations and lookups. Given the fact that the lookups I have to make are a little complicated, I have about 70 tasks in my Data Flow.
I know it's a lot, but I can't find a way to make it simpler. It seems I really need all these tasks.
 
Now, the problem is that every new action I try to make on the package takes a lot of time. At design time, everything is very slow. My processor is eavily loaded each time I change a single setting in one of the tasks, and executing the package in debug mode takes for ages. If I take a look at the size of my package file on disk, it's more than 3MB.

Hence my question : Are there any limitations in terms of number of columns or number of tasks that can be processed within a Data Flow ?

If not, then do you have any idea why it's so slow ?

Thanks in advance for any answer.

View Replies !
How To Change A Decimal Number To Percent Format Number?
in my sql, i want to change a decimal number to percent format number, just so it is convenient for users. for example there is a decimal number 0.98, i want to change it to 98%, how can i complete it?

thks

View Replies !
The Number Of Requests For &&"XXXServerXXXUser&&" Has Exceeded The Maximum Number Allowed For A Single User
 

I have created a local user on Report Server Computer and the user has the administrative rights.
When i try to connect Report Server (http://xxx.xxx.xxx.xxx/reportserver) with this user's credantials. (ReportServer directory security is set -only- to Basic Authentication. ).
I get the following error.
 

Reporting Services Error
--------------------------------------------------------------------------------
 
The number of requests for "XXXServerXXXUser" has exceeded the maximum number allowed for a single user.
--------------------------------------------------------------------------------
SQL Server Reporting Services

 
Then i try to login using a different user with administrative rights on the machine, i can logon successfully.
The system is up for a month but this problem occured today?!? What could be the problem?!?

View Replies !
Maximum Number Of Tables - Is 4^15 Big A Number?
Hello people,I might sound a little bit crazy, but is there any possibility that youcan incorporate 4^15 (1,073,741,824) tables into a SQL Database?I mean, is it possible at all? There might be a question of whereanyone would want so many tables, but i'm a bioinformatics guy and I'mtrying to deal with genomic sequences and was coming up with a newalgorithm, where the only limit is the number of tables I can put intoa Database.So, can you please advise if its possible to put in so many tables intoa SQL database? Or is the Bekerley DB better?

View Replies !
How To Query A Number (street Number)...
I have a table that has a street number field.
if the user types in a street number of '2' i would like to return all street numbers the begin with 2 (2,20,21, 200, 201,205,2009,...)
how can this be done.

View Replies !
Format A Number For Use As Number In Excel
I want to format a number like "#,##0.00" in order to handle it in Excel as a number (i.e. compute a sum).

Excel is able to show a number in a specail format and still allow to compute with ...

Thanks in advance,

Peter

View Replies !
Page Number && Records Number
1. how to show page number & total page number in report body?

2. how to show total records number?

View Replies !
Substring'ing A Number-field
Hi :) and thanx for reading my post.I have to create a view based on a character in a number-field (fnr)which is 11 char's long. I have to get character nr "7".The problem is that i cannot use :--> SELECT fnr FROM table WHERE substring(fnr,7,1)since it's not a string.Any other way i can solve this ? Would be greatly and insanely happy ifanyone could help me out with a sample code or something.!Best regardsMirador*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View Replies !
SP To Find A Gap In A Number Field
I have a part number field which contains whole numbers. (1 - 5000+) however there are gaps in the numbers e.g. Part Number 3876 maybe missing.  The table has new parts inserted from a VB Client.  Im trying to write a stored procedure where when a user trys to run an update without entering a part number the first missing part number is found.  If they do provide a part number then their number is committed as long as it is unique.  I've tried using cursors but am not sure on the best approach.  Any suggestions?
 
Thanks in advance
 
Alex

View Replies !
Importing Of Varchar Field Data In Number Field
i want to import/copy a varchar field numeric data in to number field pls suggest the solution
one thing more can i convert field type of a table how?


jto it

View Replies !
Percent Field Rounds To Whole Number
I am having a problem retaining the right 2 decimal places in my datagrid field. I have it defined as a decimal but when the update happens it rounds the decimal places back to .00.
Dim NewMarkup As String
'retrieve the new values
NewMarkup = CType(e.Item.FindControl("Markup"), TextBox).Text
'create the ado.net objects
Dim command As New SqlCommand("UpdatePricing", connection)
command.CommandType = CommandType.StoredProcedure
'parameters
command.Parameters.Add("@Markup", SqlDbType.Decimal, 5)
command.Parameters("@Markup").Value = CDec(NewMarkup)
Thanks!

View Replies !
Converting A Text Field To Number
I have a table with over a million rows and one of the fields containsamounts of money in text format.What is the most efficient way of converting this field to a numberformat that I can sum on?Regards,Ciarán

View Replies !
Formate Phone Number Field
Hi,

I need to formate one of my phone number field in SQL. now the data in the field is: 1234567890. I would like to formate the number to 123-456-7890. Does anyone know how to do this? Thanks.

Nicole

View Replies !
Unlimited Number Of Characters In A Field
Hello,

I am developing a message board using ASP on IIS and SQL Server 2000, and I am running into a problem.

When a user enters their post, they enter their user name, subject, and of course all of their post content. Now the post content should be an unlimited number of characters since it could end up being multiple paragraphs.

I know I could just use an ASP file system object and write the text to a file, but I wanted to save all of these paragraphs as a field in a database table so I could pull it from the database so it could be edited by the user.

Is there a way to make a field be able to take in an unlimited amount of characters?

Or is this the wrong way to do things; is it bad to have an unlimited amount of characters in a table field? Should I stick to using the ASP System File Object?

View Replies !
Query To See If An Int Field Starts With A Certain Number
How would I write a query on a table containing a column of ints, where I want to retrieve the rows where that int value starts with a number?   I know that you can do this with strings by using "....WHERE thisfield LIKE ('123%')", but if 'thisfield' is an int, how would I do this?  Thanks!

View Replies !
How To Confine A Field To Be Number Characters Only?
i have a field which is CHAR(20), and it is allowed to only containe number chars.

is there any collation_name can help ? or how can i set the check clause ?

View Replies !
Number Format While Representing Two Different Field
 

Hi,
    I need to represent two different (number) fields in the same textbox ,  one number format is C0 (Currency) and other one is Percentage(P1), how can i keep this number format applicable to appropriate fields?
 
for exaple this is the expression to represent the two fiels in one textbox.
 

=Fields!Amount01.Value & vbCrLf & Fields!Amount01Percentage.Value
 
Thanks in advance.
 
 

View Replies !
Insert Number With Comma Into SQL Database 'int' Field
How can I allow users to input numbers with commas into a database field with an 'int' datatype without getting this error, 'Input string was not in a correct format'?

View Replies !
Conditional Insert Based On MAX Number Of Field
Hi!

I have a table called DB1 that contains this:

MID
IIN
NUM_EVENTS
DATE

MID, IIN and NUM_EVENTS are composite keys. and only NUM_EVENTS get incremented. All records start with NUM_EVENTS = 1.How can I create a query that only displays those records that only NUM_EVENTS = 1 meaning their still on the first stage of processing?

View Replies !
Function To Remove '-' & '( )' From Phone Number Field
I have a phone number field.
I would like to remove the hypens and brackets.
Do anyone know of any functions, I can use to accomplish this??

Thanks in advance!
--Vic

View Replies !
How Do I Make The Field A Number Data Type?
Hi there!
I'm using a Switch statement in my SQL as follows:

Code:

SELECT symbol,
Switch(timestamp Is Null,Null,
timestamp <= 005959, 0,
timestamp<=235959,23) AS period
INTO averageprice
FROM stocktrades;




Now here's my problem. The Data Type stored in the 'period' field of this new table I've created, dubbed averageprice, is a Text field and I want it to be a Number field. I've tried my best to figure this out and I'm still looking so any helpful hints or solution would be greatly appreciated. Thanks!!!

View Replies !
How To Calculate The Character Number In The Field Column
 

Hello:
 
I have a field hold varchar. I would like to calculate how many character in the field when user enter the data and save in the database.
 
Is there any way to do?
 
Thanks,
 
Snow

View Replies !
Conditional Insert Based On MAX Number Of Field
Hi!

I have a table called DB1 that contains this:

MID
IIN
NUM_EVENTS
DATE

MID, IIN and NUM_EVENTS are composite keys. and only NUM_EVENTS get incremented. All records start with NUM_EVENTS = 1.How can I create a query that only displays those records that only NUM_EVENTS = 1 meaning their still on the first stage of processing?



$3.99/yr .COM!
http://www.greatdomains4less.com

View Replies !
Maximum Number Of Characters In A Database Table Field
Can any one help me, i'm building a dynamic database driven site using dreamweaver and MS SQL2000 andi'm haveing problem storing over 8000 characters in a table filed (IE: it wont let me!!) is there a special table field value that i need to set to get more characters in a table field or is this a limitation of SQL.

Any help or suggestions would be appreciated

Regards
B

View Replies !
Format Money MS SQL Field Data As Number With Commas And No Decimals
If I pull a value from a MSSQL field with is defined as money, how can I get it to display in a textbox with commas and NO decimals?
87000.0000 = 87,000
I can currently remove the decimals like below but is there a way to add the commas as well?
decRevenue = drMyData("Revenue")
txtRevenue.Text = decRevenue.ToString("f0")
It current shows "87000".
 
 

View Replies !
Inflated Number Of Records Returned When Adding Bit Field Criteria
When querying a bit field, I am encountering a problem with MS SQLServer returning a larger number of records for a table than theactual number of records that exist within that table.For example, my customer table has 1 million unique records, so theresults of the following query are as such:select count(customer_nbr) from customer = 1,000,000There is bit field in the customer table that denotes whether acustomer has placed an order with us called. That flag is calledorder_flagIf I run the following query:select count(customer_nbr) from customer where order_flag = 1The result is 3,000,000 records.There is no logical way that this is possible, as my table onlycontains 1,000,000 unique records and the number of customers with anorder should be a subset of this.If a run the above query with a distinct before customer number, I getthe results I want:select count(distinct customer_nbr) from customer where order_flag = 1600,000 records.So while I can get to the answer I want, I have no idea why I amreturning incorrect values if I don't select distinct.Can anyone help? I checked microsoft support and message boards buthaven't seen anything.I should note that the bit field is indexed.I am not sure if that isthe problem or not.

View Replies !
What Is The 'Data Type' For A Field Containing Both Text And Number, In VS Studio 2005, Databases?
For a field in a database to accept both text and number what 'Data Type' should I be using, i.e. 23t5

View Replies !
Trouble With An ASync Query To Insert A Record And Return The Auto Number Field.
I get this error when I look at the state of my SQLresults object. Have I coded something wrong?Item = In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user.  conn.Open()
Dim strSql As String

strSql = "INSERT INTO contacts (companyId, sourceId, firstName, lastName, middleName, birthday, dateCreated)" _
& "VALUES ('" & companyId & "', '" & sourceId & "', '" & firstName & "', '" & lastName & "', '" & middleName & "', '" & birthday & "', '" & now & "') SELECT @@IDENTITY AS 'contactId'"

Dim objCmd As SqlCommand
objCmd = New SqlCommand(strSql, conn)

Dim aSyncResult As IAsyncResult = objCmd.BeginExecuteReader()

If aSyncResult.AsyncWaitHandle.WaitOne() = True Then


Dim sqlResults As SqlClient.SqlDataReader

sqlResults = objCmd.EndExecuteReader(aSyncResult)

Dim cid As Integer



cid = sqlResults.Item("contactId")
Me.id = cid
conn.Close()
Return cid
Else
Return "failed"


End If  

View Replies !
How Do I Get The Row Number?
I have tryed to find a way to include the row number in a querry but without result.

I have a table select some rows ordered and now I will add a column called rank

How do I get the rownumber in the field rank ?

Thanks in advance

Jan O

View Replies !
How To Get Id Number From Sql
i am an asp programer trying to program in aspx c#
i have a litle problem geting the id number from my sql db and put it into an intiger

what i am doing is that i am trying to make the picture have the same name as the id number in the db

String sql = "SELECT id ";
sql += " FROM PictureLibrary";
sql += " ORDER BY id desc";

int pictureNR = ??

View Replies !
Seq Number
How to generate a seq number in TSQL. My need is for every recordinsert ,I need to insert a seq number paded with letter 'I'.Please help me.Adv Thanks mate--Posted via http://dbforums.com

View Replies !
Row Number.
All I am trying to do is return the row number (calculated field?)with each row returned from an SQL query. I think I have done this inthe past but am a bit rusty after not using SQL for a while. Ifanyone could help with a code snippet this would be gretlyappreciated.

View Replies !
Row Number
update [Costing].[dbo].[Supplier]

set n =

(

SELECT (ROW_NUMBER() OVER (ORDER BY suppliercode) + 1000 )

as RowNumber from [Costing].[dbo].[Supplier] as t

where t.suppliercode = Supplier.suppliercode

)

hi i cannot update a column with the row number,

it is all taking 1001, supposed to be 1001,1002 and so on .

thanks.

View Replies !
Where's My Number?
Can someone tell me why I'm not getting .9375?
 

declare @MyFloat1 float

set @MyFloat1 = 30/32

select @MyFloat1



returns 0
 

declare @MyFloat2 real

set @MyFloat2 = 30/32

select @MyFloat2



returns 0
 

declare @MyFloat3 decimal(2,2)

set @MyFloat3 = 30/32

select @MyFloat3




returns 0.00
 

View Replies !
Row Number
Hi,

I need to add row number to my query result and I know how to do that in SQl2005 but the row number function is not working in 2000.Please help me to figure out how should I do that in SQl2000.The query that I have is kind of a big query with 162 columns. It is coming from another view.

Thanks.


Sep

View Replies !
Row Number
Is there a way to take the row number from my code and put that into a column I have code that returns the top 50 of sales and I want to put those row numbers into columns that they coordinate with.

View Replies !
WK Number
Hi all,

Does anybody know why SQL server gives the wrong weeknumber when I enter the following syntax in my query analyzer.

select Datepart (wk,getdate())

It should give week 46, but it gives 47

What is wrong ?
Are the settings of SQL server wrong
It does give the correct day, month and year.

Thanks in advance

View Replies !
Odd @@error Number
I have a few stored procedures that returns @@error. If I understand correctly, @@error should be set to 0 if there is no error. However, my procedures are returning 1 and 2 yet working just fine as far as I can tell. There is not exception popping up in SQL Profiler either. What does this mean, and is it something I should be concerned about?  

View Replies !
Get Only The Number From A String, T-SQL???
I have a string in form "abcdefg 12355 ijklmn"Now I want get only the number 12355 within the string !!Is there any function available in T-SQL of Sql server 2K??Thanksfor any help

View Replies !
Increase Number By 1
Hello all,
I have, what i think, is a unique problem that i'm hoping some of you can help me on.

I need to create a record number that is incremented by 1 whenever someone adds a new record to the database. For example, records numbering 1,2,3 are in the database. When the users adds a new record, SQL takes the last recordno, 3 in this case, and adds 1 to it thus producing 4.

Also, i need to have the ability to replace deleted record numbers with new ones. Using the example above, say a user deletes record number 2. Whenever someone adds a new record, sql would see the missing number and assign the new record that number.

I hope i'm making sense here. Does anyone have any ideas about this? Any articles on the web that someone could point me to?

Thanks.
Richard M.

View Replies !
Next Inserts ID Number, Someone Please Help
G'day,
I have a table with a primary key being a bigint and its set to auto increment (or identity or whatever ms calls it). Is there anyway I can get the ID number that will be assigned to the next Insert before I insert it? I want to use that ID number within another field when inserted.

I hope that makes sense.

Thanks for any help.

Robbo

View Replies !
Record , Row Number
HiHow can i have Row number in my SELECT Statement ?Thanks

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved