Is it possible to do in one statement?
I have a sp where I am passing 2 param:
@lastName and @ID. Some times ID can be empty and I
need to select based on lastname, if Id is not empty select
spesific record. My 'or' and 'And' is not working correct.
Can you help me?
SELECT *
FROM Table1...
I have the following code in my sp where I am passing the param:
select count(*) as Voided from Table1 where groupNumber=@GroupID and status='V'
select count(*) as Active from Table1 where groupNumber=@GroupID and status='A'
I wanted to display this way when the sp exec:
Voided x
Active y
Is...
here is basic OPENQUERY statement, however if I use where close with conditional statement
syntax is incorrect. How do I fix this issue?
SELECT *
FROM OPENQUERY(IMGSPE, 'SELECT * from table1)
My query:
SELECT *
FROM OPENQUERY(IMGSPE, 'SELECT * from table1 where name='test'' )
From a sp in database1 I need to drop a table in database2.
How do I do this? Right now my statement can't see that table located in different db.
drop table [dbo].[table]
I have 2 connection (conn1 and conn2) to the different sources.
I need to do the following logic:
1. Select data from conn1 based on pk
2.Compare the data to the data in conn2 based on pl
3.If data exists in conn2 update conn1 based on pk
Please help me with the task I should use in order to do...
I have the following statement in my module.
For some reason (I can't understand...) it is running on one pc but not running on the other.
I am getting an error about format function. Can you help me please....
qdf.SQL = "SELECT CVSSN, CVGRP, CVLOC, Format(CVLECY, '00') & Format(CVLEYR...
I am trying to create dynamicaly an array of label based on the recordset value. What am I doing wrong?
For i = 0 To rs.RecordCount
While Not rs.EOF
Set lblInput(i) = Main.Controls.Add("VB.Label", rs("PlanChangeDesc"))
With lblInput(i)
.Width = 3000
.Height = 3000
End...
In first query I am getting result back.Second query should get the same data back (just different syntax). I can't see where my error is, but my second query is not returning any result back.Pleae help
1.select a.lastname
from Table1 a Left join table2 b
On a.lastname=b.last
2. select...
I have the following query where I am trying to create an extra line with a headers. But I am getting an error msg., because count in header is varchar , but in my select statement is int. How do I fix this problem?
Select 'Report' as 'Report' , 'Count'
Union
Select 'Report',count(*)
from table1
I have data in a file where lines end indicator is'~'
Can you help me create schema for the following data.
The actual data is after the second star in line.
ST*278*0001~
BHT*0078*13*A990145*20010912*1010~
HL*1**20*1~
I have the following code where clients can view a bigger picture when they click on a smaller. Is it possible to view a bigger picture when mouse in the smaller picture.
<head>
<title>HOME</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link...
I have following code where my frameset is on the left side. I would like to move it to the right. I've try the align=right, but it is not working. can you help me?
<frameset cols="180,*" border="0">
<frame src="thumbnails.html" scrolling="yes"...
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.