I would like to parse the contents of a text file. This text file is built from a sql query.
/text_file.txt
Contents of text_file.txt would be:
0123456789YYYYMMDDHHMMSS
0123456789YYYYMMDDHHMMSS
0123456789YYYYMMDDHHMMSS
each line will have a unique 'YYYYMMDDHHMMSS'
I will need to append...
Hi,
I orginally posted in Sun Solaris (apologies, now reposting in UNIX Scripting)
Would like to use /bin/sh
*nix version FreeBSD
I would like to parse the contents of a text file. This text file is built from a sql query.
/text_file.txt
Contents of text_file.txt would be...
Hello!
I command in a script that I would like to run against the contents of a text file by adding to the script. This text file just one entry for each line, so the script would parse this:
line1
line2
line3
.....etc
Any help would be greatly apprecited!
Hello,
I am new to scripting on Solaris. I need to create and run a shell script that will take some input and then perform the commands in the shell script, for example:
#./shellscript.sh input
contents of the script:
rcp -p input user@host1:input
rsh -l user host1 "chmod 755 input"
So...
I am trying to do a query comparison between a sql server v7 and a sql server 2005 and output the results in sql analyser.
The db schema is the same between both servers, they reside on different machines, but are on the same physical network and subnet.
I am not sure that sql server 7...
Hi There,
When trying to run a query:
select sum(col1) from table
I get the following error:
Server: Msg 8115, Level 16, State 2, Line 1
Arithmetic overflow error converting expression to data type int.
Is there anyway to avoid this to get the results I need?
Thanks!
Hi,
If I have output from ls -l:
drwxr-xr-x 2 root system 512 Sep 12 09:55 12sept
drwxr-xr-x 2 root system 512 Sep 14 13:39 14sept
what does the 2 mean in second column?
there are different numbers that are possible as well, tried the man page but no luck.
Thanks!
Hi,
I have a vbscript that uses SQLDMO and an input file to perform a query on the sql database and return the results to a msgbox.
To create the connection I use:
Set objServer = ("SQLDMO.SQLServer2")
and login with the current user account:
objServer.LoginSecure = True
objServer.Connect...
Hi,
I have searched this forum, but I am finding it difficult to locate exactly what I am trying to do.
I have a select statement, I would like to strip some of the output of the query, for example, if I get the result
'something'
but I only want to show
'some'
in the query result. How can...
Hi,
Can someone tell me the way to do a straight copy of a record as an update without using a select statement ?
I tried
update table
set column.field
where field2 = 'value1'
and field2 = 'value2'
Thanks!
I am trying to query a database where I have tbl1
I would like to count tbl1 and then return the distinct rows of clm1 tbl1.
For example, I have 10,000 entries in tbl1. clm1 represents a state so the output I am looking for is:
2,000 OH
4,000 CA
4,000 FL
Thanks!
Hi,
I have a script that will successfully restart a single process but I need to restart 3 and strService3 is the parent so this one has to be stopped last.
Option Explicit
Dim objWMIService, objItem, objService
Dim colListOfServices, strComputer, strService1, strService2, strService3...
Hi,
I have a date column and I am trying to build a query that will give me the dates > 48 hours ago (in the past).
For example using todays date 2006.10.05 and time 23:00 I would be looking for the dates prior to 2006.10.03 and time 23:00.
Your help is greatly appreciated!
Thanks!
Hi,
I need to query a database for a recordset and insert this into another database row-by-row.
For each record I want to provide a time of insert, but for each insert this time has to be incremented by 1, the time format is HH:MM:SS.0000 so for each inserted record the last decimal point...
Hi,
I am using Sybase v11.x. I am trying to copy from one
column to another column in a stored procedure as follows:
UPDATE tbl1
SET column1 = (select column2 from tbl2 where @variable =
variable)
WHERE @parameter = parameter
Everything is declared approriately.
The problem seems to be the...
Hi,
I am trying to return a formatted query result. For example:
SELECT * FROM TBL1
This will give me a string of text that I would like to format with carriage returns and semi colons.
Any help is greatly appreciated!
Hi,
I have a column where data is seperated by a delimiter, in this case a '\' I am looking for a way to format the output of a query so that I can seperate the data held between the delimiter, for example, if I have the column:
aaa\bbbb\cccccc\dddddd\eeeeeeee
I would like to format it as...
I am looking to create a stored procedure that will populate a text box depending on the result of a field. The field has many values and for each one it will require different text.
To query for the field I will need to join another table:
table1.field1 where table1.field2=table2.field2
If...
Hi,
I am trying to calculate a persons age using DATEDIFF. I have a column birthdate (ANSII format yyyy.mm.dd).
This is my query that is failing:
select datediff('year', birthdate, now()) from table1 where table1.column1 = 'value'
Can anyone help me modify this to get the age (in years)...
Hi All,
I have many text files that contain data from many workstations that I would like to Import into Excel as a cell comment due to its long worded format.
I have prepared a directory called 'workstations' within this directory I created a batch that would connect to all workstations...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.